{"version":3,"sources":["node_modules/ieee754/index.js","node_modules/base64-js/index.js","node_modules/react/cjs/react.production.min.js","node_modules/react/index.js","node_modules/swagger-ui/node_modules/immutable/dist/immutable.js","node_modules/swagger-ui/node_modules/redux-immutable/dist/utilities/getStateName.js","node_modules/swagger-ui/node_modules/redux-immutable/dist/utilities/getUnexpectedInvocationParameterMessage.js","node_modules/swagger-ui/node_modules/redux-immutable/dist/utilities/validateNextState.js","node_modules/swagger-ui/node_modules/redux-immutable/dist/utilities/index.js","node_modules/swagger-ui/node_modules/redux-immutable/dist/combineReducers.js","node_modules/swagger-ui/node_modules/redux-immutable/dist/index.js","node_modules/serialize-error/index.js","node_modules/lodash/_listCacheClear.js","node_modules/lodash/eq.js","node_modules/lodash/_assocIndexOf.js","node_modules/lodash/_listCacheDelete.js","node_modules/lodash/_listCacheGet.js","node_modules/lodash/_listCacheHas.js","node_modules/lodash/_listCacheSet.js","node_modules/lodash/_ListCache.js","node_modules/lodash/_stackClear.js","node_modules/lodash/_stackDelete.js","node_modules/lodash/_stackGet.js","node_modules/lodash/_stackHas.js","node_modules/lodash/_freeGlobal.js","node_modules/lodash/_root.js","node_modules/lodash/_Symbol.js","node_modules/lodash/_getRawTag.js","node_modules/lodash/_objectToString.js","node_modules/lodash/_baseGetTag.js","node_modules/lodash/isObject.js","node_modules/lodash/isFunction.js","node_modules/lodash/_coreJsData.js","node_modules/lodash/_isMasked.js","node_modules/lodash/_toSource.js","node_modules/lodash/_baseIsNative.js","node_modules/lodash/_getValue.js","node_modules/lodash/_getNative.js","node_modules/lodash/_Map.js","node_modules/lodash/_nativeCreate.js","node_modules/lodash/_hashClear.js","node_modules/lodash/_hashDelete.js","node_modules/lodash/_hashGet.js","node_modules/lodash/_hashHas.js","node_modules/lodash/_hashSet.js","node_modules/lodash/_Hash.js","node_modules/lodash/_mapCacheClear.js","node_modules/lodash/_isKeyable.js","node_modules/lodash/_getMapData.js","node_modules/lodash/_mapCacheDelete.js","node_modules/lodash/_mapCacheGet.js","node_modules/lodash/_mapCacheHas.js","node_modules/lodash/_mapCacheSet.js","node_modules/lodash/_MapCache.js","node_modules/lodash/_stackSet.js","node_modules/lodash/_Stack.js","node_modules/lodash/_defineProperty.js","node_modules/lodash/_baseAssignValue.js","node_modules/lodash/_assignMergeValue.js","node_modules/lodash/_createBaseFor.js","node_modules/lodash/_baseFor.js","node_modules/lodash/_cloneBuffer.js","node_modules/lodash/_Uint8Array.js","node_modules/lodash/_cloneArrayBuffer.js","node_modules/lodash/_cloneTypedArray.js","node_modules/lodash/_copyArray.js","node_modules/lodash/_baseCreate.js","node_modules/lodash/_overArg.js","node_modules/lodash/_getPrototype.js","node_modules/lodash/_isPrototype.js","node_modules/lodash/_initCloneObject.js","node_modules/lodash/isObjectLike.js","node_modules/lodash/_baseIsArguments.js","node_modules/lodash/isArguments.js","node_modules/lodash/isArray.js","node_modules/lodash/isLength.js","node_modules/lodash/isArrayLike.js","node_modules/lodash/isArrayLikeObject.js","node_modules/lodash/stubFalse.js","node_modules/lodash/isBuffer.js","node_modules/lodash/isPlainObject.js","node_modules/lodash/_baseIsTypedArray.js","node_modules/lodash/_baseUnary.js","node_modules/lodash/_nodeUtil.js","node_modules/lodash/isTypedArray.js","node_modules/lodash/_safeGet.js","node_modules/lodash/_assignValue.js","node_modules/lodash/_copyObject.js","node_modules/lodash/_baseTimes.js","node_modules/lodash/_isIndex.js","node_modules/lodash/_arrayLikeKeys.js","node_modules/lodash/_nativeKeysIn.js","node_modules/lodash/_baseKeysIn.js","node_modules/lodash/keysIn.js","node_modules/lodash/toPlainObject.js","node_modules/lodash/_baseMergeDeep.js","node_modules/lodash/_baseMerge.js","node_modules/lodash/identity.js","node_modules/lodash/_apply.js","node_modules/lodash/_overRest.js","node_modules/lodash/constant.js","node_modules/lodash/_baseSetToString.js","node_modules/lodash/_shortOut.js","node_modules/lodash/_setToString.js","node_modules/lodash/_baseRest.js","node_modules/lodash/_isIterateeCall.js","node_modules/lodash/_createAssigner.js","node_modules/lodash/merge.js","node_modules/swagger-ui/node_modules/@braintree/sanitize-url/dist/constants.js","node_modules/swagger-ui/node_modules/@braintree/sanitize-url/dist/index.js","node_modules/lodash/_arrayMap.js","node_modules/lodash/isSymbol.js","node_modules/lodash/_baseToString.js","node_modules/lodash/toString.js","node_modules/lodash/_baseSlice.js","node_modules/lodash/_castSlice.js","node_modules/lodash/_hasUnicode.js","node_modules/lodash/_asciiToArray.js","node_modules/lodash/_unicodeToArray.js","node_modules/lodash/_stringToArray.js","node_modules/lodash/_createCaseFirst.js","node_modules/lodash/upperFirst.js","node_modules/lodash/capitalize.js","node_modules/lodash/_arrayReduce.js","node_modules/lodash/_basePropertyOf.js","node_modules/lodash/_deburrLetter.js","node_modules/lodash/deburr.js","node_modules/lodash/_asciiWords.js","node_modules/lodash/_hasUnicodeWord.js","node_modules/lodash/_unicodeWords.js","node_modules/lodash/words.js","node_modules/lodash/_createCompounder.js","node_modules/lodash/camelCase.js","node_modules/lodash/memoize.js","node_modules/lodash/_setCacheAdd.js","node_modules/lodash/_setCacheHas.js","node_modules/lodash/_SetCache.js","node_modules/lodash/_arraySome.js","node_modules/lodash/_cacheHas.js","node_modules/lodash/_equalArrays.js","node_modules/lodash/_mapToArray.js","node_modules/lodash/_setToArray.js","node_modules/lodash/_equalByTag.js","node_modules/lodash/_arrayPush.js","node_modules/lodash/_baseGetAllKeys.js","node_modules/lodash/_arrayFilter.js","node_modules/lodash/stubArray.js","node_modules/lodash/_getSymbols.js","node_modules/lodash/_nativeKeys.js","node_modules/lodash/_baseKeys.js","node_modules/lodash/keys.js","node_modules/lodash/_getAllKeys.js","node_modules/lodash/_equalObjects.js","node_modules/lodash/_DataView.js","node_modules/lodash/_Promise.js","node_modules/lodash/_Set.js","node_modules/lodash/_WeakMap.js","node_modules/lodash/_getTag.js","node_modules/lodash/_baseIsEqualDeep.js","node_modules/lodash/_baseIsEqual.js","node_modules/lodash/_baseIsMatch.js","node_modules/lodash/_isStrictComparable.js","node_modules/lodash/_getMatchData.js","node_modules/lodash/_matchesStrictComparable.js","node_modules/lodash/_baseMatches.js","node_modules/lodash/_isKey.js","node_modules/lodash/_memoizeCapped.js","node_modules/lodash/_stringToPath.js","node_modules/lodash/_castPath.js","node_modules/lodash/_toKey.js","node_modules/lodash/_baseGet.js","node_modules/lodash/get.js","node_modules/lodash/_baseHasIn.js","node_modules/lodash/_hasPath.js","node_modules/lodash/hasIn.js","node_modules/lodash/_baseMatchesProperty.js","node_modules/lodash/_baseProperty.js","node_modules/lodash/_basePropertyDeep.js","node_modules/lodash/property.js","node_modules/lodash/_baseIteratee.js","node_modules/lodash/_createFind.js","node_modules/lodash/_baseFindIndex.js","node_modules/lodash/_trimmedEndIndex.js","node_modules/lodash/_baseTrim.js","node_modules/lodash/toNumber.js","node_modules/lodash/toFinite.js","node_modules/lodash/toInteger.js","node_modules/lodash/findIndex.js","node_modules/lodash/find.js","node_modules/lodash/_baseForOwn.js","node_modules/lodash/_createBaseEach.js","node_modules/lodash/_baseEach.js","node_modules/lodash/_baseSome.js","node_modules/lodash/some.js","node_modules/css.escape/css.escape.js","node_modules/requires-port/index.js","node_modules/querystringify/index.js","node_modules/url-parse/index.js","node_modules/prop-types/lib/ReactPropTypesSecret.js","node_modules/prop-types/factoryWithThrowingShims.js","node_modules/prop-types/index.js","node_modules/lodash/_arrayEach.js","node_modules/lodash/_baseAssign.js","node_modules/lodash/_baseAssignIn.js","node_modules/lodash/_copySymbols.js","node_modules/lodash/_getSymbolsIn.js","node_modules/lodash/_copySymbolsIn.js","node_modules/lodash/_getAllKeysIn.js","node_modules/lodash/_initCloneArray.js","node_modules/lodash/_cloneDataView.js","node_modules/lodash/_cloneRegExp.js","node_modules/lodash/_cloneSymbol.js","node_modules/lodash/_initCloneByTag.js","node_modules/lodash/_baseIsMap.js","node_modules/lodash/isMap.js","node_modules/lodash/_baseIsSet.js","node_modules/lodash/isSet.js","node_modules/lodash/_baseClone.js","node_modules/lodash/last.js","node_modules/lodash/_parent.js","node_modules/lodash/_baseUnset.js","node_modules/lodash/_customOmitClone.js","node_modules/lodash/_isFlattenable.js","node_modules/lodash/_baseFlatten.js","node_modules/lodash/flatten.js","node_modules/lodash/_flatRest.js","node_modules/lodash/omit.js","node_modules/zenscroll/zenscroll.js","node_modules/immutable/dist/immutable.es.js","node_modules/react-immutable-proptypes/dist/ImmutablePropTypes.js","node_modules/lodash/_baseReduce.js","node_modules/lodash/reduce.js","node_modules/core-js-pure/internals/global-this.js","node_modules/core-js-pure/internals/fails.js","node_modules/core-js-pure/internals/function-bind-native.js","node_modules/core-js-pure/internals/function-apply.js","node_modules/core-js-pure/internals/function-uncurry-this.js","node_modules/core-js-pure/internals/classof-raw.js","node_modules/core-js-pure/internals/function-uncurry-this-clause.js","node_modules/core-js-pure/internals/is-callable.js","node_modules/core-js-pure/internals/descriptors.js","node_modules/core-js-pure/internals/function-call.js","node_modules/core-js-pure/internals/object-property-is-enumerable.js","node_modules/core-js-pure/internals/create-property-descriptor.js","node_modules/core-js-pure/internals/indexed-object.js","node_modules/core-js-pure/internals/is-null-or-undefined.js","node_modules/core-js-pure/internals/require-object-coercible.js","node_modules/core-js-pure/internals/to-indexed-object.js","node_modules/core-js-pure/internals/is-object.js","node_modules/core-js-pure/internals/path.js","node_modules/core-js-pure/internals/get-built-in.js","node_modules/core-js-pure/internals/object-is-prototype-of.js","node_modules/core-js-pure/internals/environment-user-agent.js","node_modules/core-js-pure/internals/environment-v8-version.js","node_modules/core-js-pure/internals/symbol-constructor-detection.js","node_modules/core-js-pure/internals/use-symbol-as-uid.js","node_modules/core-js-pure/internals/is-symbol.js","node_modules/core-js-pure/internals/try-to-string.js","node_modules/core-js-pure/internals/a-callable.js","node_modules/core-js-pure/internals/get-method.js","node_modules/core-js-pure/internals/ordinary-to-primitive.js","node_modules/core-js-pure/internals/is-pure.js","node_modules/core-js-pure/internals/define-global-property.js","node_modules/core-js-pure/internals/shared-store.js","node_modules/core-js-pure/internals/shared.js","node_modules/core-js-pure/internals/to-object.js","node_modules/core-js-pure/internals/has-own-property.js","node_modules/core-js-pure/internals/uid.js","node_modules/core-js-pure/internals/well-known-symbol.js","node_modules/core-js-pure/internals/to-primitive.js","node_modules/core-js-pure/internals/to-property-key.js","node_modules/core-js-pure/internals/document-create-element.js","node_modules/core-js-pure/internals/ie8-dom-define.js","node_modules/core-js-pure/internals/object-get-own-property-descriptor.js","node_modules/core-js-pure/internals/is-forced.js","node_modules/core-js-pure/internals/function-bind-context.js","node_modules/core-js-pure/internals/v8-prototype-define-bug.js","node_modules/core-js-pure/internals/an-object.js","node_modules/core-js-pure/internals/object-define-property.js","node_modules/core-js-pure/internals/create-non-enumerable-property.js","node_modules/core-js-pure/internals/export.js","node_modules/core-js-pure/internals/math-trunc.js","node_modules/core-js-pure/internals/to-integer-or-infinity.js","node_modules/core-js-pure/internals/to-absolute-index.js","node_modules/core-js-pure/internals/to-length.js","node_modules/core-js-pure/internals/length-of-array-like.js","node_modules/core-js-pure/internals/array-includes.js","node_modules/core-js-pure/internals/hidden-keys.js","node_modules/core-js-pure/internals/object-keys-internal.js","node_modules/core-js-pure/internals/enum-bug-keys.js","node_modules/core-js-pure/internals/object-keys.js","node_modules/core-js-pure/internals/object-get-own-property-symbols.js","node_modules/core-js-pure/internals/object-assign.js","node_modules/core-js-pure/modules/es.object.assign.js","node_modules/core-js-pure/es/object/assign.js","node_modules/core-js-pure/stable/object/assign.js","node_modules/core-js-pure/actual/object/assign.js","node_modules/core-js-pure/full/object/assign.js","node_modules/core-js-pure/features/object/assign.js","node_modules/core-js-pure/internals/array-slice.js","node_modules/core-js-pure/internals/function-bind.js","node_modules/core-js-pure/modules/es.function.bind.js","node_modules/core-js-pure/internals/get-built-in-prototype-method.js","node_modules/core-js-pure/es/function/virtual/bind.js","node_modules/core-js-pure/es/instance/bind.js","node_modules/core-js-pure/stable/instance/bind.js","node_modules/core-js-pure/actual/instance/bind.js","node_modules/core-js-pure/full/instance/bind.js","node_modules/core-js-pure/features/instance/bind.js","node_modules/classnames/index.js","node_modules/toggle-selection/index.js","node_modules/copy-to-clipboard/index.js","node_modules/react-copy-to-clipboard/lib/Component.js","node_modules/react-copy-to-clipboard/lib/index.js","node_modules/lodash.debounce/index.js","node_modules/react-debounce-input/lib/Component.js","node_modules/react-debounce-input/lib/index.js","node_modules/ret/lib/types.js","node_modules/ret/lib/sets.js","node_modules/ret/lib/util.js","node_modules/ret/lib/positions.js","node_modules/ret/lib/index.js","node_modules/drange/lib/index.js","node_modules/randexp/lib/randexp.js","node_modules/lodash/isEmpty.js","node_modules/lodash/isString.js","node_modules/lodash/now.js","node_modules/lodash/debounce.js","node_modules/lodash/_baseSet.js","node_modules/lodash/set.js","node_modules/lodash/fp/_mapping.js","node_modules/lodash/fp/placeholder.js","node_modules/lodash/fp/_baseConvert.js","node_modules/lodash/_metaMap.js","node_modules/lodash/_baseSetData.js","node_modules/lodash/_createCtor.js","node_modules/lodash/_createBind.js","node_modules/lodash/_composeArgs.js","node_modules/lodash/_composeArgsRight.js","node_modules/lodash/_countHolders.js","node_modules/lodash/_baseLodash.js","node_modules/lodash/_LazyWrapper.js","node_modules/lodash/noop.js","node_modules/lodash/_getData.js","node_modules/lodash/_realNames.js","node_modules/lodash/_getFuncName.js","node_modules/lodash/_LodashWrapper.js","node_modules/lodash/_wrapperClone.js","node_modules/lodash/wrapperLodash.js","node_modules/lodash/_isLaziable.js","node_modules/lodash/_setData.js","node_modules/lodash/_getWrapDetails.js","node_modules/lodash/_insertWrapDetails.js","node_modules/lodash/_baseIsNaN.js","node_modules/lodash/_strictIndexOf.js","node_modules/lodash/_baseIndexOf.js","node_modules/lodash/_arrayIncludes.js","node_modules/lodash/_updateWrapDetails.js","node_modules/lodash/_setWrapToString.js","node_modules/lodash/_createRecurry.js","node_modules/lodash/_getHolder.js","node_modules/lodash/_reorder.js","node_modules/lodash/_replaceHolders.js","node_modules/lodash/_createHybrid.js","node_modules/lodash/_createCurry.js","node_modules/lodash/_createPartial.js","node_modules/lodash/_mergeData.js","node_modules/lodash/_createWrap.js","node_modules/lodash/ary.js","node_modules/lodash/clone.js","node_modules/lodash/curry.js","node_modules/lodash/isError.js","node_modules/lodash/isWeakMap.js","node_modules/lodash/iteratee.js","node_modules/lodash/rearg.js","node_modules/lodash/toPath.js","node_modules/lodash/fp/_util.js","node_modules/lodash/fp/convert.js","node_modules/lodash/fp/set.js","node_modules/lodash/fp/assocPath.js","node_modules/deepmerge/dist/cjs.js","node_modules/core-js-pure/internals/shared-key.js","node_modules/core-js-pure/internals/correct-prototype-getter.js","node_modules/core-js-pure/internals/object-get-prototype-of.js","node_modules/core-js-pure/internals/function-uncurry-this-accessor.js","node_modules/core-js-pure/internals/is-possible-prototype.js","node_modules/core-js-pure/internals/a-possible-prototype.js","node_modules/core-js-pure/internals/object-set-prototype-of.js","node_modules/core-js-pure/internals/object-get-own-property-names.js","node_modules/core-js-pure/internals/own-keys.js","node_modules/core-js-pure/internals/copy-constructor-properties.js","node_modules/core-js-pure/internals/object-define-properties.js","node_modules/core-js-pure/internals/html.js","node_modules/core-js-pure/internals/object-create.js","node_modules/core-js-pure/internals/install-error-cause.js","node_modules/core-js-pure/internals/error-stack-clear.js","node_modules/core-js-pure/internals/error-stack-installable.js","node_modules/core-js-pure/internals/error-stack-install.js","node_modules/core-js-pure/internals/iterators.js","node_modules/core-js-pure/internals/is-array-iterator-method.js","node_modules/core-js-pure/internals/to-string-tag-support.js","node_modules/core-js-pure/internals/classof.js","node_modules/core-js-pure/internals/get-iterator-method.js","node_modules/core-js-pure/internals/get-iterator.js","node_modules/core-js-pure/internals/iterator-close.js","node_modules/core-js-pure/internals/iterate.js","node_modules/core-js-pure/internals/to-string.js","node_modules/core-js-pure/internals/normalize-string-argument.js","node_modules/core-js-pure/modules/es.aggregate-error.constructor.js","node_modules/core-js-pure/modules/es.aggregate-error.js","node_modules/core-js-pure/modules/esnext.aggregate-error.js","node_modules/core-js-pure/internals/proxy-accessor.js","node_modules/core-js-pure/internals/inherit-if-required.js","node_modules/core-js-pure/internals/wrap-error-constructor-with-cause.js","node_modules/core-js-pure/modules/es.error.cause.js","node_modules/core-js-pure/modules/es.aggregate-error.cause.js","node_modules/core-js-pure/internals/add-to-unscopables.js","node_modules/core-js-pure/internals/weak-map-basic-detection.js","node_modules/core-js-pure/internals/internal-state.js","node_modules/core-js-pure/internals/function-name.js","node_modules/core-js-pure/internals/define-built-in.js","node_modules/core-js-pure/internals/iterators-core.js","node_modules/core-js-pure/internals/object-to-string.js","node_modules/core-js-pure/internals/set-to-string-tag.js","node_modules/core-js-pure/internals/iterator-create-constructor.js","node_modules/core-js-pure/internals/iterator-define.js","node_modules/core-js-pure/internals/create-iter-result-object.js","node_modules/core-js-pure/modules/es.array.iterator.js","node_modules/core-js-pure/internals/string-multibyte.js","node_modules/core-js-pure/modules/es.string.iterator.js","node_modules/core-js-pure/es/aggregate-error.js","node_modules/core-js-pure/internals/dom-iterables.js","node_modules/core-js-pure/modules/web.dom-collections.iterator.js","node_modules/core-js-pure/stable/aggregate-error.js","node_modules/core-js-pure/actual/aggregate-error.js","node_modules/core-js-pure/full/aggregate-error.js","node_modules/core-js-pure/features/aggregate-error.js","node_modules/@babel/runtime-corejs3/core-js/aggregate-error.js","node_modules/process/browser.js","node_modules/lodash/isNull.js","node_modules/lodash/isNumber.js","node_modules/lodash/isBoolean.js","node_modules/minim/lib/serialisers/JSONSerialiser.js","node_modules/lodash/isEqual.js","node_modules/minim/lib/KeyValuePair.js","node_modules/lodash/negate.js","node_modules/minim/lib/ArraySlice.js","node_modules/minim/lib/primitives/Element.js","node_modules/minim/lib/primitives/NullElement.js","node_modules/minim/lib/primitives/StringElement.js","node_modules/minim/lib/primitives/NumberElement.js","node_modules/minim/lib/primitives/BooleanElement.js","node_modules/minim/lib/primitives/ArrayElement.js","node_modules/minim/lib/primitives/MemberElement.js","node_modules/minim/lib/ObjectSlice.js","node_modules/minim/lib/primitives/ObjectElement.js","node_modules/minim/lib/elements/LinkElement.js","node_modules/minim/lib/elements/RefElement.js","node_modules/minim/lib/elements.js","node_modules/minim/lib/Namespace.js","node_modules/minim/lib/serialisers/JSON06Serialiser.js","node_modules/minim/lib/minim.js","node_modules/short-unique-id/dist/short-unique-id.js","node_modules/scheduler/cjs/scheduler.production.min.js","node_modules/scheduler/index.js","node_modules/react-dom/cjs/react-dom.production.min.js","node_modules/react-dom/index.js","node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js","node_modules/use-sync-external-store/with-selector.js","node_modules/highlight.js/lib/core.js","node_modules/format/format.js","node_modules/fault/index.js","node_modules/lowlight/lib/core.js","node_modules/highlight.js/lib/languages/javascript.js","node_modules/highlight.js/lib/languages/json.js","node_modules/highlight.js/lib/languages/xml.js","node_modules/highlight.js/lib/languages/bash.js","node_modules/highlight.js/lib/languages/yaml.js","node_modules/highlight.js/lib/languages/http.js","node_modules/highlight.js/lib/languages/powershell.js","node_modules/js-file-download/file-download.js","node_modules/lodash/_baseZipObject.js","node_modules/lodash/zipObject.js","node_modules/repeat-string/index.js","node_modules/xml-but-prettier/dist/index.js","node_modules/lodash/toLower.js","node_modules/lodash/escapeRegExp.js","node_modules/lodash/_baseHas.js","node_modules/lodash/has.js","node_modules/@angular/animations/fesm2022/browser.mjs","node_modules/@angular/platform-browser/fesm2022/animations.mjs","src/modules/auth-module/auth.interface.ts","src/modules/login-module/login.screen.component.ts","src/modules/login-module/login.template.html","src/modules/login-module/index.ts","src/modules/ui-parts-module/footer.component.ts","src/modules/ui-parts-module/header.component.ts","src/modules/ui-parts-module/header.minimal.componet.ts","src/modules/ui-parts-module/index.ts","src/modules/web-access-module/web-access.service.ts","src/modules/web-access-module/web-access.component.ts","src/modules/web-access-module/web-access.template.html","src/modules/web-access-module/web-access.conditional-link.ts","src/modules/web-access-module/web-access.dynamic-external-link.ts","src/modules/web-access-module/index.ts","src/modules/scheduler-module/scheduler-templates.directive.ts","src/modules/scheduler-module/scheduler.component.ts","src/modules/scheduler-module/scheduler.template.html","src/modules/scheduler-module/index.ts","src/modules/registration-module/registration.component.ts","src/modules/registration-module/registration.template.html","src/modules/registration-module/verification.service.ts","src/modules/registration-module/verification.code.component.ts","src/modules/registration-module/verification.code.template.html","src/modules/registration-module/ext.login.registration.info.component.ts","src/modules/registration-module/ext.login.registration.info.template.html","src/modules/registration-module/index.ts","src/modules/change-password-module/reset.password.component.ts","src/modules/change-password-module/reset.password.template.html","src/modules/change-password-module/change.password.component.ts","src/modules/change-password-module/change.password.template.html","src/modules/change-password-module/set.password.component.ts","src/modules/change-password-module/set.password.template.html","src/modules/change-password-module/index.ts","src/modules/workflow-module/routeactions.service.ts","src/modules/workflow-module/external-actions/delete.plant.action.ts","src/modules/workflow-module/external-actions/delete.user.action.ts","src/modules/workflow-module/external.actions.service.ts","src/modules/workflow-module/workflow.messages.ts","src/modules/workflow-module/init.workflow.service.ts","src/modules/workflow-module/index.ts","src/modules/preregister-module/preregister-navigation-access.service.ts","src/modules/preregister-module/preregister.component.ts","src/modules/preregister-module/preregister.template.html","src/modules/preregister-module/index.ts","src/routes/redirected.routes.ts","src/routes/application-set.routes.ts","src/modules/upgrade-module/upgrade.process.ts","src/modules/upgrade-module/upgrade.service.ts","src/modules/upgrade-module/parameter-window.component.ts","src/modules/upgrade-module/parameter-window.template.html","src/modules/upgrade-module/bac-net.parameter-window.component.ts","src/modules/upgrade-module/bac-net.parameter-window.template.html","src/modules/upgrade-module/mapping-window.component.ts","src/modules/upgrade-module/mapping-window.template.html","src/modules/upgrade-module/upgrade-configuration.component.ts","src/modules/upgrade-module/upgrade-configuration.template.html","src/modules/upgrade-module/upgrade.component.ts","src/modules/upgrade-module/upgrade.template.html","src/modules/upgrade-module/batch-upgrade/batch-upgrade-status.service.ts","src/modules/upgrade-module/batch-upgrade/batch-upgrade.service.ts","src/modules/upgrade-module/batch-upgrade/batch-upgrade-configuration.component.ts","src/modules/upgrade-module/batch-upgrade/batch-upgrade-configuration.template.html","src/modules/upgrade-module/batch-upgrade/batch-upgrade-schedule-list.component.ts","src/modules/upgrade-module/batch-upgrade/batch-upgrade-schedule-list.template.html","src/modules/upgrade-module/batch-upgrade/batch-upgrade-list.component.ts","src/modules/upgrade-module/batch-upgrade/batch-upgrade-list.template.html","src/modules/upgrade-module/batch-upgrade/batch-upgrade-details.component.ts","src/modules/upgrade-module/batch-upgrade/batch-upgrade-details.template.html","src/modules/upgrade-module/batch-upgrade/batch-uprade.id-to-name.pipe.ts","src/modules/upgrade-module/index.ts","src/modules/history-module/format-numeric-value.pipe.ts","src/modules/history-module/history-list.component.ts","src/modules/history-module/history-list.template.html","src/modules/history-module/history.component.ts","src/modules/history-module/history.template.html","src/modules/task-module/task-list.component.ts","src/modules/task-module/task-list.template.html","src/routes/plant-operating.routes.ts","src/routes/tenant.routes.ts","src/modules/m2m-router-module/m2m-data-store.ts","src/modules/m2m-router-module/m2m-device-state-translation.service.ts","src/modules/m2m-router-module/m2m-router.component.ts","src/modules/m2m-router-module/m2m-router.template.html","src/modules/m2m-router-module/m2m-information-item-name-translation.service.ts","src/modules/m2m-router-module/format-m2m-information-item-value.pipe.ts","src/modules/m2m-router-module/exclude-information-items.pipe.ts","src/modules/m2m-router-module/m2m-router-detail.component.ts","src/modules/m2m-router-module/m2m-router-detail.template.html","src/modules/m2m-router-module/index.ts","src/modules/license-module/license.service.ts","src/modules/license-module/license-list.component.ts","src/modules/license-module/license-list.template.html","src/modules/license-module/license-details.component.ts","src/modules/license-module/license-details.template.html","src/modules/license-module/index.ts","src/modules/third-party-apps-module/third-party-apps.service.ts","src/modules/third-party-apps-module/third-party-apps-list.component.ts","src/modules/third-party-apps-module/third-party-apps-list.template.html","src/modules/third-party-apps-module/third-party-app.component.ts","src/modules/third-party-apps-module/third-party-app.template.html","src/modules/third-party-apps-module/third-party-app.register.component.ts","src/modules/third-party-apps-module/third-party-app.register.template.html","src/routes/plant-administration.routes.ts","src/routes/system-administration.routes.ts","src/routes/user.routes.ts","src/routes/new-tenant.routes.ts","src/routes/administration.routes.ts","src/modules/map-module/clx-status-map.component.ts","src/modules/map-module/plant-status-map.component.ts","src/modules/map-module/system-status-map.component.ts","src/modules/map-module/index.ts","src/modules/internal-release-notes-module/internal-release-notes.service.ts","src/modules/internal-release-notes-module/internal-release-notes.component.ts","src/modules/internal-release-notes-module/internal-release-notes.template.html","src/modules/internal-release-notes-module/index.ts","src/modules/cookie-module/cookie.info.component.ts","src/modules/cookie-module/cookie.info.template.html","src/modules/cookie-module/cookie.info.outside.component.ts","src/modules/cookie-module/cookie.info.outside.template.html","src/modules/cookie-module/index.ts","src/routes/system-operating.routes.ts","src/modules/api-documentation-module/api-content-base.component.ts","src/modules/api-documentation-module/api-coming-soon.component.ts","src/modules/api-documentation-module/api-coming-soon.template.html","src/modules/api-documentation-module/api-documentation.component.ts","src/modules/api-documentation-module/api-documentation.template.html","src/modules/api-documentation-module/api-faq.component.ts","src/modules/api-documentation-module/api-faq.template.html","node_modules/swagger-ui/dist/swagger-ui-es-bundle-core.js","node_modules/redux/dist/redux.mjs","node_modules/reselect/dist/reselect.mjs","node_modules/js-yaml/dist/js-yaml.mjs","node_modules/@babel/runtime-corejs3/helpers/esm/extends.js","node_modules/react-immutable-pure-component/lib/react-immutable-pure-component.es.js","node_modules/fast-json-patch/module/core.mjs","node_modules/fast-json-patch/module/helpers.mjs","node_modules/fast-json-patch/module/duplex.mjs","node_modules/fast-json-patch/index.mjs","node_modules/swagger-client/es/resolver/specmap/lib/index.js","node_modules/@swagger-api/apidom-error/src/ApiDOMAggregateError.mjs","node_modules/@swagger-api/apidom-error/src/ApiDOMError.mjs","node_modules/@swagger-api/apidom-error/src/ApiDOMStructuredError.mjs","node_modules/@swagger-api/apidom-error/src/UnsupportedOperationError.mjs","node_modules/@swagger-api/apidom-error/src/NotImplementedError.mjs","node_modules/ramda/es/F.js","node_modules/ramda/es/T.js","node_modules/ramda/es/internal/_isPlaceholder.js","node_modules/ramda/es/internal/_curry1.js","node_modules/ramda/es/internal/_curry2.js","node_modules/ramda/es/internal/_concat.js","node_modules/ramda/es/internal/_arity.js","node_modules/ramda/es/internal/_curryN.js","node_modules/ramda/es/curryN.js","node_modules/ramda/es/internal/_curry3.js","node_modules/ramda/es/internal/_isArray.js","node_modules/ramda/es/internal/_isTransformer.js","node_modules/ramda/es/internal/_dispatchable.js","node_modules/ramda/es/internal/_reduced.js","node_modules/ramda/es/internal/_xfBase.js","node_modules/ramda/es/internal/_xall.js","node_modules/ramda/es/all.js","node_modules/ramda/es/internal/_arrayFromIterator.js","node_modules/ramda/es/internal/_includesWith.js","node_modules/ramda/es/internal/_functionName.js","node_modules/ramda/es/internal/_has.js","node_modules/ramda/es/internal/_objectIs.js","node_modules/ramda/es/internal/_isArguments.js","node_modules/ramda/es/keys.js","node_modules/ramda/es/type.js","node_modules/ramda/es/internal/_equals.js","node_modules/ramda/es/equals.js","node_modules/ramda/es/internal/_indexOf.js","node_modules/ramda/es/internal/_includes.js","node_modules/ramda/es/internal/_map.js","node_modules/ramda/es/internal/_quote.js","node_modules/ramda/es/internal/_toISOString.js","node_modules/ramda/es/internal/_complement.js","node_modules/ramda/es/internal/_arrayReduce.js","node_modules/ramda/es/internal/_filter.js","node_modules/ramda/es/internal/_isObject.js","node_modules/ramda/es/internal/_xfilter.js","node_modules/ramda/es/filter.js","node_modules/ramda/es/reject.js","node_modules/ramda/es/internal/_toString.js","node_modules/ramda/es/toString.js","node_modules/ramda/es/max.js","node_modules/ramda/es/internal/_xmap.js","node_modules/ramda/es/map.js","node_modules/ramda/es/internal/_isInteger.js","node_modules/ramda/es/internal/_isString.js","node_modules/ramda/es/internal/_nth.js","node_modules/ramda/es/prop.js","node_modules/ramda/es/pluck.js","node_modules/ramda/es/internal/_isArrayLike.js","node_modules/ramda/es/internal/_createReduce.js","node_modules/ramda/es/internal/_xArrayReduce.js","node_modules/ramda/es/bind.js","node_modules/ramda/es/internal/_xReduce.js","node_modules/ramda/es/internal/_xwrap.js","node_modules/ramda/es/reduce.js","node_modules/ramda/es/allPass.js","node_modules/ramda/es/always.js","node_modules/ramda/es/and.js","node_modules/ramda/es/anyPass.js","node_modules/ramda/es/internal/_reduce.js","node_modules/ramda/es/ap.js","node_modules/ramda/es/apply.js","node_modules/ramda/es/curry.js","node_modules/ramda/es/internal/_assoc.js","node_modules/ramda/es/isNil.js","node_modules/ramda/es/assocPath.js","node_modules/ramda/es/assoc.js","node_modules/ramda/es/internal/_isFunction.js","node_modules/ramda/es/liftN.js","node_modules/ramda/es/lift.js","node_modules/ramda/es/both.js","node_modules/ramda/es/internal/_cloneRegExp.js","node_modules/ramda/es/internal/_clone.js","node_modules/ramda/es/comparator.js","node_modules/ramda/es/not.js","node_modules/ramda/es/complement.js","node_modules/ramda/es/internal/_pipe.js","node_modules/ramda/es/internal/_checkForMethod.js","node_modules/ramda/es/slice.js","node_modules/ramda/es/tail.js","node_modules/ramda/es/pipe.js","node_modules/ramda/es/head.js","node_modules/ramda/es/internal/_identity.js","node_modules/ramda/es/identity.js","node_modules/ramda/es/converge.js","node_modules/ramda/es/internal/_xreduceBy.js","node_modules/ramda/es/reduceBy.js","node_modules/ramda/es/defaultTo.js","node_modules/ramda/es/internal/_Set.js","node_modules/ramda/es/difference.js","node_modules/ramda/es/remove.js","node_modules/ramda/es/internal/_dissoc.js","node_modules/ramda/es/dissocPath.js","node_modules/ramda/es/internal/_xtake.js","node_modules/ramda/es/take.js","node_modules/ramda/es/internal/_dropLastWhile.js","node_modules/ramda/es/internal/_xdropLastWhile.js","node_modules/ramda/es/dropLastWhile.js","node_modules/ramda/es/last.js","node_modules/ramda/es/internal/_xdropWhile.js","node_modules/ramda/es/dropWhile.js","node_modules/ramda/es/or.js","node_modules/ramda/es/either.js","node_modules/ramda/es/internal/_isTypedArray.js","node_modules/ramda/es/empty.js","node_modules/ramda/es/flip.js","node_modules/ramda/es/groupBy.js","node_modules/ramda/es/hasPath.js","node_modules/ramda/es/has.js","node_modules/ramda/es/identical.js","node_modules/ramda/es/ifElse.js","node_modules/ramda/es/includes.js","node_modules/ramda/es/init.js","node_modules/ramda/es/invoker.js","node_modules/ramda/es/isEmpty.js","node_modules/ramda/es/isNotEmpty.js","node_modules/ramda/es/join.js","node_modules/ramda/es/internal/_isNumber.js","node_modules/ramda/es/lens.js","node_modules/ramda/es/internal/_path.js","node_modules/ramda/es/mapObjIndexed.js","node_modules/ramda/es/mergeWithKey.js","node_modules/ramda/es/mergeDeepWithKey.js","node_modules/ramda/es/mergeDeepRight.js","node_modules/ramda/es/none.js","node_modules/ramda/es/over.js","node_modules/ramda/es/path.js","node_modules/ramda/es/pathOr.js","node_modules/ramda/es/pathSatisfies.js","node_modules/ramda/es/pick.js","node_modules/ramda/es/propEq.js","node_modules/ramda/es/propOr.js","node_modules/ramda/es/propSatisfies.js","node_modules/ramda/es/range.js","node_modules/ramda/es/reduced.js","node_modules/ramda/es/replace.js","node_modules/ramda/es/sort.js","node_modules/ramda/es/split.js","node_modules/ramda/es/startsWith.js","node_modules/ramda/es/internal/_isRegExp.js","node_modules/ramda/es/test.js","node_modules/ramda/es/internal/_xuniqWith.js","node_modules/ramda/es/uniqWith.js","node_modules/ramda/es/when.js","node_modules/ramda-adjunct/es/stubUndefined.js","node_modules/ramda-adjunct/es/isUndefined.js","node_modules/ramda-adjunct/es/isNotUndefined.js","node_modules/ramda-adjunct/es/isNull.js","node_modules/ramda-adjunct/es/isNotNull.js","node_modules/ramda-adjunct/es/isNotNil.js","node_modules/ramda-adjunct/es/isGeneratorFunction.js","node_modules/ramda-adjunct/es/isAsyncFunction.js","node_modules/ramda-adjunct/es/isFunction.js","node_modules/ramda-adjunct/es/isArray.js","node_modules/ramda-adjunct/es/isEmptyArray.js","node_modules/ramda-adjunct/es/isNonEmptyArray.js","node_modules/ramda-adjunct/es/isString.js","node_modules/ramda-adjunct/es/isEmptyString.js","node_modules/ramda-adjunct/es/internal/isOfTypeObject.js","node_modules/ramda-adjunct/es/isObj.js","node_modules/ramda-adjunct/es/isNotObj.js","node_modules/ramda-adjunct/es/isNonEmptyString.js","node_modules/ramda-adjunct/es/isNotFunction.js","node_modules/ramda-adjunct/es/isObjLike.js","node_modules/ramda-adjunct/es/isPlainObj.js","node_modules/ramda-adjunct/es/isNumber.js","node_modules/ramda-adjunct/es/internal/ponyfills/Number.isFinite.js","node_modules/ramda-adjunct/es/isFinite.js","node_modules/ramda-adjunct/es/internal/ponyfills/Number.isInteger.js","node_modules/ramda-adjunct/es/isInteger.js","node_modules/ramda-adjunct/es/isRegExp.js","node_modules/ramda-adjunct/es/dispatch.js","node_modules/ramda-adjunct/es/included.js","node_modules/ramda-adjunct/es/invokeArgs.js","node_modules/ramda-adjunct/es/escapeRegExp.js","node_modules/ramda-adjunct/es/internal/ponyfills/String.replaceAll.js","node_modules/ramda-adjunct/es/replaceAll.js","node_modules/ramda-adjunct/es/trimCharsEnd.js","node_modules/ramda-adjunct/es/trimCharsStart.js","node_modules/@swagger-api/apidom-reference/src/util/url.mjs","node_modules/@swagger-api/apidom-reference/src/File.mjs","node_modules/@swagger-api/apidom-reference/src/ReferenceSet.mjs","node_modules/@swagger-api/apidom-reference/src/options/index.mjs","node_modules/@swagger-api/apidom-reference/src/options/util.mjs","node_modules/@swagger-api/apidom-reference/src/errors/PluginError.mjs","node_modules/@swagger-api/apidom-reference/src/util/plugins.mjs","node_modules/@swagger-api/apidom-reference/src/errors/ParseError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/ResolveError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/ResolverError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/UnmatchedResolverError.mjs","node_modules/@swagger-api/apidom-reference/src/resolve/util.mjs","node_modules/@swagger-api/apidom-reference/src/parse/index.mjs","node_modules/@swagger-api/apidom-core/src/predicates/index.mjs","node_modules/@swagger-api/apidom-core/src/elements/Annotation.mjs","node_modules/@swagger-api/apidom-core/src/elements/Comment.mjs","node_modules/@swagger-api/apidom-core/src/elements/ParseResult.mjs","node_modules/@swagger-api/apidom-core/src/elements/SourceMap.mjs","node_modules/@swagger-api/apidom-core/src/predicates/helpers.mjs","node_modules/@swagger-api/apidom-core/src/namespace.mjs","node_modules/@swagger-api/apidom-core/src/refractor/toolbox.mjs","node_modules/@swagger-api/apidom-ast/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-core/src/clone/index.mjs","node_modules/@swagger-api/apidom-core/src/clone/errors/CloneError.mjs","node_modules/@swagger-api/apidom-core/src/clone/errors/DeepCloneError.mjs","node_modules/@swagger-api/apidom-core/src/clone/errors/ShallowCloneError.mjs","node_modules/@swagger-api/apidom-core/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-core/src/refractor/plugins/dispatcher/index.mjs","node_modules/@swagger-api/apidom-core/src/identity/index.mjs","node_modules/@swagger-api/apidom-core/src/identity/errors/ElementIdentityError.mjs","node_modules/@swagger-api/apidom-core/src/media-types.mjs","node_modules/@swagger-api/apidom-core/src/index.mjs","node_modules/@swagger-api/apidom-core/src/refractor/registration.mjs","node_modules/@swagger-api/apidom-core/src/refractor/index.mjs","node_modules/@swagger-api/apidom-core/src/traversal/filter.mjs","node_modules/@swagger-api/apidom-core/src/traversal/find.mjs","node_modules/@swagger-api/apidom-core/src/transformers/serializers/value/visitor.mjs","node_modules/@swagger-api/apidom-core/src/transformers/serializers/value/ast/ephemeral-array.mjs","node_modules/@swagger-api/apidom-core/src/transformers/serializers/value/ast/ephemeral-object.mjs","node_modules/@swagger-api/apidom-core/src/transformers/serializers/value/index.mjs","node_modules/@swagger-api/apidom-core/src/transcluder/Transcluder.mjs","node_modules/@swagger-api/apidom-core/src/transcluder/index.mjs","node_modules/@swagger-api/apidom-core/src/util.mjs","node_modules/@swagger-api/apidom-core/src/transformers/from.mjs","node_modules/@swagger-api/apidom-core/src/merge/deepmerge.mjs","node_modules/@swagger-api/apidom-reference/src/errors/DereferenceError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/UnmatchedDereferenceStrategyError.mjs","node_modules/@swagger-api/apidom-reference/src/dereference/index.mjs","node_modules/@swagger-api/apidom-reference/src/parse/parsers/Parser.mjs","node_modules/@swagger-api/apidom-reference/src/resolve/resolvers/Resolver.mjs","node_modules/@swagger-api/apidom-reference/src/resolve/resolvers/HTTPResolver.mjs","node_modules/@swagger-api/apidom-reference/src/resolve/strategies/ResolveStrategy.mjs","node_modules/@swagger-api/apidom-reference/src/dereference/strategies/DereferenceStrategy.mjs","node_modules/@swagger-api/apidom-reference/src/dereference/util.mjs","node_modules/@swagger-api/apidom-reference/src/Reference.mjs","node_modules/@swagger-api/apidom-reference/src/errors/JsonSchema$anchorError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/EvaluationJsonSchema$anchorError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/JsonSchemaUriError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/EvaluationJsonSchemaUriError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/InvalidJsonSchema$anchorError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/MaximumDereferenceDepthError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/MaximumResolveDepthError.mjs","node_modules/@swagger-api/apidom-reference/src/errors/ParserError.mjs","node_modules/@swagger-api/apidom-reference/src/index.mjs","node_modules/swagger-client/es/helpers/fetch-ponyfill.browser.js","node_modules/swagger-client/es/helpers/fetch-polyfill.browser.js","node_modules/neotraverse/dist/legacy/legacy.mjs","node_modules/swagger-client/es/constants.js","node_modules/swagger-client/es/resolver/specmap/helpers.js","node_modules/swagger-client/es/resolver/specmap/lib/refs.js","node_modules/swagger-client/es/resolver/specmap/lib/all-of.js","node_modules/swagger-client/es/resolver/specmap/lib/parameters.js","node_modules/swagger-client/es/resolver/specmap/lib/properties.js","node_modules/swagger-client/es/resolver/specmap/lib/context-tree.js","node_modules/swagger-client/es/resolver/specmap/index.js","node_modules/swagger-client/es/resolver/utils/index.js","node_modules/swagger-client/es/http/serializers/request/file.js","node_modules/swagger-client/es/execute/oas3/style-serializer.js","node_modules/swagger-client/es/http/serializers/request/format.js","node_modules/swagger-client/es/http/serializers/request/index.js","node_modules/swagger-client/es/http/serializers/response/index.js","node_modules/swagger-client/es/http/index.js","node_modules/swagger-client/es/resolver/utils/options.js","node_modules/swagger-client/es/resolver/strategies/generic/resolve.js","node_modules/swagger-client/es/helpers/replace-special-chars-with-underscore.js","node_modules/swagger-client/es/helpers/id-from-path-method/index.js","node_modules/swagger-client/es/helpers/op-id.js","node_modules/swagger-client/es/resolver/strategies/generic/normalize.js","node_modules/swagger-client/es/resolver/strategies/generic/index.js","node_modules/swagger-client/es/resolver/strategies/openapi-2/resolve.js","node_modules/swagger-client/es/helpers/openapi-predicates.js","node_modules/swagger-client/es/resolver/strategies/openapi-2/index.js","node_modules/swagger-client/es/resolver/strategies/openapi-3-0/resolve.js","node_modules/swagger-client/es/resolver/strategies/openapi-3-0/index.js","node_modules/@swagger-api/apidom-json-pointer/src/errors/JsonPointerError.mjs","node_modules/@swagger-api/apidom-json-pointer/src/errors/InvalidJsonPointerError.mjs","node_modules/@swagger-api/apidom-json-pointer/src/errors/CompilationJsonPointerError.mjs","node_modules/@swagger-api/apidom-json-pointer/src/errors/EvaluationJsonPointerError.mjs","node_modules/@swagger-api/apidom-json-pointer/src/escape.mjs","node_modules/@swagger-api/apidom-json-pointer/src/unescape.mjs","node_modules/@swagger-api/apidom-json-pointer/src/parse.mjs","node_modules/@swagger-api/apidom-json-pointer/src/compile.mjs","node_modules/@swagger-api/apidom-json-pointer/src/evaluate.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/media-types.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Callback.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Components.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Contact.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Discriminator.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Encoding.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Example.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/ExternalDocumentation.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Header.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Info.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/License.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Link.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/MediaType.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/OAuthFlow.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/OAuthFlows.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Openapi.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/OpenApi3-0.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Operation.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Parameter.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/PathItem.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Paths.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Reference.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/RequestBody.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Response.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Responses.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/elements/JSONSchema.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/elements/JSONReference.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/elements/Media.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/elements/LinkDescription.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/namespace.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/Visitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/FallbackVisitor.mjs","node_modules/ts-mixer/dist/esm/index.js","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/SpecificationVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/generics/FixedFieldsVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/ParentSchemaAwareVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/predicates.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/predicates.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/ItemsVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/RequiredVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/generics/PatternedFieldsVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/generics/MapVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/PropertiesVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/PatternPropertiesVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/DependenciesVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/EnumVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/TypeVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/AllOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/AnyOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/OneOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/DefinitionsVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/LinksVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/json-reference/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/json-reference/$RefVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/generics/AlternatingVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/JSONSchemaOrJSONReferenceVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/media/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/visitors/json-schema/link-description/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/specification.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/toolbox.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-4/src/refractor/registration.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Schema.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/SecurityRequirement.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/SecurityScheme.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Server.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/ServerVariable.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Tag.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/Xml.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/namespace.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/Servers.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/Security.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/Tags.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ServerVariables.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsSchemas.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsResponses.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsParameters.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsExamples.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsRequestBodies.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsHeaders.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsSecuritySchemes.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsLinks.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ComponentsCallbacks.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/PathItemServers.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/PathItemParameters.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/OperationParameters.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ParameterExamples.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ParameterContent.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/OperationTags.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/OperationCallbacks.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/OperationSecurity.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/OperationServers.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/RequestBodyContent.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/MediaTypeExamples.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/MediaTypeEncoding.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/EncodingHeaders.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ResponseHeaders.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ResponseContent.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/ResponseLinks.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/DiscriminatorMapping.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/OAuthFlowScopes.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/LinkParameters.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/HeaderExamples.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/elements/nces/HeaderContent.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/Visitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/FallbackVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/SpecificationVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/predicates.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/generics/FixedFieldsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/OpenapiVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/SpecificationExtensionVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/info/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/info/VersionVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/contact/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/license/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/link/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/link/OperationRefVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/link/OperationIdVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/generics/PatternedFieldsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/generics/MapVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/link/ParametersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/server/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/server/UrlVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/ServersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/server-variable/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/server/VariablesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/media-type/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/generics/AlternatingVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/predicates.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/media-type/SchemaVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/ExamplesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/media-type/ExamplesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/media-type/EncodingVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/security-requirement/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/SecurityVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/tag/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/reference/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/reference/$RefVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/parameter/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/parameter/SchemaVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/header/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/header/SchemaVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/header/ExamplesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/ContentVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/header/ContentVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/schema/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/schema/AllOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/schema/AnyOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/schema/OneOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/schema/ItemsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/schema/PropertiesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/schema/TypeVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/schema/SchemaOrReferenceVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/distriminator/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/distriminator/MappingVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/xml/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/parameter/ExamplesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/parameter/ContentVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/SchemasVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/ResponsesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/ParametersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/ExamplesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/RequestBodiesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/HeadersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/SecuritySchemesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/LinksVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/components/CallbacksVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/example/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/example/ExternalValueVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/external-documentation/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/encoding/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/encoding/HeadersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/paths/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/request-body/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/request-body/ContentVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/callback/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/response/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/response/HeadersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/response/ContentVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/response/LinksVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/generics/MixedFieldsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/responses/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/responses/DefaultVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/operation/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/operation/TagsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/ParametersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/operation/ParametersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/operation/RequestBodyVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/operation/CallbacksVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/operation/SecurityVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/operation/ServersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/path-item/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/path-item/$RefVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/path-item/ServersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/path-item/ParametersVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/security-scheme/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/oauth-flows/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/oauth-flow/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/oauth-flow/ScopesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/visitors/open-api-3-0/TagsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/specification.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/toolbox.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-0/src/refractor/registration.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Callback.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Components.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Contact.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Discriminator.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Encoding.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Example.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/ExternalDocumentation.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Header.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Info.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/JsonSchemaDialect.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/License.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Link.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/MediaType.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/OAuthFlow.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/OAuthFlows.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Openapi.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/OpenApi3-1.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Operation.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Parameter.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/PathItem.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Paths.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Reference.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/RequestBody.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Response.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Responses.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/elements/JSONSchema.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/elements/LinkDescription.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/namespace.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/refractor/visitors/json-schema/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/refractor/visitors/json-schema/ItemsVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/refractor/visitors/json-schema/ExamplesVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/refractor/visitors/json-schema/link-description/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/refractor/specification.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/predicates.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/refractor/toolbox.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/refractor/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-6/src/refractor/registration.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/elements/JSONSchema.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/elements/LinkDescription.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/namespace.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/refractor/visitors/json-schema/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/refractor/visitors/json-schema/link-description/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/refractor/specification.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/predicates.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/refractor/toolbox.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/refractor/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-draft-7/src/refractor/registration.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/elements/JSONSchema.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/elements/LinkDescription.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/namespace.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/$vocabularyVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/$refVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/$defsVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/AllOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/AnyOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/OneOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/DependentSchemasVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/ItemsVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/PropertiesVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/PatternPropertiesVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/DependentRequiredVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/visitors/json-schema/link-description/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/specification.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/predicates.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/toolbox.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2019-09/src/refractor/registration.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/elements/JSONSchema.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/elements/LinkDescription.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/namespace.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/refractor/visitors/json-schema/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/refractor/visitors/json-schema/PrefixItemsVisitor.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/refractor/visitors/json-schema/link-description/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/refractor/specification.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/predicates.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/refractor/toolbox.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/refractor/index.mjs","node_modules/@swagger-api/apidom-ns-json-schema-2020-12/src/refractor/registration.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Schema.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/SecurityRequirement.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/SecurityScheme.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Server.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/ServerVariable.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Tag.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/Xml.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/namespace.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/nces/ComponentsPathItems.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/elements/nces/Webhooks.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/traversal/visitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/plugins/normalize-header-examples/NormalizeStorage.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/plugins/normalize-parameters.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/plugins/normalize-security-requirements.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/plugins/normalize-operation-ids.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/plugins/normalize-parameter-examples.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/plugins/normalize-header-examples/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/predicates.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/toolbox.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/info/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/contact/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/license/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/link/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/JsonSchemaDialectVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/server/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/server-variable/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/media-type/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/security-requirement/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/components/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/tag/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/reference/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/parameter/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/header/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/$defsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/AllOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/AnyOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/OneOfVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/DependentSchemasVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/PrefixItemsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/PropertiesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/schema/PatternPropertiesVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/distriminator/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/xml/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/components/SchemasVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/components/PathItemsVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/example/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/external-documentation/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/encoding/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/paths/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/request-body/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/callback/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/response/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/responses/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/operation/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/path-item/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/security-scheme/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/oauth-flows/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/oauth-flow/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/visitors/open-api-3-1/WebhooksVisitor.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/specification.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/index.mjs","node_modules/@swagger-api/apidom-ns-openapi-3-1/src/refractor/registration.mjs","node_modules/@swagger-api/apidom-reference/src/parse/parsers/binary/index-browser.mjs","node_modules/@swagger-api/apidom-reference/src/resolve/strategies/openapi-3-1/index.mjs","node_modules/swagger-client/es/helpers/abortcontroller-ponyfill.browser.js","node_modules/swagger-client/es/helpers/abortcontroller-polyfill.browser.js","node_modules/swagger-client/es/resolver/apidom/reference/resolve/resolvers/http-swagger-client/index.js","node_modules/swagger-client/es/resolver/apidom/reference/parse/parsers/json/index.js","node_modules/swagger-client/es/resolver/apidom/reference/parse/parsers/yaml-1-2/index.js","node_modules/swagger-client/es/resolver/apidom/reference/parse/parsers/openapi-json-3-1/index.js","node_modules/swagger-client/es/resolver/apidom/reference/parse/parsers/openapi-yaml-3-1/index.js","node_modules/@swagger-api/apidom-reference/src/dereference/strategies/openapi-3-1/selectors/$anchor.mjs","node_modules/@swagger-api/apidom-reference/src/dereference/strategies/openapi-3-1/util.mjs","node_modules/@swagger-api/apidom-reference/src/dereference/strategies/openapi-3-1/selectors/uri.mjs","node_modules/@swagger-api/apidom-reference/src/dereference/strategies/openapi-3-1/visitor.mjs","node_modules/@swagger-api/apidom-reference/src/dereference/strategies/openapi-3-1/index.mjs","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/utils/to-path.js","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/properties.js","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/all-of.js","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/parameters.js","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/utils/get-root-cause.js","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/errors/SchemaRefError.js","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/dereference.js","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/root.js","node_modules/swagger-client/es/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/index.js","node_modules/swagger-client/es/resolver/strategies/openapi-3-1-apidom/resolve.js","node_modules/swagger-client/es/resolver/strategies/openapi-3-1-apidom/normalize.js","node_modules/swagger-client/es/resolver/strategies/openapi-3-1-apidom/index.js","node_modules/swagger-client/es/resolver/index.js","node_modules/openapi-server-url-templating/es/server-url-templating.mjs","node_modules/apg-lite/lib/parser.js","node_modules/openapi-server-url-templating/es/parse/callbacks/server-url-template.mjs","node_modules/openapi-server-url-templating/es/parse/callbacks/server-variable.mjs","node_modules/openapi-server-url-templating/es/parse/callbacks/server-variable-name.mjs","node_modules/openapi-server-url-templating/es/parse/callbacks/literals.mjs","node_modules/openapi-server-url-templating/es/parse/index.mjs","node_modules/openapi-server-url-templating/es/test.mjs","node_modules/openapi-server-url-templating/es/substitute.mjs","node_modules/openapi-path-templating/es/path-templating.mjs","node_modules/openapi-path-templating/es/parse/callbacks/slash.mjs","node_modules/openapi-path-templating/es/parse/callbacks/path-template.mjs","node_modules/openapi-path-templating/es/parse/callbacks/path-literal.mjs","node_modules/openapi-path-templating/es/parse/callbacks/template-expression.mjs","node_modules/openapi-path-templating/es/parse/callbacks/template-expression-param-name.mjs","node_modules/openapi-path-templating/es/parse/index.mjs","node_modules/openapi-path-templating/es/resolve.mjs","node_modules/swagger-client/es/execute/swagger2/parameter-builders.js","node_modules/swagger-client/es/execute/oas3/parameter-builders.js","node_modules/swagger-client/es/execute/oas3/content-serializer.js","node_modules/@swaggerexpert/cookie/es/grammar.mjs","node_modules/@swaggerexpert/cookie/es/cookie/parse/index.mjs","node_modules/@swaggerexpert/cookie/es/utils.mjs","node_modules/@swaggerexpert/cookie/es/cookie/test/cookie-value.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/encoders/base64.browser.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/encoders/cookie-value-strict-base64.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/encoders/base64url.browser.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/encoders/cookie-value-strict-base64url.mjs","node_modules/@swaggerexpert/cookie/es/cookie/test/cookie-name.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/validators/cookie-name-strict.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/validators/cookie-value-strict.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/index.mjs","node_modules/@swaggerexpert/cookie/es/cookie/serialize/index.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/encoders/cookie-value-strict-percent.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/encoders/cookie-value-lenient-percent.mjs","node_modules/@swaggerexpert/cookie/es/set-cookie/serialize/validators/cookie-name-lenient.mjs","node_modules/swagger-client/es/helpers/cookie.js","node_modules/swagger-client/es/helpers/btoa.browser.js","node_modules/swagger-client/es/execute/oas3/build-request.js","node_modules/swagger-client/es/execute/swagger2/build-request.js","node_modules/swagger-client/es/helpers/each-operation.js","node_modules/swagger-client/es/helpers/find-operation.js","node_modules/swagger-client/es/helpers/id-from-path-method/legacy.js","node_modules/swagger-client/es/helpers/get-operation-raw.js","node_modules/swagger-client/es/helpers/is-http-url.js","node_modules/swagger-client/es/execute/index.js","node_modules/swagger-client/es/subtree-resolver/index.js","node_modules/react-redux/dist/react-redux.mjs","node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","node_modules/@babel/runtime/helpers/esm/iterableToArray.js","node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","node_modules/@babel/runtime/helpers/esm/typeof.js","node_modules/@babel/runtime/helpers/esm/toPrimitive.js","node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","node_modules/@babel/runtime/helpers/esm/defineProperty.js","node_modules/react-syntax-highlighter/dist/esm/highlight.js","node_modules/react-syntax-highlighter/dist/esm/create-element.js","node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js","node_modules/react-syntax-highlighter/dist/esm/light.js","node_modules/react-syntax-highlighter/dist/esm/languages/hljs/javascript.js","node_modules/react-syntax-highlighter/dist/esm/languages/hljs/json.js","node_modules/react-syntax-highlighter/dist/esm/languages/hljs/xml.js","node_modules/react-syntax-highlighter/dist/esm/languages/hljs/bash.js","node_modules/react-syntax-highlighter/dist/esm/languages/hljs/yaml.js","node_modules/react-syntax-highlighter/dist/esm/languages/hljs/http.js","node_modules/react-syntax-highlighter/dist/esm/languages/hljs/powershell.js","node_modules/react-syntax-highlighter/dist/esm/styles/hljs/agate.js","node_modules/react-syntax-highlighter/dist/esm/styles/hljs/arta.js","node_modules/react-syntax-highlighter/dist/esm/styles/hljs/monokai.js","node_modules/react-syntax-highlighter/dist/esm/styles/hljs/nord.js","node_modules/react-syntax-highlighter/dist/esm/styles/hljs/obsidian.js","node_modules/react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night.js","node_modules/react-syntax-highlighter/dist/esm/styles/hljs/idea.js","node_modules/remarkable/dist/esm/index.browser.js","node_modules/autolinker/dist/es2015/version.js","node_modules/autolinker/dist/es2015/utils.js","node_modules/autolinker/dist/es2015/html-tag.js","node_modules/autolinker/dist/es2015/truncate/truncate-smart.js","node_modules/autolinker/dist/es2015/truncate/truncate-middle.js","node_modules/autolinker/dist/es2015/truncate/truncate-end.js","node_modules/autolinker/dist/es2015/anchor-tag-builder.js","node_modules/autolinker/dist/es2015/match/match.js","node_modules/autolinker/dist/es2015/match/email-match.js","node_modules/autolinker/dist/es2015/match/hashtag-match.js","node_modules/autolinker/dist/es2015/match/mention-match.js","node_modules/autolinker/dist/es2015/match/phone-match.js","node_modules/autolinker/dist/es2015/match/url-match.js","node_modules/autolinker/dist/es2015/matcher/matcher.js","node_modules/autolinker/dist/es2015/regex-lib.js","node_modules/autolinker/dist/es2015/matcher/tld-regex.js","node_modules/autolinker/dist/es2015/matcher/email-matcher.js","node_modules/autolinker/dist/es2015/matcher/url-match-validator.js","node_modules/autolinker/dist/es2015/matcher/url-matcher.js","node_modules/autolinker/dist/es2015/matcher/hashtag-matcher.js","node_modules/autolinker/dist/es2015/matcher/phone-matcher.js","node_modules/autolinker/dist/es2015/matcher/mention-matcher.js","node_modules/autolinker/dist/es2015/htmlParser/parse-html.js","node_modules/autolinker/dist/es2015/autolinker.js","node_modules/autolinker/dist/es2015/index.js","node_modules/remarkable/dist/esm/linkify.js","node_modules/dompurify/dist/purify.es.mjs","src/modules/api-documentation-module/api.component.ts","src/modules/api-documentation-module/api.template.html","src/modules/api-documentation-module/app-container-documentation.component.ts","src/modules/api-documentation-module/api-faq.template.html","src/modules/api-documentation-module/index.ts","node_modules/@codemirror/legacy-modes/mode/lua.js","src/modules/scripting-editor-module/scripting-editor.service.ts","src/modules/scripting-editor-module/code-snippets/add-while-loop.snippet.ts","src/modules/scripting-editor-module/code-snippets/add-datapoint.snippet.ts","src/modules/scripting-editor-module/enums.ts","src/modules/scripting-editor-module/code-snippets/add-main-loop.snippet.ts","src/modules/scripting-editor-module/code-snippets/add-main-system-loop.snippet.ts","src/modules/scripting-editor-module/code-snippets/add-main-alarm-loop.snippet.ts","node_modules/mustache/mustache.mjs","src/modules/scripting-editor-module/code-snippets/process-alarms.snippet.ts","src/modules/scripting-editor-module/code-snippets/read-datapoint.snippet.ts","src/modules/scripting-editor-module/code-snippets/write-datapoint.snippet.ts","src/modules/scripting-editor-module/code-examples/read-and-write-datapoint.example.ts","src/modules/scripting-editor-module/code-snippets/add-for-loop.snippet.ts","src/modules/scripting-editor-module/code-snippets/if-else-statement.snippet.ts","src/modules/scripting-editor-module/code-snippets/if-else-if-else-statement.snippet.ts","src/modules/scripting-editor-module/code-snippets/show.snippet.ts","src/modules/scripting-editor-module/code-snippets/add-root-cause.snippet.ts","src/modules/scripting-editor-module/code-snippets/add-alarm-type.snippet.ts","src/modules/scripting-editor-module/code-snippets/act-on-plant.snippet.ts","src/modules/scripting-editor-module/code-snippets/add-until-loop.snippet.ts","src/modules/scripting-editor-module/code-examples/read-and-write-datapoint.oop.example.ts","src/modules/scripting-editor-module/code-examples/read-and-write-datapoint.example.system.ts","src/modules/scripting-editor-module/code-examples/process-alarms.example.ts","src/modules/scripting-editor-module/code-examples/call-northbound-api.example.ts","src/modules/scripting-editor-module/code-snippets/call.nb.api.ts","src/modules/scripting-editor-module/code-examples/read-and-write-datapoint.equivalencies.example.ts","src/modules/scripting-editor-module/code-snippets/iterate.array.snippet.ts","src/modules/scripting-editor-module/code-snippets/iterate.object.snippet.ts","src/modules/scripting-editor-module/code-snippets/show.frmt.snippet.ts","src/modules/scripting-editor-module/code-examples/functions.example.ts","src/modules/scripting-editor-module/code-examples/misc-functions.example.ts","src/modules/scripting-editor-module/filter-by-scriptmode.pipe.ts","src/modules/scripting-editor-module/filter-by-category.pipe.ts","src/modules/scripting-editor-module/scripting-editor.component.ts","src/modules/scripting-editor-module/scripting-editor.template.html","src/modules/benchmark-dashboard-module/benchmark-dashboard.data.interface.ts","src/modules/benchmark-dashboard-module/benchmark-dashboard.storage.service.ts","src/modules/benchmark-dashboard-module/benchmark-dashboard.data.service.ts","src/modules/benchmark-dashboard-module/axis-helper.service.ts","src/modules/benchmark-dashboard-module/charts/benchmark.barchart.component.ts","src/modules/benchmark-dashboard-module/charts/benchmark.barchart.template.html","src/modules/benchmark-dashboard-module/windows/datapoint-selector/datapoint-row.component.ts","src/modules/benchmark-dashboard-module/windows/datapoint-selector/datapoint-selector.component.ts","src/modules/benchmark-dashboard-module/windows/datapoint-selector/datapoint-selector.template.html","src/modules/benchmark-dashboard-module/windows/favourites/benchmark-favourites.component.ts","src/modules/benchmark-dashboard-module/windows/favourites/benchmark-favourites.template.html","src/modules/benchmark-dashboard-module/windows/dashboard-properties/dashboard-properties.component.ts","src/modules/benchmark-dashboard-module/windows/dashboard-properties/dashbboard-properties.template.html","src/modules/benchmark-dashboard-module/benchmark-dashboard.component.ts","src/modules/benchmark-dashboard-module/benchmark-dashboard.template.html","src/modules/benchmark-dashboard-module/index.ts","src/modules/alarm-dashboard-module/alarm-dashboard.container.ts","src/modules/node-red-module/node-red.component.ts","src/modules/node-red-module/node-red.template.html","src/modules/node-red-module/index.ts","src/modules/proto-pages-module/frame-page.component.ts","src/routes/main.routes.ts","src/modules/hub-module/resource.ts","src/modules/hub-module/hub.ts","src/modules/hub-module/resource.service.ts","src/modules/hub-module/index.ts","src/modules/third-party-apps-module/index.ts","src/app.component.ts","src/app.template.html","src/modules/scripting-editor-module/index.ts","src/modules/proto-pages-module/index.ts","src/app.module.ts","src/environments/environment.prod.ts","src/main.ts","src/devextreme-license.ts"],"sourcesContent":["/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (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 i += d;\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 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 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};\nexports.write = function (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 value = Math.abs(value);\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 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 for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n e = e << mLen | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n buffer[offset + i - d] |= s * 128;\n};","'use strict';\n\nexports.byteLength = byteLength;\nexports.toByteArray = toByteArray;\nexports.fromByteArray = fromByteArray;\nvar lookup = [];\nvar revLookup = [];\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62;\nrevLookup['_'.charCodeAt(0)] = 63;\nfunction getLens(b64) {\n var len = b64.length;\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4');\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=');\n if (validLen === -1) validLen = len;\n var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\n return [validLen, placeHoldersLen];\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength(b64) {\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction _byteLength(b64, validLen, placeHoldersLen) {\n return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n}\nfunction toByteArray(b64) {\n var tmp;\n var lens = getLens(b64);\n var validLen = lens[0];\n var placeHoldersLen = lens[1];\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n var curByte = 0;\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n var i;\n for (i = 0; i < len; i += 4) {\n tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];\n arr[curByte++] = tmp >> 16 & 0xFF;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n if (placeHoldersLen === 2) {\n tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;\n arr[curByte++] = tmp & 0xFF;\n }\n if (placeHoldersLen === 1) {\n tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;\n arr[curByte++] = tmp >> 8 & 0xFF;\n arr[curByte++] = tmp & 0xFF;\n }\n return arr;\n}\nfunction tripletToBase64(num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];\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 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);\n output.push(tripletToBase64(tmp));\n }\n return output.join('');\n}\nfunction fromByteArray(uint8) {\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\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(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\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 parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');\n }\n return parts.join('');\n}","/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nvar l = Symbol.for(\"react.element\"),\n n = Symbol.for(\"react.portal\"),\n p = Symbol.for(\"react.fragment\"),\n q = Symbol.for(\"react.strict_mode\"),\n r = Symbol.for(\"react.profiler\"),\n t = Symbol.for(\"react.provider\"),\n u = Symbol.for(\"react.context\"),\n v = Symbol.for(\"react.forward_ref\"),\n w = Symbol.for(\"react.suspense\"),\n x = Symbol.for(\"react.memo\"),\n y = Symbol.for(\"react.lazy\"),\n z = Symbol.iterator;\nfunction A(a) {\n if (null === a || \"object\" !== typeof a) return null;\n a = z && a[z] || a[\"@@iterator\"];\n return \"function\" === typeof a ? a : null;\n}\nvar B = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n C = Object.assign,\n D = {};\nfunction E(a, b, e) {\n this.props = a;\n this.context = b;\n this.refs = D;\n this.updater = e || B;\n}\nE.prototype.isReactComponent = {};\nE.prototype.setState = function (a, b) {\n if (\"object\" !== typeof a && \"function\" !== typeof a && null != a) throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");\n this.updater.enqueueSetState(this, a, b, \"setState\");\n};\nE.prototype.forceUpdate = function (a) {\n this.updater.enqueueForceUpdate(this, a, \"forceUpdate\");\n};\nfunction F() {}\nF.prototype = E.prototype;\nfunction G(a, b, e) {\n this.props = a;\n this.context = b;\n this.refs = D;\n this.updater = e || B;\n}\nvar H = G.prototype = new F();\nH.constructor = G;\nC(H, E.prototype);\nH.isPureReactComponent = !0;\nvar I = Array.isArray,\n J = Object.prototype.hasOwnProperty,\n K = {\n current: null\n },\n L = {\n key: !0,\n ref: !0,\n __self: !0,\n __source: !0\n };\nfunction M(a, b, e) {\n var d,\n c = {},\n k = null,\n h = null;\n if (null != b) for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k = \"\" + b.key), b) J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);\n var g = arguments.length - 2;\n if (1 === g) c.children = e;else if (1 < g) {\n for (var f = Array(g), m = 0; m < g; m++) f[m] = arguments[m + 2];\n c.children = f;\n }\n if (a && a.defaultProps) for (d in g = a.defaultProps, g) void 0 === c[d] && (c[d] = g[d]);\n return {\n $$typeof: l,\n type: a,\n key: k,\n ref: h,\n props: c,\n _owner: K.current\n };\n}\nfunction N(a, b) {\n return {\n $$typeof: l,\n type: a.type,\n key: b,\n ref: a.ref,\n props: a.props,\n _owner: a._owner\n };\n}\nfunction O(a) {\n return \"object\" === typeof a && null !== a && a.$$typeof === l;\n}\nfunction escape(a) {\n var b = {\n \"=\": \"=0\",\n \":\": \"=2\"\n };\n return \"$\" + a.replace(/[=:]/g, function (a) {\n return b[a];\n });\n}\nvar P = /\\/+/g;\nfunction Q(a, b) {\n return \"object\" === typeof a && null !== a && null != a.key ? escape(\"\" + a.key) : b.toString(36);\n}\nfunction R(a, b, e, d, c) {\n var k = typeof a;\n if (\"undefined\" === k || \"boolean\" === k) a = null;\n var h = !1;\n if (null === a) h = !0;else switch (k) {\n case \"string\":\n case \"number\":\n h = !0;\n break;\n case \"object\":\n switch (a.$$typeof) {\n case l:\n case n:\n h = !0;\n }\n }\n if (h) return h = a, c = c(h), a = \"\" === d ? \".\" + Q(h, 0) : d, I(c) ? (e = \"\", null != a && (e = a.replace(P, \"$&/\") + \"/\"), R(c, b, e, \"\", function (a) {\n return a;\n })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? \"\" : (\"\" + c.key).replace(P, \"$&/\") + \"/\") + a)), b.push(c)), 1;\n h = 0;\n d = \"\" === d ? \".\" : d + \":\";\n if (I(a)) for (var g = 0; g < a.length; g++) {\n k = a[g];\n var f = d + Q(k, g);\n h += R(k, b, e, f, c);\n } else if (f = A(a), \"function\" === typeof f) for (a = f.call(a), g = 0; !(k = a.next()).done;) k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c);else if (\"object\" === k) throw b = String(a), Error(\"Objects are not valid as a React child (found: \" + (\"[object Object]\" === b ? \"object with keys {\" + Object.keys(a).join(\", \") + \"}\" : b) + \"). If you meant to render a collection of children, use an array instead.\");\n return h;\n}\nfunction S(a, b, e) {\n if (null == a) return a;\n var d = [],\n c = 0;\n R(a, d, \"\", \"\", function (a) {\n return b.call(e, a, c++);\n });\n return d;\n}\nfunction T(a) {\n if (-1 === a._status) {\n var b = a._result;\n b = b();\n b.then(function (b) {\n if (0 === a._status || -1 === a._status) a._status = 1, a._result = b;\n }, function (b) {\n if (0 === a._status || -1 === a._status) a._status = 2, a._result = b;\n });\n -1 === a._status && (a._status = 0, a._result = b);\n }\n if (1 === a._status) return a._result.default;\n throw a._result;\n}\nvar U = {\n current: null\n },\n V = {\n transition: null\n },\n W = {\n ReactCurrentDispatcher: U,\n ReactCurrentBatchConfig: V,\n ReactCurrentOwner: K\n };\nfunction X() {\n throw Error(\"act(...) is not supported in production builds of React.\");\n}\nexports.Children = {\n map: S,\n forEach: function (a, b, e) {\n S(a, function () {\n b.apply(this, arguments);\n }, e);\n },\n count: function (a) {\n var b = 0;\n S(a, function () {\n b++;\n });\n return b;\n },\n toArray: function (a) {\n return S(a, function (a) {\n return a;\n }) || [];\n },\n only: function (a) {\n if (!O(a)) throw Error(\"React.Children.only expected to receive a single React element child.\");\n return a;\n }\n};\nexports.Component = E;\nexports.Fragment = p;\nexports.Profiler = r;\nexports.PureComponent = G;\nexports.StrictMode = q;\nexports.Suspense = w;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;\nexports.act = X;\nexports.cloneElement = function (a, b, e) {\n if (null === a || void 0 === a) throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + a + \".\");\n var d = C({}, a.props),\n c = a.key,\n k = a.ref,\n h = a._owner;\n if (null != b) {\n void 0 !== b.ref && (k = b.ref, h = K.current);\n void 0 !== b.key && (c = \"\" + b.key);\n if (a.type && a.type.defaultProps) var g = a.type.defaultProps;\n for (f in b) J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);\n }\n var f = arguments.length - 2;\n if (1 === f) d.children = e;else if (1 < f) {\n g = Array(f);\n for (var m = 0; m < f; m++) g[m] = arguments[m + 2];\n d.children = g;\n }\n return {\n $$typeof: l,\n type: a.type,\n key: c,\n ref: k,\n props: d,\n _owner: h\n };\n};\nexports.createContext = function (a) {\n a = {\n $$typeof: u,\n _currentValue: a,\n _currentValue2: a,\n _threadCount: 0,\n Provider: null,\n Consumer: null,\n _defaultValue: null,\n _globalName: null\n };\n a.Provider = {\n $$typeof: t,\n _context: a\n };\n return a.Consumer = a;\n};\nexports.createElement = M;\nexports.createFactory = function (a) {\n var b = M.bind(null, a);\n b.type = a;\n return b;\n};\nexports.createRef = function () {\n return {\n current: null\n };\n};\nexports.forwardRef = function (a) {\n return {\n $$typeof: v,\n render: a\n };\n};\nexports.isValidElement = O;\nexports.lazy = function (a) {\n return {\n $$typeof: y,\n _payload: {\n _status: -1,\n _result: a\n },\n _init: T\n };\n};\nexports.memo = function (a, b) {\n return {\n $$typeof: x,\n type: a,\n compare: void 0 === b ? null : b\n };\n};\nexports.startTransition = function (a) {\n var b = V.transition;\n V.transition = {};\n try {\n a();\n } finally {\n V.transition = b;\n }\n};\nexports.unstable_act = X;\nexports.useCallback = function (a, b) {\n return U.current.useCallback(a, b);\n};\nexports.useContext = function (a) {\n return U.current.useContext(a);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (a) {\n return U.current.useDeferredValue(a);\n};\nexports.useEffect = function (a, b) {\n return U.current.useEffect(a, b);\n};\nexports.useId = function () {\n return U.current.useId();\n};\nexports.useImperativeHandle = function (a, b, e) {\n return U.current.useImperativeHandle(a, b, e);\n};\nexports.useInsertionEffect = function (a, b) {\n return U.current.useInsertionEffect(a, b);\n};\nexports.useLayoutEffect = function (a, b) {\n return U.current.useLayoutEffect(a, b);\n};\nexports.useMemo = function (a, b) {\n return U.current.useMemo(a, b);\n};\nexports.useReducer = function (a, b, e) {\n return U.current.useReducer(a, b, e);\n};\nexports.useRef = function (a) {\n return U.current.useRef(a);\n};\nexports.useState = function (a) {\n return U.current.useState(a);\n};\nexports.useSyncExternalStore = function (a, b, e) {\n return U.current.useSyncExternalStore(a, b, e);\n};\nexports.useTransition = function () {\n return U.current.useTransition();\n};\nexports.version = \"18.3.1\";","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.Immutable = factory();\n})(this, function () {\n 'use strict';\n\n var SLICE$0 = Array.prototype.slice;\n function createClass(ctor, superClass) {\n if (superClass) {\n ctor.prototype = Object.create(superClass.prototype);\n }\n ctor.prototype.constructor = ctor;\n }\n function Iterable(value) {\n return isIterable(value) ? value : Seq(value);\n }\n createClass(KeyedIterable, Iterable);\n function KeyedIterable(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n createClass(IndexedIterable, Iterable);\n function IndexedIterable(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n createClass(SetIterable, Iterable);\n function SetIterable(value) {\n return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n function isIterable(maybeIterable) {\n return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);\n }\n function isKeyed(maybeKeyed) {\n return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);\n }\n function isIndexed(maybeIndexed) {\n return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);\n }\n function isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n }\n function isOrdered(maybeOrdered) {\n return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);\n }\n Iterable.isIterable = isIterable;\n Iterable.isKeyed = isKeyed;\n Iterable.isIndexed = isIndexed;\n Iterable.isAssociative = isAssociative;\n Iterable.isOrdered = isOrdered;\n Iterable.Keyed = KeyedIterable;\n Iterable.Indexed = IndexedIterable;\n Iterable.Set = SetIterable;\n var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n // Used for setting prototype methods that IE8 chokes on.\n var DELETE = 'delete';\n\n // Constants describing the size of trie nodes.\n var SHIFT = 5; // Resulted in best performance after ______?\n var SIZE = 1 << SHIFT;\n var MASK = SIZE - 1;\n\n // A consistent shared value representing \"not set\" which equals nothing other\n // than itself, and nothing that could be provided externally.\n var NOT_SET = {};\n\n // Boolean references, Rough equivalent of `bool &`.\n var CHANGE_LENGTH = {\n value: false\n };\n var DID_ALTER = {\n value: false\n };\n function MakeRef(ref) {\n ref.value = false;\n return ref;\n }\n function SetRef(ref) {\n ref && (ref.value = true);\n }\n\n // A function which returns a value representing an \"owner\" for transient writes\n // to tries. The return value will only ever equal itself, and will not equal\n // the return of any subsequent call of this function.\n function OwnerID() {}\n\n // http://jsperf.com/copy-array-inline\n function arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n }\n function ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n }\n function wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n }\n function returnTrue() {\n return true;\n }\n function wholeSlice(begin, end, size) {\n return (begin === 0 || size !== undefined && begin <= -size) && (end === undefined || size !== undefined && end >= size);\n }\n function resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n }\n function resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n }\n function resolveIndex(index, size, defaultIndex) {\n return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index);\n }\n\n /* global Symbol */\n\n var ITERATE_KEYS = 0;\n var ITERATE_VALUES = 1;\n var ITERATE_ENTRIES = 2;\n var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n function Iterator(next) {\n this.next = next;\n }\n Iterator.prototype.toString = function () {\n return '[Iterator]';\n };\n Iterator.KEYS = ITERATE_KEYS;\n Iterator.VALUES = ITERATE_VALUES;\n Iterator.ENTRIES = ITERATE_ENTRIES;\n Iterator.prototype.inspect = Iterator.prototype.toSource = function () {\n return this.toString();\n };\n Iterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n };\n function iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? iteratorResult.value = value : iteratorResult = {\n value: value,\n done: false\n };\n return iteratorResult;\n }\n function iteratorDone() {\n return {\n value: undefined,\n done: true\n };\n }\n function hasIterator(maybeIterable) {\n return !!getIteratorFn(maybeIterable);\n }\n function isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n }\n function getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n }\n function getIteratorFn(iterable) {\n var iteratorFn = iterable && (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL] || iterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n function isArrayLike(value) {\n return value && typeof value.length === 'number';\n }\n createClass(Seq, Iterable);\n function Seq(value) {\n return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value);\n }\n Seq.of = function /*...values*/\n () {\n return Seq(arguments);\n };\n Seq.prototype.toSeq = function () {\n return this;\n };\n Seq.prototype.toString = function () {\n return this.__toString('Seq {', '}');\n };\n Seq.prototype.cacheResult = function () {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function (fn, reverse) {\n return seqIterate(this, fn, reverse, true);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function (type, reverse) {\n return seqIterator(this, type, reverse, true);\n };\n createClass(KeyedSeq, Seq);\n function KeyedSeq(value) {\n return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? isKeyed(value) ? value.toSeq() : value.fromEntrySeq() : keyedSeqFromValue(value);\n }\n KeyedSeq.prototype.toKeyedSeq = function () {\n return this;\n };\n createClass(IndexedSeq, Seq);\n function IndexedSeq(value) {\n return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();\n }\n IndexedSeq.of = function /*...values*/\n () {\n return IndexedSeq(arguments);\n };\n IndexedSeq.prototype.toIndexedSeq = function () {\n return this;\n };\n IndexedSeq.prototype.toString = function () {\n return this.__toString('Seq [', ']');\n };\n IndexedSeq.prototype.__iterate = function (fn, reverse) {\n return seqIterate(this, fn, reverse, false);\n };\n IndexedSeq.prototype.__iterator = function (type, reverse) {\n return seqIterator(this, type, reverse, false);\n };\n createClass(SetSeq, Seq);\n function SetSeq(value) {\n return (value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value).toSetSeq();\n }\n SetSeq.of = function /*...values*/\n () {\n return SetSeq(arguments);\n };\n SetSeq.prototype.toSetSeq = function () {\n return this;\n };\n Seq.isSeq = isSeq;\n Seq.Keyed = KeyedSeq;\n Seq.Set = SetSeq;\n Seq.Indexed = IndexedSeq;\n var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\n Seq.prototype[IS_SEQ_SENTINEL] = true;\n createClass(ArraySeq, IndexedSeq);\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n ArraySeq.prototype.get = function (index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n ArraySeq.prototype.__iterate = function (fn, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n ArraySeq.prototype.__iterator = function (type, reverse) {\n var array = this._array;\n var maxIndex = array.length - 1;\n var ii = 0;\n return new Iterator(function () {\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++]);\n });\n };\n createClass(ObjectSeq, KeyedSeq);\n function ObjectSeq(object) {\n var keys = Object.keys(object);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n ObjectSeq.prototype.get = function (key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n ObjectSeq.prototype.has = function (key) {\n return this._object.hasOwnProperty(key);\n };\n ObjectSeq.prototype.__iterate = function (fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var key = keys[reverse ? maxIndex - ii : ii];\n if (fn(object[key], key, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n ObjectSeq.prototype.__iterator = function (type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var maxIndex = keys.length - 1;\n var ii = 0;\n return new Iterator(function () {\n var key = keys[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]);\n });\n };\n ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;\n createClass(IterableSeq, IndexedSeq);\n function IterableSeq(iterable) {\n this._iterable = iterable;\n this.size = iterable.length || iterable.size;\n }\n IterableSeq.prototype.__iterateUncached = function (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n IterableSeq.prototype.__iteratorUncached = function (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterable = this._iterable;\n var iterator = getIterator(iterable);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n createClass(IteratorSeq, IndexedSeq);\n function IteratorSeq(iterator) {\n this._iterator = iterator;\n this._iteratorCache = [];\n }\n IteratorSeq.prototype.__iterateUncached = function (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n while (iterations < cache.length) {\n if (fn(cache[iterations], iterations++, this) === false) {\n return iterations;\n }\n }\n var step;\n while (!(step = iterator.next()).done) {\n var val = step.value;\n cache[iterations] = val;\n if (fn(val, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n IteratorSeq.prototype.__iteratorUncached = function (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = this._iterator;\n var cache = this._iteratorCache;\n var iterations = 0;\n return new Iterator(function () {\n if (iterations >= cache.length) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n cache[iterations] = step.value;\n }\n return iteratorValue(type, iterations, cache[iterations++]);\n });\n };\n\n // # pragma Helper functions\n\n function isSeq(maybeSeq) {\n return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);\n }\n var EMPTY_SEQ;\n function emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n }\n function keyedSeqFromValue(value) {\n var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined;\n if (!seq) {\n throw new TypeError('Expected Array or iterable object of [k, v] entries, ' + 'or keyed object: ' + value);\n }\n return seq;\n }\n function indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (!seq) {\n throw new TypeError('Expected Array or iterable object of values: ' + value);\n }\n return seq;\n }\n function seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value) || typeof value === 'object' && new ObjectSeq(value);\n if (!seq) {\n throw new TypeError('Expected Array or iterable object of values, or keyed object: ' + value);\n }\n return seq;\n }\n function maybeIndexedSeqFromValue(value) {\n return isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined;\n }\n function seqIterate(seq, fn, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n for (var ii = 0; ii <= maxIndex; ii++) {\n var entry = cache[reverse ? maxIndex - ii : ii];\n if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {\n return ii + 1;\n }\n }\n return ii;\n }\n return seq.__iterateUncached(fn, reverse);\n }\n function seqIterator(seq, type, reverse, useKeys) {\n var cache = seq._cache;\n if (cache) {\n var maxIndex = cache.length - 1;\n var ii = 0;\n return new Iterator(function () {\n var entry = cache[reverse ? maxIndex - ii : ii];\n return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);\n });\n }\n return seq.__iteratorUncached(type, reverse);\n }\n function fromJS(json, converter) {\n return converter ? fromJSWith(converter, json, '', {\n '': json\n }) : fromJSDefault(json);\n }\n function fromJSWith(converter, json, key, parentJSON) {\n if (Array.isArray(json)) {\n return converter.call(parentJSON, key, IndexedSeq(json).map(function (v, k) {\n return fromJSWith(converter, v, k, json);\n }));\n }\n if (isPlainObj(json)) {\n return converter.call(parentJSON, key, KeyedSeq(json).map(function (v, k) {\n return fromJSWith(converter, v, k, json);\n }));\n }\n return json;\n }\n function fromJSDefault(json) {\n if (Array.isArray(json)) {\n return IndexedSeq(json).map(fromJSDefault).toList();\n }\n if (isPlainObj(json)) {\n return KeyedSeq(json).map(fromJSDefault).toMap();\n }\n return json;\n }\n function isPlainObj(value) {\n return value && (value.constructor === Object || value.constructor === undefined);\n }\n\n /**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if the it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections implement `equals` and `hashCode`.\n *\n */\n function is(valueA, valueB) {\n if (valueA === valueB || valueA !== valueA && valueB !== valueB) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || valueA !== valueA && valueB !== valueB) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n if (typeof valueA.equals === 'function' && typeof valueB.equals === 'function' && valueA.equals(valueB)) {\n return true;\n }\n return false;\n }\n function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (!isIterable(b) || a.size !== undefined && b.size !== undefined && a.size !== b.size || a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b)) {\n return false;\n }\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n var notAssociative = !isAssociative(a);\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function (v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n var flipped = false;\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n var allEqual = true;\n var bSize = b.__iterate(function (v, k) {\n if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n return allEqual && a.size === bSize;\n }\n createClass(Repeat, IndexedSeq);\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n Repeat.prototype.toString = function () {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n Repeat.prototype.get = function (index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n Repeat.prototype.includes = function (searchValue) {\n return is(this._value, searchValue);\n };\n Repeat.prototype.slice = function (begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n Repeat.prototype.reverse = function () {\n return this;\n };\n Repeat.prototype.indexOf = function (searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n Repeat.prototype.lastIndexOf = function (searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n Repeat.prototype.__iterate = function (fn, reverse) {\n for (var ii = 0; ii < this.size; ii++) {\n if (fn(this._value, ii, this) === false) {\n return ii + 1;\n }\n }\n return ii;\n };\n Repeat.prototype.__iterator = function (type, reverse) {\n var this$0 = this;\n var ii = 0;\n return new Iterator(function () {\n return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone();\n });\n };\n Repeat.prototype.equals = function (other) {\n return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other);\n };\n var EMPTY_REPEAT;\n function invariant(condition, error) {\n if (!condition) throw new Error(error);\n }\n createClass(Range, IndexedSeq);\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n Range.prototype.toString = function () {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' + this._start + '...' + this._end + (this._step !== 1 ? ' by ' + this._step : '') + ' ]';\n };\n Range.prototype.get = function (index, notSetValue) {\n return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;\n };\n Range.prototype.includes = function (searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);\n };\n Range.prototype.slice = function (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n Range.prototype.indexOf = function (searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index;\n }\n }\n return -1;\n };\n Range.prototype.lastIndexOf = function (searchValue) {\n return this.indexOf(searchValue);\n };\n Range.prototype.__iterate = function (fn, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n for (var ii = 0; ii <= maxIndex; ii++) {\n if (fn(value, ii, this) === false) {\n return ii + 1;\n }\n value += reverse ? -step : step;\n }\n return ii;\n };\n Range.prototype.__iterator = function (type, reverse) {\n var maxIndex = this.size - 1;\n var step = this._step;\n var value = reverse ? this._start + maxIndex * step : this._start;\n var ii = 0;\n return new Iterator(function () {\n var v = value;\n value += reverse ? -step : step;\n return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);\n });\n };\n Range.prototype.equals = function (other) {\n return other instanceof Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other);\n };\n var EMPTY_RANGE;\n createClass(Collection, Iterable);\n function Collection() {\n throw TypeError('Abstract');\n }\n createClass(KeyedCollection, Collection);\n function KeyedCollection() {}\n createClass(IndexedCollection, Collection);\n function IndexedCollection() {}\n createClass(SetCollection, Collection);\n function SetCollection() {}\n Collection.Keyed = KeyedCollection;\n Collection.Indexed = IndexedCollection;\n Collection.Set = SetCollection;\n var imul = typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? Math.imul : function imul(a, b) {\n a = a | 0; // int\n b = b | 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return c * d + ((a >>> 16) * d + c * (b >>> 16) << 16 >>> 0) | 0; // int\n };\n\n // v8 has an optimization for storing 31-bit signed numbers.\n // Values which have either 00 or 11 as the high order bits qualify.\n // This function drops the highest order bit in a signed number, maintaining\n // the sign bit.\n function smi(i32) {\n return i32 >>> 1 & 0x40000000 | i32 & 0xBFFFFFFF;\n }\n function hash(o) {\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n if (typeof o.valueOf === 'function') {\n o = o.valueOf();\n if (o === false || o === null || o === undefined) {\n return 0;\n }\n }\n if (o === true) {\n return 1;\n }\n var type = typeof o;\n if (type === 'number') {\n if (o !== o || o === Infinity) {\n return 0;\n }\n var h = o | 0;\n if (h !== o) {\n h ^= o * 0xFFFFFFFF;\n }\n while (o > 0xFFFFFFFF) {\n o /= 0xFFFFFFFF;\n h ^= o;\n }\n return smi(h);\n }\n if (type === 'string') {\n return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);\n }\n if (typeof o.hashCode === 'function') {\n return o.hashCode();\n }\n if (type === 'object') {\n return hashJSObj(o);\n }\n if (typeof o.toString === 'function') {\n return hashString(o.toString());\n }\n throw new Error('Value type ' + type + ' cannot be hashed.');\n }\n function cachedHashString(string) {\n var hash = stringHashCache[string];\n if (hash === undefined) {\n hash = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hash;\n }\n return hash;\n }\n\n // http://jsperf.com/hashing-strings\n function hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hash = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hash = 31 * hash + string.charCodeAt(ii) | 0;\n }\n return smi(hash);\n }\n function hashJSObj(obj) {\n var hash;\n if (usingWeakMap) {\n hash = weakMap.get(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n hash = obj[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n if (!canDefineProperty) {\n hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hash !== undefined) {\n return hash;\n }\n hash = getIENodeHash(obj);\n if (hash !== undefined) {\n return hash;\n }\n }\n hash = ++objHashUID;\n if (objHashUID & 0x40000000) {\n objHashUID = 0;\n }\n if (usingWeakMap) {\n weakMap.set(obj, hash);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n 'enumerable': false,\n 'configurable': false,\n 'writable': false,\n 'value': hash\n });\n } else if (obj.propertyIsEnumerable !== undefined && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function () {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hash;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hash;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n return hash;\n }\n\n // Get references to ES5 object methods.\n var isExtensible = Object.isExtensible;\n\n // True if Object.defineProperty works as expected. IE8 fails this test.\n var canDefineProperty = function () {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n }();\n\n // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n // and avoid memory leaks from the IE cloneNode bug.\n function getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1:\n // Element\n return node.uniqueID;\n case 9:\n // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n }\n\n // If possible, use a WeakMap.\n var usingWeakMap = typeof WeakMap === 'function';\n var weakMap;\n if (usingWeakMap) {\n weakMap = new WeakMap();\n }\n var objHashUID = 0;\n var UID_HASH_KEY = '__immutablehash__';\n if (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n }\n var STRING_HASH_CACHE_MIN_STRLEN = 16;\n var STRING_HASH_CACHE_MAX_SIZE = 255;\n var STRING_HASH_CACHE_SIZE = 0;\n var stringHashCache = {};\n function assertNotInfinite(size) {\n invariant(size !== Infinity, 'Cannot perform this action with an infinite size.');\n }\n createClass(Map, KeyedCollection);\n\n // @pragma Construction\n\n function Map(value) {\n return value === null || value === undefined ? emptyMap() : isMap(value) && !isOrdered(value) ? value : emptyMap().withMutations(function (map) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) {\n return map.set(k, v);\n });\n });\n }\n Map.of = function () {\n var keyValues = SLICE$0.call(arguments, 0);\n return emptyMap().withMutations(function (map) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n Map.prototype.toString = function () {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function (k, notSetValue) {\n return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function (k, v) {\n return updateMap(this, k, v);\n };\n Map.prototype.setIn = function (keyPath, v) {\n return this.updateIn(keyPath, NOT_SET, function () {\n return v;\n });\n };\n Map.prototype.remove = function (k) {\n return updateMap(this, k, NOT_SET);\n };\n Map.prototype.deleteIn = function (keyPath) {\n return this.updateIn(keyPath, function () {\n return NOT_SET;\n });\n };\n Map.prototype.update = function (k, notSetValue, updater) {\n return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater);\n };\n Map.prototype.updateIn = function (keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeepMap(this, forceIterator(keyPath), notSetValue, updater);\n return updatedValue === NOT_SET ? undefined : updatedValue;\n };\n Map.prototype.clear = function () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.merge = function /*...iters*/\n () {\n return mergeIntoMapWith(this, undefined, arguments);\n };\n Map.prototype.mergeWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, merger, iters);\n };\n Map.prototype.mergeIn = function (keyPath) {\n var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(keyPath, emptyMap(), function (m) {\n return typeof m.merge === 'function' ? m.merge.apply(m, iters) : iters[iters.length - 1];\n });\n };\n Map.prototype.mergeDeep = function /*...iters*/\n () {\n return mergeIntoMapWith(this, deepMerger, arguments);\n };\n Map.prototype.mergeDeepWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return mergeIntoMapWith(this, deepMergerWith(merger), iters);\n };\n Map.prototype.mergeDeepIn = function (keyPath) {\n var iters = SLICE$0.call(arguments, 1);\n return this.updateIn(keyPath, emptyMap(), function (m) {\n return typeof m.mergeDeep === 'function' ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1];\n });\n };\n Map.prototype.sort = function (comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n Map.prototype.sortBy = function (mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n // @pragma Mutability\n\n Map.prototype.withMutations = function (fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n };\n Map.prototype.asMutable = function () {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n };\n Map.prototype.asImmutable = function () {\n return this.__ensureOwner();\n };\n Map.prototype.wasAltered = function () {\n return this.__altered;\n };\n Map.prototype.__iterator = function (type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n Map.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n var iterations = 0;\n this._root && this._root.iterate(function (entry) {\n iterations++;\n return fn(entry[1], entry[0], this$0);\n }, reverse);\n return iterations;\n };\n Map.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n function isMap(maybeMap) {\n return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);\n }\n Map.isMap = isMap;\n var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\n var MapPrototype = Map.prototype;\n MapPrototype[IS_MAP_SENTINEL] = true;\n MapPrototype[DELETE] = MapPrototype.remove;\n MapPrototype.removeIn = MapPrototype.deleteIn;\n\n // #pragma Trie Nodes\n\n function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n }\n ArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n ArrayMapNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n if (removed && entries.length === 1) {\n return; // undefined\n }\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop();\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n return new ArrayMapNode(ownerID, newEntries);\n };\n function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n }\n BitmapIndexedNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & bit - 1)].get(shift + SHIFT, keyHash, key, notSetValue);\n };\n BitmapIndexedNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n if (!exists && value === NOT_SET) {\n return this;\n }\n var idx = popCount(bitmap & bit - 1);\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n };\n function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n }\n HashArrayMapNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n };\n HashArrayMapNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n if (removed && !node) {\n return this;\n }\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setIn(nodes, idx, newNode, isEditable);\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n };\n function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n }\n HashCollisionNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n };\n HashCollisionNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var removed = value === NOT_SET;\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n var entries = this.entries;\n var idx = 0;\n for (var len = entries.length; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop();\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n };\n function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n }\n ValueNode.prototype.get = function (shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n };\n ValueNode.prototype.update = function (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n SetRef(didAlter);\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n };\n\n // #pragma Iterators\n\n ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n };\n BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n };\n ValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n };\n createClass(MapIterator, Iterator);\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n MapIterator.prototype.next = function () {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n function mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n }\n function mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n }\n function makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n var EMPTY_MAP;\n function emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n }\n function updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef(CHANGE_LENGTH);\n var didAlter = MakeRef(DID_ALTER);\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n }\n function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n }\n function isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n }\n function mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var newNode;\n var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : (newNode = new ValueNode(ownerID, keyHash, entry), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n return new BitmapIndexedNode(ownerID, 1 << idx1 | 1 << idx2, nodes);\n }\n function createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n }\n function packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n }\n function expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n }\n function mergeIntoMapWith(map, merger, iterables) {\n var iters = [];\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = KeyedIterable(value);\n if (!isIterable(value)) {\n iter = iter.map(function (v) {\n return fromJS(v);\n });\n }\n iters.push(iter);\n }\n return mergeIntoCollectionWith(map, merger, iters);\n }\n function deepMerger(existing, value, key) {\n return existing && existing.mergeDeep && isIterable(value) ? existing.mergeDeep(value) : is(existing, value) ? existing : value;\n }\n function deepMergerWith(merger) {\n return function (existing, value, key) {\n if (existing && existing.mergeDeepWith && isIterable(value)) {\n return existing.mergeDeepWith(merger, value);\n }\n var nextValue = merger(existing, value, key);\n return is(existing, nextValue) ? existing : nextValue;\n };\n }\n function mergeIntoCollectionWith(collection, merger, iters) {\n iters = iters.filter(function (x) {\n return x.size !== 0;\n });\n if (iters.length === 0) {\n return collection;\n }\n if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function (collection) {\n var mergeIntoMap = merger ? function (value, key) {\n collection.update(key, NOT_SET, function (existing) {\n return existing === NOT_SET ? value : merger(existing, value, key);\n });\n } : function (value, key) {\n collection.set(key, value);\n };\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoMap);\n }\n });\n }\n function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {\n var isNotSet = existing === NOT_SET;\n var step = keyPathIter.next();\n if (step.done) {\n var existingValue = isNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n invariant(isNotSet || existing && existing.set, 'invalid keyPath');\n var key = step.value;\n var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);\n var nextUpdated = updateInDeepMap(nextExisting, keyPathIter, notSetValue, updater);\n return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated);\n }\n function popCount(x) {\n x = x - (x >> 1 & 0x55555555);\n x = (x & 0x33333333) + (x >> 2 & 0x33333333);\n x = x + (x >> 4) & 0x0f0f0f0f;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return x & 0x7f;\n }\n function setIn(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n }\n function spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n }\n function spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n }\n var MAX_ARRAY_MAP_SIZE = SIZE / 4;\n var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\n var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n createClass(List, IndexedCollection);\n\n // @pragma Construction\n\n function List(value) {\n var empty = emptyList();\n if (value === null || value === undefined) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedIterable(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function (list) {\n list.setSize(size);\n iter.forEach(function (v, i) {\n return list.set(i, v);\n });\n });\n }\n List.of = function /*...values*/\n () {\n return this(arguments);\n };\n List.prototype.toString = function () {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function (index, value) {\n return updateList(this, index, value);\n };\n List.prototype.remove = function (index) {\n return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1);\n };\n List.prototype.insert = function (index, value) {\n return this.splice(index, 0, value);\n };\n List.prototype.clear = function () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n List.prototype.push = function /*...values*/\n () {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function (list) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n List.prototype.pop = function () {\n return setListBounds(this, 0, -1);\n };\n List.prototype.unshift = function /*...values*/\n () {\n var values = arguments;\n return this.withMutations(function (list) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n List.prototype.shift = function () {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.merge = function /*...iters*/\n () {\n return mergeIntoListWith(this, undefined, arguments);\n };\n List.prototype.mergeWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, merger, iters);\n };\n List.prototype.mergeDeep = function /*...iters*/\n () {\n return mergeIntoListWith(this, deepMerger, arguments);\n };\n List.prototype.mergeDeepWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return mergeIntoListWith(this, deepMergerWith(merger), iters);\n };\n List.prototype.setSize = function (size) {\n return setListBounds(this, 0, size);\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function (begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));\n };\n List.prototype.__iterator = function (type, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n return new Iterator(function () {\n var value = values();\n return value === DONE ? iteratorDone() : iteratorValue(type, index++, value);\n });\n };\n List.prototype.__iterate = function (fn, reverse) {\n var index = 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, index++, this) === false) {\n break;\n }\n }\n return index;\n };\n List.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n function isList(maybeList) {\n return !!(maybeList && maybeList[IS_LIST_SENTINEL]);\n }\n List.isList = isList;\n var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\n var ListPrototype = List.prototype;\n ListPrototype[IS_LIST_SENTINEL] = true;\n ListPrototype[DELETE] = ListPrototype.remove;\n ListPrototype.setIn = MapPrototype.setIn;\n ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn;\n ListPrototype.update = MapPrototype.update;\n ListPrototype.updateIn = MapPrototype.updateIn;\n ListPrototype.mergeIn = MapPrototype.mergeIn;\n ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n ListPrototype.withMutations = MapPrototype.withMutations;\n ListPrototype.asMutable = MapPrototype.asMutable;\n ListPrototype.asImmutable = MapPrototype.asImmutable;\n ListPrototype.wasAltered = MapPrototype.wasAltered;\n function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n }\n\n // TODO: seems like these methods are very similar\n\n VNode.prototype.removeBefore = function (ownerID, level, index) {\n if (index === level ? 1 << level : 0 || this.array.length === 0) {\n return this;\n }\n var originIndex = index >>> level & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n };\n VNode.prototype.removeAfter = function (ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = index - 1 >>> level & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n };\n var DONE = {};\n function iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n return iterateNodeOrLeaf(list._root, list._level, 0);\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset);\n }\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : left - offset >> level;\n var to = (right - offset >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n do {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level));\n } while (true);\n };\n }\n }\n function makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n }\n var EMPTY_LIST;\n function emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n }\n function updateList(list, index, value) {\n index = wrapIndex(list, index);\n if (index !== index) {\n return list;\n }\n if (index >= list.size || index < 0) {\n return list.withMutations(function (list) {\n index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);\n });\n }\n index += list._origin;\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef(DID_ALTER);\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n if (!didAlter.value) {\n return list;\n }\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n }\n function updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = index >>> level & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n var newNode;\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n SetRef(didAlter);\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n }\n function editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n }\n function listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << list._level + SHIFT) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[rawIndex >>> level & MASK];\n level -= SHIFT;\n }\n return node;\n }\n }\n function setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n end = end | 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << newLevel + SHIFT) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = oldTailOffset >>> level & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[oldTailOffset >>> SHIFT & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = newOrigin >>> newLevel & MASK;\n if (beginIndex !== newTailOffset >>> newLevel & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n }\n function mergeIntoListWith(list, merger, iterables) {\n var iters = [];\n var maxSize = 0;\n for (var ii = 0; ii < iterables.length; ii++) {\n var value = iterables[ii];\n var iter = IndexedIterable(value);\n if (iter.size > maxSize) {\n maxSize = iter.size;\n }\n if (!isIterable(value)) {\n iter = iter.map(function (v) {\n return fromJS(v);\n });\n }\n iters.push(iter);\n }\n if (maxSize > list.size) {\n list = list.setSize(maxSize);\n }\n return mergeIntoCollectionWith(list, merger, iters);\n }\n function getTailOffset(size) {\n return size < SIZE ? 0 : size - 1 >>> SHIFT << SHIFT;\n }\n createClass(OrderedMap, Map);\n\n // @pragma Construction\n\n function OrderedMap(value) {\n return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations(function (map) {\n var iter = KeyedIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) {\n return map.set(k, v);\n });\n });\n }\n OrderedMap.of = function /*...values*/\n () {\n return this(arguments);\n };\n OrderedMap.prototype.toString = function () {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function (k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n return this;\n }\n return emptyOrderedMap();\n };\n OrderedMap.prototype.set = function (k, v) {\n return updateOrderedMap(this, k, v);\n };\n OrderedMap.prototype.remove = function (k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n OrderedMap.prototype.wasAltered = function () {\n return this._map.wasAltered() || this._list.wasAltered();\n };\n OrderedMap.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return this._list.__iterate(function (entry) {\n return entry && fn(entry[1], entry[0], this$0);\n }, reverse);\n };\n OrderedMap.prototype.__iterator = function (type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n OrderedMap.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n function isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n }\n OrderedMap.isOrderedMap = isOrderedMap;\n OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;\n OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n function makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n return omap;\n }\n var EMPTY_ORDERED_MAP;\n function emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n }\n function updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) {\n // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function (entry, idx) {\n return entry !== undefined && i !== idx;\n });\n newMap = newList.toKeyedSeq().map(function (entry) {\n return entry[0];\n }).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else {\n if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n }\n createClass(ToKeyedSequence, KeyedSeq);\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n ToKeyedSequence.prototype.get = function (key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n ToKeyedSequence.prototype.has = function (key) {\n return this._iter.has(key);\n };\n ToKeyedSequence.prototype.valueSeq = function () {\n return this._iter.valueSeq();\n };\n ToKeyedSequence.prototype.reverse = function () {\n var this$0 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function () {\n return this$0._iter.toSeq().reverse();\n };\n }\n return reversedSequence;\n };\n ToKeyedSequence.prototype.map = function (mapper, context) {\n var this$0 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function () {\n return this$0._iter.toSeq().map(mapper, context);\n };\n }\n return mappedSequence;\n };\n ToKeyedSequence.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n var ii;\n return this._iter.__iterate(this._useKeys ? function (v, k) {\n return fn(v, k, this$0);\n } : (ii = reverse ? resolveSize(this) : 0, function (v) {\n return fn(v, reverse ? --ii : ii++, this$0);\n }), reverse);\n };\n ToKeyedSequence.prototype.__iterator = function (type, reverse) {\n if (this._useKeys) {\n return this._iter.__iterator(type, reverse);\n }\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var ii = reverse ? resolveSize(this) : 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step);\n });\n };\n ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;\n createClass(ToIndexedSequence, IndexedSeq);\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n ToIndexedSequence.prototype.includes = function (value) {\n return this._iter.includes(value);\n };\n ToIndexedSequence.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n var iterations = 0;\n return this._iter.__iterate(function (v) {\n return fn(v, iterations++, this$0);\n }, reverse);\n };\n ToIndexedSequence.prototype.__iterator = function (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value, step);\n });\n };\n createClass(ToSetSequence, SetSeq);\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n ToSetSequence.prototype.has = function (key) {\n return this._iter.includes(key);\n };\n ToSetSequence.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return this._iter.__iterate(function (v) {\n return fn(v, v, this$0);\n }, reverse);\n };\n ToSetSequence.prototype.__iterator = function (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, step.value, step.value, step);\n });\n };\n createClass(FromEntriesSequence, KeyedSeq);\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n FromEntriesSequence.prototype.entrySeq = function () {\n return this._iter.toSeq();\n };\n FromEntriesSequence.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return this._iter.__iterate(function (entry) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return fn(indexedIterable ? entry.get(1) : entry[1], indexedIterable ? entry.get(0) : entry[0], this$0);\n }\n }, reverse);\n };\n FromEntriesSequence.prototype.__iterator = function (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedIterable = isIterable(entry);\n return iteratorValue(type, indexedIterable ? entry.get(0) : entry[0], indexedIterable ? entry.get(1) : entry[1], step);\n }\n }\n });\n };\n ToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;\n function flipFactory(iterable) {\n var flipSequence = makeSequence(iterable);\n flipSequence._iter = iterable;\n flipSequence.size = iterable.size;\n flipSequence.flip = function () {\n return iterable;\n };\n flipSequence.reverse = function () {\n var reversedSequence = iterable.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function () {\n return iterable.reverse();\n };\n return reversedSequence;\n };\n flipSequence.has = function (key) {\n return iterable.includes(key);\n };\n flipSequence.includes = function (key) {\n return iterable.has(key);\n };\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n return iterable.__iterate(function (v, k) {\n return fn(k, v, this$0) !== false;\n }, reverse);\n };\n flipSequence.__iteratorUncached = function (type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = iterable.__iterator(type, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return iterable.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);\n };\n return flipSequence;\n }\n function mapFactory(iterable, mapper, context) {\n var mappedSequence = makeSequence(iterable);\n mappedSequence.size = iterable.size;\n mappedSequence.has = function (key) {\n return iterable.has(key);\n };\n mappedSequence.get = function (key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n return iterable.__iterate(function (v, k, c) {\n return fn(mapper.call(context, v, k, c), k, this$0) !== false;\n }, reverse);\n };\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(type, key, mapper.call(context, entry[1], key, iterable), step);\n });\n };\n return mappedSequence;\n }\n function reverseFactory(iterable, useKeys) {\n var reversedSequence = makeSequence(iterable);\n reversedSequence._iter = iterable;\n reversedSequence.size = iterable.size;\n reversedSequence.reverse = function () {\n return iterable;\n };\n if (iterable.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(iterable);\n flipSequence.reverse = function () {\n return iterable.flip();\n };\n return flipSequence;\n };\n }\n reversedSequence.get = function (key, notSetValue) {\n return iterable.get(useKeys ? key : -1 - key, notSetValue);\n };\n reversedSequence.has = function (key) {\n return iterable.has(useKeys ? key : -1 - key);\n };\n reversedSequence.includes = function (value) {\n return iterable.includes(value);\n };\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {\n var this$0 = this;\n return iterable.__iterate(function (v, k) {\n return fn(v, k, this$0);\n }, !reverse);\n };\n reversedSequence.__iterator = function (type, reverse) {\n return iterable.__iterator(type, !reverse);\n };\n return reversedSequence;\n }\n function filterFactory(iterable, predicate, context, useKeys) {\n var filterSequence = makeSequence(iterable);\n if (useKeys) {\n filterSequence.has = function (key) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, iterable);\n };\n filterSequence.get = function (key, notSetValue) {\n var v = iterable.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, iterable)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n };\n return filterSequence;\n }\n function countByFactory(iterable, grouper, context) {\n var groups = Map().asMutable();\n iterable.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, iterable), 0, function (a) {\n return a + 1;\n });\n });\n return groups.asImmutable();\n }\n function groupByFactory(iterable, grouper, context) {\n var isKeyedIter = isKeyed(iterable);\n var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();\n iterable.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, iterable), function (a) {\n return a = a || [], a.push(isKeyedIter ? [k, v] : v), a;\n });\n });\n var coerce = iterableClass(iterable);\n return groups.map(function (arr) {\n return reify(iterable, coerce(arr));\n });\n }\n function sliceFactory(iterable, begin, end, useKeys) {\n var originalSize = iterable.size;\n\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin = begin | 0;\n }\n if (end !== undefined) {\n if (end === Infinity) {\n end = originalSize;\n } else {\n end = end | 0;\n }\n }\n if (wholeSlice(begin, end, originalSize)) {\n return iterable;\n }\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this iterable's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n var sliceSeq = makeSequence(iterable);\n\n // If iterable.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;\n if (!useKeys && isSeq(iterable) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ? iterable.get(index + resolvedBegin, notSetValue) : notSetValue;\n };\n }\n sliceSeq.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function (v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0) !== false && iterations !== sliceSize;\n }\n });\n return iterations;\n };\n sliceSeq.__iteratorUncached = function (type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function () {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n } else {\n return iteratorValue(type, iterations - 1, step.value[1], step);\n }\n });\n };\n return sliceSeq;\n }\n function takeWhileFactory(iterable, predicate, context) {\n var takeSequence = makeSequence(iterable);\n takeSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n iterable.__iterate(function (v, k, c) {\n return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0);\n });\n return iterations;\n };\n takeSequence.__iteratorUncached = function (type, reverse) {\n var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function () {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$0)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n }\n function skipWhileFactory(iterable, predicate, context, useKeys) {\n var skipSequence = makeSequence(iterable);\n skipSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n iterable.__iterate(function (v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$0);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function (type, reverse) {\n var this$0 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function () {\n var step, k, v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n } else if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n } else {\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$0));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n }\n function concatFactory(iterable, values) {\n var isKeyedIterable = isKeyed(iterable);\n var iters = [iterable].concat(values).map(function (v) {\n if (!isIterable(v)) {\n v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedIterable) {\n v = KeyedIterable(v);\n }\n return v;\n }).filter(function (v) {\n return v.size !== 0;\n });\n if (iters.length === 0) {\n return iterable;\n }\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) {\n return singleton;\n }\n }\n var concatSeq = new ArraySeq(iters);\n if (isKeyedIterable) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(iterable)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(function (sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n }, 0);\n return concatSeq;\n }\n function flattenFactory(iterable, depth, useKeys) {\n var flatSequence = makeSequence(iterable);\n flatSequence.__iterateUncached = function (fn, reverse) {\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {\n var this$0 = this;\n iter.__iterate(function (v, k) {\n if ((!depth || currentDepth < depth) && isIterable(v)) {\n flatDeep(v, currentDepth + 1);\n } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {\n stopped = true;\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(iterable, 0);\n return iterations;\n };\n flatSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function () {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isIterable(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n };\n return flatSequence;\n }\n function flatMapFactory(iterable, mapper, context) {\n var coerce = iterableClass(iterable);\n return iterable.toSeq().map(function (v, k) {\n return coerce(mapper.call(context, v, k, iterable));\n }).flatten(true);\n }\n function interposeFactory(iterable, separator) {\n var interposedSequence = makeSequence(iterable);\n interposedSequence.size = iterable.size && iterable.size * 2 - 1;\n interposedSequence.__iterateUncached = function (fn, reverse) {\n var this$0 = this;\n var iterations = 0;\n iterable.__iterate(function (v, k) {\n return (!iterations || fn(separator, iterations++, this$0) !== false) && fn(v, iterations++, this$0) !== false;\n }, reverse);\n return iterations;\n };\n interposedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = iterable.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function () {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n }\n function sortFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedIterable = isKeyed(iterable);\n var index = 0;\n var entries = iterable.toSeq().map(function (v, k) {\n return [k, v, index++, mapper ? mapper(v, k, iterable) : v];\n }).toArray();\n entries.sort(function (a, b) {\n return comparator(a[3], b[3]) || a[2] - b[2];\n }).forEach(isKeyedIterable ? function (v, i) {\n entries[i].length = 2;\n } : function (v, i) {\n entries[i] = v[1];\n });\n return isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries);\n }\n function maxFactory(iterable, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = iterable.toSeq().map(function (v, k) {\n return [v, mapper(v, k, iterable)];\n }).reduce(function (a, b) {\n return maxCompare(comparator, a[1], b[1]) ? b : a;\n });\n return entry && entry[0];\n } else {\n return iterable.reduce(function (a, b) {\n return maxCompare(comparator, a, b) ? b : a;\n });\n }\n }\n function maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return comp === 0 && b !== a && (b === undefined || b === null || b !== b) || comp > 0;\n }\n function zipWithFactory(keyIter, zipper, iters) {\n var zipSequence = makeSequence(keyIter);\n zipSequence.size = new ArraySeq(iters).map(function (i) {\n return i.size;\n }).min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function (fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function (type, reverse) {\n var iterators = iters.map(function (i) {\n return i = Iterable(i), getIterator(reverse ? i.reverse() : i);\n });\n var iterations = 0;\n var isDone = false;\n return new Iterator(function () {\n var steps;\n if (!isDone) {\n steps = iterators.map(function (i) {\n return i.next();\n });\n isDone = steps.some(function (s) {\n return s.done;\n });\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(type, iterations++, zipper.apply(null, steps.map(function (s) {\n return s.value;\n })));\n });\n };\n return zipSequence;\n }\n\n // #pragma Helper Functions\n\n function reify(iter, seq) {\n return isSeq(iter) ? seq : iter.constructor(seq);\n }\n function validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n }\n function resolveSize(iter) {\n assertNotInfinite(iter.size);\n return ensureSize(iter);\n }\n function iterableClass(iterable) {\n return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable;\n }\n function makeSequence(iterable) {\n return Object.create((isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq).prototype);\n }\n function cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n } else {\n return Seq.prototype.cacheResult.call(this);\n }\n }\n function defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n function forceIterator(keyPath) {\n var iter = getIterator(keyPath);\n if (!iter) {\n // Array might not be iterable in this environment, so we need a fallback\n // to our wrapped type.\n if (!isArrayLike(keyPath)) {\n throw new TypeError('Expected iterable or array-like: ' + keyPath);\n }\n iter = getIterator(Iterable(keyPath));\n }\n return iter;\n }\n createClass(Record, KeyedCollection);\n function Record(defaultValues, name) {\n var hasInitialized;\n var RecordType = function Record(values) {\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n setProps(RecordTypePrototype, keys);\n RecordTypePrototype.size = keys.length;\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n }\n this._map = Map(values);\n };\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n return RecordType;\n }\n Record.prototype.toString = function () {\n return this.__toString(recordName(this) + ' {', '}');\n };\n\n // @pragma Access\n\n Record.prototype.has = function (k) {\n return this._defaultValues.hasOwnProperty(k);\n };\n Record.prototype.get = function (k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var defaultVal = this._defaultValues[k];\n return this._map ? this._map.get(k, defaultVal) : defaultVal;\n };\n\n // @pragma Modification\n\n Record.prototype.clear = function () {\n if (this.__ownerID) {\n this._map && this._map.clear();\n return this;\n }\n var RecordType = this.constructor;\n return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));\n };\n Record.prototype.set = function (k, v) {\n if (!this.has(k)) {\n throw new Error('Cannot set unknown key \"' + k + '\" on ' + recordName(this));\n }\n if (this._map && !this._map.has(k)) {\n var defaultVal = this._defaultValues[k];\n if (v === defaultVal) {\n return this;\n }\n }\n var newMap = this._map && this._map.set(k, v);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n Record.prototype.remove = function (k) {\n if (!this.has(k)) {\n return this;\n }\n var newMap = this._map && this._map.remove(k);\n if (this.__ownerID || newMap === this._map) {\n return this;\n }\n return makeRecord(this, newMap);\n };\n Record.prototype.wasAltered = function () {\n return this._map.wasAltered();\n };\n Record.prototype.__iterator = function (type, reverse) {\n var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function (_, k) {\n return this$0.get(k);\n }).__iterator(type, reverse);\n };\n Record.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return KeyedIterable(this._defaultValues).map(function (_, k) {\n return this$0.get(k);\n }).__iterate(fn, reverse);\n };\n Record.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map && this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return makeRecord(this, newMap, ownerID);\n };\n var RecordPrototype = Record.prototype;\n RecordPrototype[DELETE] = RecordPrototype.remove;\n RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn;\n RecordPrototype.merge = MapPrototype.merge;\n RecordPrototype.mergeWith = MapPrototype.mergeWith;\n RecordPrototype.mergeIn = MapPrototype.mergeIn;\n RecordPrototype.mergeDeep = MapPrototype.mergeDeep;\n RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;\n RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;\n RecordPrototype.setIn = MapPrototype.setIn;\n RecordPrototype.update = MapPrototype.update;\n RecordPrototype.updateIn = MapPrototype.updateIn;\n RecordPrototype.withMutations = MapPrototype.withMutations;\n RecordPrototype.asMutable = MapPrototype.asMutable;\n RecordPrototype.asImmutable = MapPrototype.asImmutable;\n function makeRecord(likeRecord, map, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._map = map;\n record.__ownerID = ownerID;\n return record;\n }\n function recordName(record) {\n return record._name || record.constructor.name || 'Record';\n }\n function setProps(prototype, names) {\n try {\n names.forEach(setProp.bind(undefined, prototype));\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n }\n function setProp(prototype, name) {\n Object.defineProperty(prototype, name, {\n get: function () {\n return this.get(name);\n },\n set: function (value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n }\n createClass(Set, SetCollection);\n\n // @pragma Construction\n\n function Set(value) {\n return value === null || value === undefined ? emptySet() : isSet(value) && !isOrdered(value) ? value : emptySet().withMutations(function (set) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) {\n return set.add(v);\n });\n });\n }\n Set.of = function /*...values*/\n () {\n return this(arguments);\n };\n Set.fromKeys = function (value) {\n return this(KeyedIterable(value).keySeq());\n };\n Set.prototype.toString = function () {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function (value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function (value) {\n return updateSet(this, this._map.set(value, true));\n };\n Set.prototype.remove = function (value) {\n return updateSet(this, this._map.remove(value));\n };\n Set.prototype.clear = function () {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.union = function () {\n var iters = SLICE$0.call(arguments, 0);\n iters = iters.filter(function (x) {\n return x.size !== 0;\n });\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function (set) {\n for (var ii = 0; ii < iters.length; ii++) {\n SetIterable(iters[ii]).forEach(function (value) {\n return set.add(value);\n });\n }\n });\n };\n Set.prototype.intersect = function () {\n var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) {\n return SetIterable(iter);\n });\n var originalSet = this;\n return this.withMutations(function (set) {\n originalSet.forEach(function (value) {\n if (!iters.every(function (iter) {\n return iter.includes(value);\n })) {\n set.remove(value);\n }\n });\n });\n };\n Set.prototype.subtract = function () {\n var iters = SLICE$0.call(arguments, 0);\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) {\n return SetIterable(iter);\n });\n var originalSet = this;\n return this.withMutations(function (set) {\n originalSet.forEach(function (value) {\n if (iters.some(function (iter) {\n return iter.includes(value);\n })) {\n set.remove(value);\n }\n });\n });\n };\n Set.prototype.merge = function () {\n return this.union.apply(this, arguments);\n };\n Set.prototype.mergeWith = function (merger) {\n var iters = SLICE$0.call(arguments, 1);\n return this.union.apply(this, iters);\n };\n Set.prototype.sort = function (comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n Set.prototype.sortBy = function (mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n Set.prototype.wasAltered = function () {\n return this._map.wasAltered();\n };\n Set.prototype.__iterate = function (fn, reverse) {\n var this$0 = this;\n return this._map.__iterate(function (_, k) {\n return fn(k, k, this$0);\n }, reverse);\n };\n Set.prototype.__iterator = function (type, reverse) {\n return this._map.map(function (_, k) {\n return k;\n }).__iterator(type, reverse);\n };\n Set.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n function isSet(maybeSet) {\n return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);\n }\n Set.isSet = isSet;\n var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\n var SetPrototype = Set.prototype;\n SetPrototype[IS_SET_SENTINEL] = true;\n SetPrototype[DELETE] = SetPrototype.remove;\n SetPrototype.mergeDeep = SetPrototype.merge;\n SetPrototype.mergeDeepWith = SetPrototype.mergeWith;\n SetPrototype.withMutations = MapPrototype.withMutations;\n SetPrototype.asMutable = MapPrototype.asMutable;\n SetPrototype.asImmutable = MapPrototype.asImmutable;\n SetPrototype.__empty = emptySet;\n SetPrototype.__make = makeSet;\n function updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap);\n }\n function makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n var EMPTY_SET;\n function emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n }\n createClass(OrderedSet, Set);\n\n // @pragma Construction\n\n function OrderedSet(value) {\n return value === null || value === undefined ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations(function (set) {\n var iter = SetIterable(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) {\n return set.add(v);\n });\n });\n }\n OrderedSet.of = function /*...values*/\n () {\n return this(arguments);\n };\n OrderedSet.fromKeys = function (value) {\n return this(KeyedIterable(value).keySeq());\n };\n OrderedSet.prototype.toString = function () {\n return this.__toString('OrderedSet {', '}');\n };\n function isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n }\n OrderedSet.isOrderedSet = isOrderedSet;\n var OrderedSetPrototype = OrderedSet.prototype;\n OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;\n OrderedSetPrototype.__empty = emptyOrderedSet;\n OrderedSetPrototype.__make = makeOrderedSet;\n function makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n }\n var EMPTY_ORDERED_SET;\n function emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n }\n createClass(Stack, IndexedCollection);\n\n // @pragma Construction\n\n function Stack(value) {\n return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value);\n }\n Stack.of = function /*...values*/\n () {\n return this(arguments);\n };\n Stack.prototype.toString = function () {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function (index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n Stack.prototype.peek = function () {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function /*...values*/\n () {\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n Stack.prototype.pushAll = function (iter) {\n iter = IndexedIterable(iter);\n if (iter.size === 0) {\n return this;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.reverse().forEach(function (value) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n });\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n Stack.prototype.pop = function () {\n return this.slice(1);\n };\n Stack.prototype.unshift = function /*...values*/\n () {\n return this.push.apply(this, arguments);\n };\n Stack.prototype.unshiftAll = function (iter) {\n return this.pushAll(iter);\n };\n Stack.prototype.shift = function () {\n return this.pop.apply(this, arguments);\n };\n Stack.prototype.clear = function () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n Stack.prototype.slice = function (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function (fn, reverse) {\n if (reverse) {\n return this.reverse().__iterate(fn);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n Stack.prototype.__iterator = function (type, reverse) {\n if (reverse) {\n return this.reverse().__iterator(type);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function () {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n function isStack(maybeStack) {\n return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);\n }\n Stack.isStack = isStack;\n var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n var StackPrototype = Stack.prototype;\n StackPrototype[IS_STACK_SENTINEL] = true;\n StackPrototype.withMutations = MapPrototype.withMutations;\n StackPrototype.asMutable = MapPrototype.asMutable;\n StackPrototype.asImmutable = MapPrototype.asImmutable;\n StackPrototype.wasAltered = MapPrototype.wasAltered;\n function makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n }\n var EMPTY_STACK;\n function emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n }\n\n /**\n * Contributes additional methods to a constructor\n */\n function mixin(ctor, methods) {\n var keyCopier = function (key) {\n ctor.prototype[key] = methods[key];\n };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n }\n Iterable.Iterator = Iterator;\n mixin(Iterable, {\n // ### Conversion to other types\n\n toArray: function () {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n this.valueSeq().__iterate(function (v, i) {\n array[i] = v;\n });\n return array;\n },\n toIndexedSeq: function () {\n return new ToIndexedSequence(this);\n },\n toJS: function () {\n return this.toSeq().map(function (value) {\n return value && typeof value.toJS === 'function' ? value.toJS() : value;\n }).__toJS();\n },\n toJSON: function () {\n return this.toSeq().map(function (value) {\n return value && typeof value.toJSON === 'function' ? value.toJSON() : value;\n }).__toJS();\n },\n toKeyedSeq: function () {\n return new ToKeyedSequence(this, true);\n },\n toMap: function () {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n toObject: function () {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function (v, k) {\n object[k] = v;\n });\n return object;\n },\n toOrderedMap: function () {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n toOrderedSet: function () {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n toSet: function () {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n toSetSeq: function () {\n return new ToSetSequence(this);\n },\n toSeq: function () {\n return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();\n },\n toStack: function () {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n toList: function () {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n // ### Common JavaScript methods and properties\n\n toString: function () {\n return '[Iterable]';\n },\n __toString: function (head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function () {\n var values = SLICE$0.call(arguments, 0);\n return reify(this, concatFactory(this, values));\n },\n includes: function (searchValue) {\n return this.some(function (value) {\n return is(value, searchValue);\n });\n },\n entries: function () {\n return this.__iterator(ITERATE_ENTRIES);\n },\n every: function (predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function (v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n filter: function (predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n find: function (predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n forEach: function (sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n join: function (separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function (v) {\n isFirst ? isFirst = false : joined += separator;\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n keys: function () {\n return this.__iterator(ITERATE_KEYS);\n },\n map: function (mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n reduce: function (reducer, initialReduction, context) {\n assertNotInfinite(this.size);\n var reduction;\n var useFirst;\n if (arguments.length < 2) {\n useFirst = true;\n } else {\n reduction = initialReduction;\n }\n this.__iterate(function (v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n });\n return reduction;\n },\n reduceRight: function (reducer, initialReduction, context) {\n var reversed = this.toKeyedSeq().reverse();\n return reversed.reduce.apply(reversed, arguments);\n },\n reverse: function () {\n return reify(this, reverseFactory(this, true));\n },\n slice: function (begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n some: function (predicate, context) {\n return !this.every(not(predicate), context);\n },\n sort: function (comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n values: function () {\n return this.__iterator(ITERATE_VALUES);\n },\n // ### More sequential methods\n\n butLast: function () {\n return this.slice(0, -1);\n },\n isEmpty: function () {\n return this.size !== undefined ? this.size === 0 : !this.some(function () {\n return true;\n });\n },\n count: function (predicate, context) {\n return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);\n },\n countBy: function (grouper, context) {\n return countByFactory(this, grouper, context);\n },\n equals: function (other) {\n return deepEqual(this, other);\n },\n entrySeq: function () {\n var iterable = this;\n if (iterable._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(iterable._cache);\n }\n var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function () {\n return iterable.toSeq();\n };\n return entriesSequence;\n },\n filterNot: function (predicate, context) {\n return this.filter(not(predicate), context);\n },\n findEntry: function (predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n findKey: function (predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n findLast: function (predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n findLastEntry: function (predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);\n },\n findLastKey: function (predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n first: function () {\n return this.find(returnTrue);\n },\n flatMap: function (mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n flatten: function (depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n fromEntrySeq: function () {\n return new FromEntriesSequence(this);\n },\n get: function (searchKey, notSetValue) {\n return this.find(function (_, key) {\n return is(key, searchKey);\n }, undefined, notSetValue);\n },\n getIn: function (searchKeyPath, notSetValue) {\n var nested = this;\n // Note: in an ES6 environment, we would prefer:\n // for (var key of searchKeyPath) {\n var iter = forceIterator(searchKeyPath);\n var step;\n while (!(step = iter.next()).done) {\n var key = step.value;\n nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;\n if (nested === NOT_SET) {\n return notSetValue;\n }\n }\n return nested;\n },\n groupBy: function (grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n has: function (searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n hasIn: function (searchKeyPath) {\n return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;\n },\n isSubset: function (iter) {\n iter = typeof iter.includes === 'function' ? iter : Iterable(iter);\n return this.every(function (value) {\n return iter.includes(value);\n });\n },\n isSuperset: function (iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);\n return iter.isSubset(this);\n },\n keyOf: function (searchValue) {\n return this.findKey(function (value) {\n return is(value, searchValue);\n });\n },\n keySeq: function () {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n last: function () {\n return this.toSeq().reverse().first();\n },\n lastKeyOf: function (searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n max: function (comparator) {\n return maxFactory(this, comparator);\n },\n maxBy: function (mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n min: function (comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n minBy: function (mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n rest: function () {\n return this.slice(1);\n },\n skip: function (amount) {\n return this.slice(Math.max(0, amount));\n },\n skipLast: function (amount) {\n return reify(this, this.toSeq().reverse().skip(amount).reverse());\n },\n skipWhile: function (predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n skipUntil: function (predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n sortBy: function (mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n take: function (amount) {\n return this.slice(0, Math.max(0, amount));\n },\n takeLast: function (amount) {\n return reify(this, this.toSeq().reverse().take(amount).reverse());\n },\n takeWhile: function (predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n takeUntil: function (predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n valueSeq: function () {\n return this.toIndexedSeq();\n },\n // ### Hashable Object\n\n hashCode: function () {\n return this.__hash || (this.__hash = hashIterable(this));\n }\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n });\n\n // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\n // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\n // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';\n // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\n\n var IterablePrototype = Iterable.prototype;\n IterablePrototype[IS_ITERABLE_SENTINEL] = true;\n IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;\n IterablePrototype.__toJS = IterablePrototype.toArray;\n IterablePrototype.__toStringMapper = quoteString;\n IterablePrototype.inspect = IterablePrototype.toSource = function () {\n return this.toString();\n };\n IterablePrototype.chain = IterablePrototype.flatMap;\n IterablePrototype.contains = IterablePrototype.includes;\n mixin(KeyedIterable, {\n // ### More sequential methods\n\n flip: function () {\n return reify(this, flipFactory(this));\n },\n mapEntries: function (mapper, context) {\n var this$0 = this;\n var iterations = 0;\n return reify(this, this.toSeq().map(function (v, k) {\n return mapper.call(context, [k, v], iterations++, this$0);\n }).fromEntrySeq());\n },\n mapKeys: function (mapper, context) {\n var this$0 = this;\n return reify(this, this.toSeq().flip().map(function (k, v) {\n return mapper.call(context, k, v, this$0);\n }).flip());\n }\n });\n var KeyedIterablePrototype = KeyedIterable.prototype;\n KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;\n KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;\n KeyedIterablePrototype.__toJS = IterablePrototype.toObject;\n KeyedIterablePrototype.__toStringMapper = function (v, k) {\n return JSON.stringify(k) + ': ' + quoteString(v);\n };\n mixin(IndexedIterable, {\n // ### Conversion to other types\n\n toKeyedSeq: function () {\n return new ToKeyedSequence(this, false);\n },\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function (predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n findIndex: function (predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n indexOf: function (searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n lastIndexOf: function (searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n reverse: function () {\n return reify(this, reverseFactory(this, false));\n },\n slice: function (begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n splice: function (index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum | 0, 0);\n if (numArgs === 0 || numArgs === 2 && !removeNum) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));\n },\n // ### More collection methods\n\n findLastIndex: function (predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n first: function () {\n return this.get(0);\n },\n flatten: function (depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n get: function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index < 0 || this.size === Infinity || this.size !== undefined && index > this.size ? notSetValue : this.find(function (_, key) {\n return key === index;\n }, undefined, notSetValue);\n },\n has: function (index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1);\n },\n interpose: function (separator) {\n return reify(this, interposeFactory(this, separator));\n },\n interleave: function /*...iterables*/\n () {\n var iterables = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * iterables.length;\n }\n return reify(this, interleaved);\n },\n keySeq: function () {\n return Range(0, this.size);\n },\n last: function () {\n return this.get(-1);\n },\n skipWhile: function (predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n zip: function /*, ...iterables */\n () {\n var iterables = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, iterables));\n },\n zipWith: function (zipper /*, ...iterables */) {\n var iterables = arrCopy(arguments);\n iterables[0] = this;\n return reify(this, zipWithFactory(this, zipper, iterables));\n }\n });\n IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;\n IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;\n mixin(SetIterable, {\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function (value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n includes: function (value) {\n return this.has(value);\n },\n // ### More sequential methods\n\n keySeq: function () {\n return this.valueSeq();\n }\n });\n SetIterable.prototype.has = IterablePrototype.includes;\n SetIterable.prototype.contains = SetIterable.prototype.includes;\n\n // Mixin subclasses\n\n mixin(KeyedSeq, KeyedIterable.prototype);\n mixin(IndexedSeq, IndexedIterable.prototype);\n mixin(SetSeq, SetIterable.prototype);\n mixin(KeyedCollection, KeyedIterable.prototype);\n mixin(IndexedCollection, IndexedIterable.prototype);\n mixin(SetCollection, SetIterable.prototype);\n\n // #pragma Helper functions\n\n function keyMapper(v, k) {\n return k;\n }\n function entryMapper(v, k) {\n return [k, v];\n }\n function not(predicate) {\n return function () {\n return !predicate.apply(this, arguments);\n };\n }\n function neg(predicate) {\n return function () {\n return -predicate.apply(this, arguments);\n };\n }\n function quoteString(value) {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n }\n function defaultZipper() {\n return arrCopy(arguments);\n }\n function defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n }\n function hashIterable(iterable) {\n if (iterable.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(iterable);\n var keyed = isKeyed(iterable);\n var h = ordered ? 1 : 0;\n var size = iterable.__iterate(keyed ? ordered ? function (v, k) {\n h = 31 * h + hashMerge(hash(v), hash(k)) | 0;\n } : function (v, k) {\n h = h + hashMerge(hash(v), hash(k)) | 0;\n } : ordered ? function (v) {\n h = 31 * h + hash(v) | 0;\n } : function (v) {\n h = h + hash(v) | 0;\n });\n return murmurHashOfSize(size, h);\n }\n function murmurHashOfSize(size, h) {\n h = imul(h, 0xCC9E2D51);\n h = imul(h << 15 | h >>> -15, 0x1B873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xE6546B64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85EBCA6B);\n h = imul(h ^ h >>> 13, 0xC2B2AE35);\n h = smi(h ^ h >>> 16);\n return h;\n }\n function hashMerge(a, b) {\n return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int\n }\n var Immutable = {\n Iterable: Iterable,\n Seq: Seq,\n Collection: Collection,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n is: is,\n fromJS: fromJS\n };\n return Immutable;\n});","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = function (action) {\n return action && action.type === '@@redux/INIT' ? 'initialState argument passed to createStore' : 'previous state received by the reducer';\n};\nmodule.exports = exports['default'];\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _immutable = require('immutable');\nvar _immutable2 = _interopRequireDefault(_immutable);\nvar _getStateName = require('./getStateName');\nvar _getStateName2 = _interopRequireDefault(_getStateName);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nexports.default = function (state, reducers, action) {\n var reducerNames = Object.keys(reducers);\n if (!reducerNames.length) {\n return 'Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.';\n }\n var stateName = (0, _getStateName2.default)(action);\n if (_immutable2.default.isImmutable ? !_immutable2.default.isImmutable(state) : !_immutable2.default.Iterable.isIterable(state)) {\n return 'The ' + stateName + ' is of unexpected type. Expected argument to be an instance of Immutable.Collection or Immutable.Record with the following properties: \"' + reducerNames.join('\", \"') + '\".';\n }\n var unexpectedStatePropertyNames = state.toSeq().keySeq().toArray().filter(function (name) {\n return !reducers.hasOwnProperty(name);\n });\n if (unexpectedStatePropertyNames.length > 0) {\n return 'Unexpected ' + (unexpectedStatePropertyNames.length === 1 ? 'property' : 'properties') + ' \"' + unexpectedStatePropertyNames.join('\", \"') + '\" found in ' + stateName + '. Expected to find one of the known reducer property names instead: \"' + reducerNames.join('\", \"') + '\". Unexpected properties will be ignored.';\n }\n return null;\n};\nmodule.exports = exports['default'];\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = function (nextState, reducerName, action) {\n // eslint-disable-next-line no-undefined\n if (nextState === undefined) {\n throw new Error('Reducer \"' + reducerName + '\" returned undefined when handling \"' + action.type + '\" action. To ignore an action, you must explicitly return the previous state.');\n }\n};\nmodule.exports = exports['default'];\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.validateNextState = exports.getUnexpectedInvocationParameterMessage = exports.getStateName = undefined;\nvar _getStateName2 = require('./getStateName');\nvar _getStateName3 = _interopRequireDefault(_getStateName2);\nvar _getUnexpectedInvocationParameterMessage2 = require('./getUnexpectedInvocationParameterMessage');\nvar _getUnexpectedInvocationParameterMessage3 = _interopRequireDefault(_getUnexpectedInvocationParameterMessage2);\nvar _validateNextState2 = require('./validateNextState');\nvar _validateNextState3 = _interopRequireDefault(_validateNextState2);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nexports.getStateName = _getStateName3.default;\nexports.getUnexpectedInvocationParameterMessage = _getUnexpectedInvocationParameterMessage3.default;\nexports.validateNextState = _validateNextState3.default;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _immutable = require('immutable');\nvar _immutable2 = _interopRequireDefault(_immutable);\nvar _utilities = require('./utilities');\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nexports.default = function (reducers) {\n var getDefaultState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _immutable2.default.Map;\n var reducerKeys = Object.keys(reducers);\n\n // eslint-disable-next-line space-infix-ops\n return function () {\n var inputState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultState();\n var action = arguments[1];\n\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = (0, _utilities.getUnexpectedInvocationParameterMessage)(inputState, reducers, action);\n if (warningMessage) {\n // eslint-disable-next-line no-console\n console.error(warningMessage);\n }\n }\n return inputState.withMutations(function (temporaryState) {\n reducerKeys.forEach(function (reducerName) {\n var reducer = reducers[reducerName];\n var currentDomainState = temporaryState.get(reducerName);\n var nextDomainState = reducer(currentDomainState, action);\n (0, _utilities.validateNextState)(nextDomainState, reducerName, action);\n temporaryState.set(reducerName, nextDomainState);\n });\n });\n };\n};\nmodule.exports = exports['default'];\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.combineReducers = undefined;\nvar _combineReducers2 = require('./combineReducers');\nvar _combineReducers3 = _interopRequireDefault(_combineReducers2);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nexports.combineReducers = _combineReducers3.default;\n","'use strict';\n\nclass NonError extends Error {\n constructor(message) {\n super(NonError._prepareSuperMessage(message));\n Object.defineProperty(this, 'name', {\n value: 'NonError',\n configurable: true,\n writable: true\n });\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, NonError);\n }\n }\n static _prepareSuperMessage(message) {\n try {\n return JSON.stringify(message);\n } catch {\n return String(message);\n }\n }\n}\nconst commonProperties = [{\n property: 'name',\n enumerable: false\n}, {\n property: 'message',\n enumerable: false\n}, {\n property: 'stack',\n enumerable: false\n}, {\n property: 'code',\n enumerable: true\n}];\nconst isCalled = Symbol('.toJSON called');\nconst toJSON = from => {\n from[isCalled] = true;\n const json = from.toJSON();\n delete from[isCalled];\n return json;\n};\nconst destroyCircular = ({\n from,\n seen,\n to_,\n forceEnumerable,\n maxDepth,\n depth\n}) => {\n const to = to_ || (Array.isArray(from) ? [] : {});\n seen.push(from);\n if (depth >= maxDepth) {\n return to;\n }\n if (typeof from.toJSON === 'function' && from[isCalled] !== true) {\n return toJSON(from);\n }\n for (const [key, value] of Object.entries(from)) {\n if (typeof Buffer === 'function' && Buffer.isBuffer(value)) {\n to[key] = '[object Buffer]';\n continue;\n }\n if (typeof value === 'function') {\n continue;\n }\n if (!value || typeof value !== 'object') {\n to[key] = value;\n continue;\n }\n if (!seen.includes(from[key])) {\n depth++;\n to[key] = destroyCircular({\n from: from[key],\n seen: seen.slice(),\n forceEnumerable,\n maxDepth,\n depth\n });\n continue;\n }\n to[key] = '[Circular]';\n }\n for (const {\n property,\n enumerable\n } of commonProperties) {\n if (typeof from[property] === 'string') {\n Object.defineProperty(to, property, {\n value: from[property],\n enumerable: forceEnumerable ? true : enumerable,\n configurable: true,\n writable: true\n });\n }\n }\n return to;\n};\nconst serializeError = (value, options = {}) => {\n const {\n maxDepth = Number.POSITIVE_INFINITY\n } = options;\n if (typeof value === 'object' && value !== null) {\n return destroyCircular({\n from: value,\n seen: [],\n forceEnumerable: true,\n maxDepth,\n depth: 0\n });\n }\n\n // People sometimes throw things besides Error objects…\n if (typeof value === 'function') {\n // `JSON.stringify()` discards functions. We do too, unless a function is thrown directly.\n return `[Function: ${value.name || 'anonymous'}]`;\n }\n return value;\n};\nconst deserializeError = (value, options = {}) => {\n const {\n maxDepth = Number.POSITIVE_INFINITY\n } = options;\n if (value instanceof Error) {\n return value;\n }\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n const newError = new Error(); // eslint-disable-line unicorn/error-message\n destroyCircular({\n from: value,\n seen: [],\n to_: newError,\n maxDepth,\n depth: 0\n });\n return newError;\n }\n return new NonError(value);\n};\nmodule.exports = {\n serializeError,\n deserializeError\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}\nmodule.exports = listCacheClear;","/**\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}\nmodule.exports = eq;","var eq = require('./eq');\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}\nmodule.exports = assocIndexOf;","var assocIndexOf = require('./_assocIndexOf');\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 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}\nmodule.exports = listCacheDelete;","var assocIndexOf = require('./_assocIndexOf');\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 return index < 0 ? undefined : data[index][1];\n}\nmodule.exports = listCacheGet;","var assocIndexOf = require('./_assocIndexOf');\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}\nmodule.exports = listCacheHas;","var assocIndexOf = require('./_assocIndexOf');\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 if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\nmodule.exports = listCacheSet;","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\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 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;\nmodule.exports = ListCache;","var ListCache = require('./_ListCache');\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}\nmodule.exports = stackClear;","/**\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 this.size = data.size;\n return result;\n}\nmodule.exports = stackDelete;","/**\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}\nmodule.exports = stackGet;","/**\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}\nmodule.exports = stackHas;","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\nmodule.exports = freeGlobal;","var freeGlobal = require('./_freeGlobal');\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')();\nmodule.exports = root;","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\nmodule.exports = Symbol;","var Symbol = require('./_Symbol');\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 try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\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}\nmodule.exports = getRawTag;","/** 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}\nmodule.exports = objectToString;","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\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) ? getRawTag(value) : objectToString(value);\n}\nmodule.exports = baseGetTag;","/**\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}\nmodule.exports = isObject;","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\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}\nmodule.exports = isFunction;","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\nmodule.exports = coreJsData;","var coreJsData = require('./_coreJsData');\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}\nmodule.exports = isMasked;","/** 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}\nmodule.exports = toSource;","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\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('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\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}\nmodule.exports = baseIsNative;","/**\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}\nmodule.exports = getValue;","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\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}\nmodule.exports = getNative;","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\nmodule.exports = Map;","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\nmodule.exports = nativeCreate;","var nativeCreate = require('./_nativeCreate');\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}\nmodule.exports = hashClear;","/**\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}\nmodule.exports = hashDelete;","var nativeCreate = require('./_nativeCreate');\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}\nmodule.exports = hashGet;","var nativeCreate = require('./_nativeCreate');\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}\nmodule.exports = hashHas;","var nativeCreate = require('./_nativeCreate');\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}\nmodule.exports = hashSet;","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\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 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;\nmodule.exports = Hash;","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\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}\nmodule.exports = mapCacheClear;","/**\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' ? value !== '__proto__' : value === null;\n}\nmodule.exports = isKeyable;","var isKeyable = require('./_isKeyable');\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) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;\n}\nmodule.exports = getMapData;","var getMapData = require('./_getMapData');\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}\nmodule.exports = mapCacheDelete;","var getMapData = require('./_getMapData');\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}\nmodule.exports = mapCacheGet;","var getMapData = require('./_getMapData');\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}\nmodule.exports = mapCacheHas;","var getMapData = require('./_getMapData');\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 data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\nmodule.exports = mapCacheSet;","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\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 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;\nmodule.exports = MapCache;","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\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}\nmodule.exports = stackSet;","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\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;\nmodule.exports = Stack;","var getNative = require('./_getNative');\nvar defineProperty = function () {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}();\nmodule.exports = defineProperty;","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\nmodule.exports = baseAssignValue;","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {\n baseAssignValue(object, key, value);\n }\n}\nmodule.exports = assignMergeValue;","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function (object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\nmodule.exports = createBaseFor;","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\nmodule.exports = baseFor;","var root = require('./_root');\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 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n buffer.copy(result);\n return result;\n}\nmodule.exports = cloneBuffer;","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\nmodule.exports = Uint8Array;","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\nmodule.exports = cloneArrayBuffer;","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\nmodule.exports = cloneTypedArray;","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\nmodule.exports = copyArray;","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = function () {\n function object() {}\n return function (proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object();\n object.prototype = undefined;\n return result;\n };\n}();\nmodule.exports = baseCreate;","/**\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}\nmodule.exports = overArg;","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\nmodule.exports = getPrototype;","/** 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 return value === proto;\n}\nmodule.exports = isPrototype;","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};\n}\nmodule.exports = initCloneObject;","/**\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}\nmodule.exports = isObjectLike;","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\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}\nmodule.exports = baseIsArguments;","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\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 () {\n return arguments;\n}()) ? baseIsArguments : function (value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n};\nmodule.exports = isArguments;","/**\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;\nmodule.exports = isArray;","/** 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' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\nmodule.exports = isLength;","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\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}\nmodule.exports = isArrayLike;","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an 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 an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\nmodule.exports = isArrayLikeObject;","/**\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}\nmodule.exports = stubFalse;","var root = require('./_root'),\n stubFalse = require('./stubFalse');\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;\nmodule.exports = isBuffer;","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\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 infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n}\nmodule.exports = isPlainObject;","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\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]';\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] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[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) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\nmodule.exports = baseIsTypedArray;","/**\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}\nmodule.exports = baseUnary;","var freeGlobal = require('./_freeGlobal');\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 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}();\nmodule.exports = nodeUtil;","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\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;\nmodule.exports = isTypedArray;","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\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 safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n if (key == '__proto__') {\n return;\n }\n return object[key];\n}\nmodule.exports = safeGet;","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\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 * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {\n baseAssignValue(object, key, value);\n }\n}\nmodule.exports = assignValue;","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n var index = -1,\n length = props.length;\n while (++index < length) {\n var key = props[index];\n var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\nmodule.exports = copyObject;","/**\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 while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\nmodule.exports = baseTimes;","/** 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 return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;\n}\nmodule.exports = isIndex;","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\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 for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) && !(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 result.push(key);\n }\n }\n return result;\n}\nmodule.exports = arrayLikeKeys;","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\nmodule.exports = nativeKeysIn;","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\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 `_.keysIn` 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 baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\nmodule.exports = baseKeysIn;","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\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 * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\nmodule.exports = keysIn;","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\nmodule.exports = toPlainObject;","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined;\n var isCommon = newValue === undefined;\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n } else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n } else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n } else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n } else {\n newValue = [];\n }\n } else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n } else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n } else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\nmodule.exports = baseMergeDeep;","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function (srcValue, key) {\n stack || (stack = new Stack());\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n } else {\n var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + '', object, source, stack) : undefined;\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\nmodule.exports = baseMerge;","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\nmodule.exports = identity;","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0:\n return func.call(thisArg);\n case 1:\n return func.call(thisArg, args[0]);\n case 2:\n return func.call(thisArg, args[0], args[1]);\n case 3:\n return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\nmodule.exports = apply;","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? func.length - 1 : start, 0);\n return function () {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\nmodule.exports = overRest;","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function () {\n return value;\n };\n}\nmodule.exports = constant;","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function (func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\nmodule.exports = baseSetToString;","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n return function () {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\nmodule.exports = shortOut;","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\nmodule.exports = setToString;","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\nmodule.exports = baseRest;","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {\n return eq(object[index], value);\n }\n return false;\n}\nmodule.exports = isIterateeCall;","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function (object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n customizer = assigner.length > 3 && typeof customizer == 'function' ? (length--, customizer) : undefined;\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\nmodule.exports = createAssigner;","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function (object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\nmodule.exports = merge;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BLANK_URL = exports.relativeFirstCharacters = exports.whitespaceEscapeCharsRegex = exports.urlSchemeRegex = exports.ctrlCharactersRegex = exports.htmlCtrlEntityRegex = exports.htmlEntitiesRegex = exports.invalidProtocolRegex = void 0;\nexports.invalidProtocolRegex = /^([^\\w]*)(javascript|data|vbscript)/im;\nexports.htmlEntitiesRegex = /&#(\\w+)(^\\w|;)?/g;\nexports.htmlCtrlEntityRegex = /&(newline|tab);/gi;\nexports.ctrlCharactersRegex = /[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim;\nexports.urlSchemeRegex = /^.+(:|:)/gim;\nexports.whitespaceEscapeCharsRegex = /(\\\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;\nexports.relativeFirstCharacters = [\".\", \"/\"];\nexports.BLANK_URL = \"about:blank\";","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sanitizeUrl = void 0;\nvar constants_1 = require(\"./constants\");\nfunction isRelativeUrlWithoutProtocol(url) {\n return constants_1.relativeFirstCharacters.indexOf(url[0]) > -1;\n}\n// adapted from https://stackoverflow.com/a/29824550/2601552\nfunction decodeHtmlCharacters(str) {\n var removedNullByte = str.replace(constants_1.ctrlCharactersRegex, \"\");\n return removedNullByte.replace(constants_1.htmlEntitiesRegex, function (match, dec) {\n return String.fromCharCode(dec);\n });\n}\nfunction decodeURI(uri) {\n try {\n return decodeURIComponent(uri);\n } catch (e) {\n // Ignoring error\n // It is possible that the URI contains a `%` not associated\n // with URI/URL-encoding.\n return uri;\n }\n}\nfunction sanitizeUrl(url) {\n if (!url) {\n return constants_1.BLANK_URL;\n }\n var charsToDecode;\n var decodedUrl = decodeURI(url);\n do {\n decodedUrl = decodeHtmlCharacters(decodedUrl).replace(constants_1.htmlCtrlEntityRegex, \"\").replace(constants_1.ctrlCharactersRegex, \"\").replace(constants_1.whitespaceEscapeCharsRegex, \"\").trim();\n decodedUrl = decodeURI(decodedUrl);\n charsToDecode = decodedUrl.match(constants_1.ctrlCharactersRegex) || decodedUrl.match(constants_1.htmlEntitiesRegex) || decodedUrl.match(constants_1.htmlCtrlEntityRegex) || decodedUrl.match(constants_1.whitespaceEscapeCharsRegex);\n } while (charsToDecode && charsToDecode.length > 0);\n var sanitizedUrl = decodedUrl;\n if (!sanitizedUrl) {\n return constants_1.BLANK_URL;\n }\n if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {\n return sanitizedUrl;\n }\n var urlSchemeParseResults = sanitizedUrl.match(constants_1.urlSchemeRegex);\n if (!urlSchemeParseResults) {\n return sanitizedUrl;\n }\n var urlScheme = urlSchemeParseResults[0];\n if (constants_1.invalidProtocolRegex.test(urlScheme)) {\n return constants_1.BLANK_URL;\n }\n return sanitizedUrl;\n}\nexports.sanitizeUrl = sanitizeUrl;","/**\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 while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\nmodule.exports = arrayMap;","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\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' || isObjectLike(value) && baseGetTag(value) == symbolTag;\n}\nmodule.exports = isSymbol;","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\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}\nmodule.exports = baseToString;","var baseToString = require('./_baseToString');\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}\nmodule.exports = toString;","/**\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 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 var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\nmodule.exports = baseSlice;","var baseSlice = require('./_baseSlice');\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}\nmodule.exports = castSlice;","/** 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}\nmodule.exports = hasUnicode;","/**\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}\nmodule.exports = asciiToArray;","/** 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}\nmodule.exports = unicodeToArray;","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\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) ? unicodeToArray(string) : asciiToArray(string);\n}\nmodule.exports = stringToArray;","var castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\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 var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined;\n var chr = strSymbols ? strSymbols[0] : string.charAt(0);\n var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1);\n return chr[methodName]() + trailing;\n };\n}\nmodule.exports = createCaseFirst;","var createCaseFirst = require('./_createCaseFirst');\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');\nmodule.exports = upperFirst;","var toString = require('./toString'),\n upperFirst = require('./upperFirst');\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}\nmodule.exports = capitalize;","/**\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 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}\nmodule.exports = arrayReduce;","/**\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}\nmodule.exports = basePropertyOf;","var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A',\n '\\xc1': 'A',\n '\\xc2': 'A',\n '\\xc3': 'A',\n '\\xc4': 'A',\n '\\xc5': 'A',\n '\\xe0': 'a',\n '\\xe1': 'a',\n '\\xe2': 'a',\n '\\xe3': 'a',\n '\\xe4': 'a',\n '\\xe5': 'a',\n '\\xc7': 'C',\n '\\xe7': 'c',\n '\\xd0': 'D',\n '\\xf0': 'd',\n '\\xc8': 'E',\n '\\xc9': 'E',\n '\\xca': 'E',\n '\\xcb': 'E',\n '\\xe8': 'e',\n '\\xe9': 'e',\n '\\xea': 'e',\n '\\xeb': 'e',\n '\\xcc': 'I',\n '\\xcd': 'I',\n '\\xce': 'I',\n '\\xcf': 'I',\n '\\xec': 'i',\n '\\xed': 'i',\n '\\xee': 'i',\n '\\xef': 'i',\n '\\xd1': 'N',\n '\\xf1': 'n',\n '\\xd2': 'O',\n '\\xd3': 'O',\n '\\xd4': 'O',\n '\\xd5': 'O',\n '\\xd6': 'O',\n '\\xd8': 'O',\n '\\xf2': 'o',\n '\\xf3': 'o',\n '\\xf4': 'o',\n '\\xf5': 'o',\n '\\xf6': 'o',\n '\\xf8': 'o',\n '\\xd9': 'U',\n '\\xda': 'U',\n '\\xdb': 'U',\n '\\xdc': 'U',\n '\\xf9': 'u',\n '\\xfa': 'u',\n '\\xfb': 'u',\n '\\xfc': 'u',\n '\\xdd': 'Y',\n '\\xfd': 'y',\n '\\xff': 'y',\n '\\xc6': 'Ae',\n '\\xe6': 'ae',\n '\\xde': 'Th',\n '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A',\n '\\u0102': 'A',\n '\\u0104': 'A',\n '\\u0101': 'a',\n '\\u0103': 'a',\n '\\u0105': 'a',\n '\\u0106': 'C',\n '\\u0108': 'C',\n '\\u010a': 'C',\n '\\u010c': 'C',\n '\\u0107': 'c',\n '\\u0109': 'c',\n '\\u010b': 'c',\n '\\u010d': 'c',\n '\\u010e': 'D',\n '\\u0110': 'D',\n '\\u010f': 'd',\n '\\u0111': 'd',\n '\\u0112': 'E',\n '\\u0114': 'E',\n '\\u0116': 'E',\n '\\u0118': 'E',\n '\\u011a': 'E',\n '\\u0113': 'e',\n '\\u0115': 'e',\n '\\u0117': 'e',\n '\\u0119': 'e',\n '\\u011b': 'e',\n '\\u011c': 'G',\n '\\u011e': 'G',\n '\\u0120': 'G',\n '\\u0122': 'G',\n '\\u011d': 'g',\n '\\u011f': 'g',\n '\\u0121': 'g',\n '\\u0123': 'g',\n '\\u0124': 'H',\n '\\u0126': 'H',\n '\\u0125': 'h',\n '\\u0127': 'h',\n '\\u0128': 'I',\n '\\u012a': 'I',\n '\\u012c': 'I',\n '\\u012e': 'I',\n '\\u0130': 'I',\n '\\u0129': 'i',\n '\\u012b': 'i',\n '\\u012d': 'i',\n '\\u012f': 'i',\n '\\u0131': 'i',\n '\\u0134': 'J',\n '\\u0135': 'j',\n '\\u0136': 'K',\n '\\u0137': 'k',\n '\\u0138': 'k',\n '\\u0139': 'L',\n '\\u013b': 'L',\n '\\u013d': 'L',\n '\\u013f': 'L',\n '\\u0141': 'L',\n '\\u013a': 'l',\n '\\u013c': 'l',\n '\\u013e': 'l',\n '\\u0140': 'l',\n '\\u0142': 'l',\n '\\u0143': 'N',\n '\\u0145': 'N',\n '\\u0147': 'N',\n '\\u014a': 'N',\n '\\u0144': 'n',\n '\\u0146': 'n',\n '\\u0148': 'n',\n '\\u014b': 'n',\n '\\u014c': 'O',\n '\\u014e': 'O',\n '\\u0150': 'O',\n '\\u014d': 'o',\n '\\u014f': 'o',\n '\\u0151': 'o',\n '\\u0154': 'R',\n '\\u0156': 'R',\n '\\u0158': 'R',\n '\\u0155': 'r',\n '\\u0157': 'r',\n '\\u0159': 'r',\n '\\u015a': 'S',\n '\\u015c': 'S',\n '\\u015e': 'S',\n '\\u0160': 'S',\n '\\u015b': 's',\n '\\u015d': 's',\n '\\u015f': 's',\n '\\u0161': 's',\n '\\u0162': 'T',\n '\\u0164': 'T',\n '\\u0166': 'T',\n '\\u0163': 't',\n '\\u0165': 't',\n '\\u0167': 't',\n '\\u0168': 'U',\n '\\u016a': 'U',\n '\\u016c': 'U',\n '\\u016e': 'U',\n '\\u0170': 'U',\n '\\u0172': 'U',\n '\\u0169': 'u',\n '\\u016b': 'u',\n '\\u016d': 'u',\n '\\u016f': 'u',\n '\\u0171': 'u',\n '\\u0173': 'u',\n '\\u0174': 'W',\n '\\u0175': 'w',\n '\\u0176': 'Y',\n '\\u0177': 'y',\n '\\u0178': 'Y',\n '\\u0179': 'Z',\n '\\u017b': 'Z',\n '\\u017d': 'Z',\n '\\u017a': 'z',\n '\\u017c': 'z',\n '\\u017e': 'z',\n '\\u0132': 'IJ',\n '\\u0133': 'ij',\n '\\u0152': 'Oe',\n '\\u0153': 'oe',\n '\\u0149': \"'n\",\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);\nmodule.exports = deburrLetter;","var deburrLetter = require('./_deburrLetter'),\n toString = require('./toString');\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}\nmodule.exports = deburr;","/** 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}\nmodule.exports = asciiWords;","/** 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}\nmodule.exports = hasUnicodeWord;","/** 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([rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, rsUpper + '+' + rsOptContrUpper, rsOrdUpper, rsOrdLower, rsDigits, rsEmoji].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}\nmodule.exports = unicodeWords;","var asciiWords = require('./_asciiWords'),\n hasUnicodeWord = require('./_hasUnicodeWord'),\n toString = require('./toString'),\n unicodeWords = require('./_unicodeWords');\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 if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\nmodule.exports = words;","var arrayReduce = require('./_arrayReduce'),\n deburr = require('./deburr'),\n words = require('./words');\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}\nmodule.exports = createCompounder;","var capitalize = require('./capitalize'),\n createCompounder = require('./_createCompounder');\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});\nmodule.exports = camelCase;","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function () {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache)();\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\nmodule.exports = memoize;","/** 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}\nmodule.exports = setCacheAdd;","/**\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}\nmodule.exports = setCacheHas;","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\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 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;\nmodule.exports = SetCache;","/**\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 while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\nmodule.exports = arraySome;","/**\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}\nmodule.exports = cacheHas;","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\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 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 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 if (customizer) {\n var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : 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) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\nmodule.exports = equalArrays;","/**\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 map.forEach(function (value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\nmodule.exports = mapToArray;","/**\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 set.forEach(function (value) {\n result[++index] = value;\n });\n return result;\n}\nmodule.exports = setToArray;","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\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]';\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 || object.byteOffset != other.byteOffset) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n case arrayBufferTag:\n if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\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 case errorTag:\n return object.name == other.name && object.message == other.message;\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 case mapTag:\n var convert = mapToArray;\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\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 case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\nmodule.exports = equalByTag;","/**\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 while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\nmodule.exports = arrayPush;","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\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}\nmodule.exports = baseGetAllKeys;","/**\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 while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\nmodule.exports = arrayFilter;","/**\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}\nmodule.exports = stubArray;","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\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};\nmodule.exports = getSymbols;","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\nmodule.exports = nativeKeys;","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\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}\nmodule.exports = baseKeys;","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\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}\nmodule.exports = keys;","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\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}\nmodule.exports = getAllKeys;","var getAllKeys = require('./_getAllKeys');\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 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 var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n if (customizer) {\n var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {\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 && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\nmodule.exports = equalObjects;","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\nmodule.exports = DataView;","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\nmodule.exports = Promise;","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\nmodule.exports = Set;","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\nmodule.exports = WeakMap;","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\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]';\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 || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || 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 if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString:\n return dataViewTag;\n case mapCtorString:\n return mapTag;\n case promiseCtorString:\n return promiseTag;\n case setCtorString:\n return setTag;\n case weakMapCtorString:\n return weakMapTag;\n }\n }\n return result;\n };\n}\nmodule.exports = getTag;","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\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 objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\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) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : 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 if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\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}\nmodule.exports = baseIsEqualDeep;","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\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}\nmodule.exports = baseIsEqual;","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack();\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {\n return false;\n }\n }\n }\n return true;\n}\nmodule.exports = baseIsMatch;","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\nmodule.exports = isStrictComparable;","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n while (length--) {\n var key = result[length],\n value = object[key];\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\nmodule.exports = getMatchData;","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function (object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue && (srcValue !== undefined || key in Object(object));\n };\n}\nmodule.exports = matchesStrictComparable;","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function (object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\nmodule.exports = baseMatches;","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);\n}\nmodule.exports = isKey;","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function (key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n var cache = result.cache;\n return result;\n}\nmodule.exports = memoizeCapped;","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function (string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function (match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match);\n });\n return result;\n});\nmodule.exports = stringToPath;","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\nmodule.exports = castPath;","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\nmodule.exports = toKey;","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n var index = 0,\n length = path.length;\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return index && index == length ? object : undefined;\n}\nmodule.exports = baseGet;","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\nmodule.exports = get;","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\nmodule.exports = baseHasIn;","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n var index = -1,\n length = path.length,\n result = false;\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));\n}\nmodule.exports = hasPath;","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\nmodule.exports = hasIn;","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function (object) {\n var objValue = get(object, path);\n return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\nmodule.exports = baseMatchesProperty;","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function (object) {\n return object == null ? undefined : object[key];\n };\n}\nmodule.exports = baseProperty;","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function (object) {\n return baseGet(object, path);\n };\n}\nmodule.exports = basePropertyDeep;","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\nmodule.exports = property;","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);\n }\n return property(value);\n}\nmodule.exports = baseIteratee;","var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function (collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function (key) {\n return iteratee(iterable[key], key, iterable);\n };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\nmodule.exports = createFind;","/**\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 while (fromRight ? index-- : ++index < length) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\nmodule.exports = baseFindIndex;","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\nmodule.exports = trimmedEndIndex;","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string;\n}\nmodule.exports = baseTrim;","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? other + '' : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;\n}\nmodule.exports = toNumber;","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = value < 0 ? -1 : 1;\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\nmodule.exports = toFinite;","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n return result === result ? remainder ? result - remainder : result : 0;\n}\nmodule.exports = toInteger;","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\nmodule.exports = findIndex;","var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\nmodule.exports = find;","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\nmodule.exports = baseForOwn;","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function (collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n while (fromRight ? index-- : ++index < length) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\nmodule.exports = createBaseEach;","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\nmodule.exports = baseEach;","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection 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 baseSome(collection, predicate) {\n var result;\n baseEach(collection, function (value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\nmodule.exports = baseSome;","var arraySome = require('./_arraySome'),\n baseIteratee = require('./_baseIteratee'),\n baseSome = require('./_baseSome'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\nmodule.exports = some;","/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */\n;\n(function (root, factory) {\n // https://github.com/umdjs/umd/blob/master/returnExports.js\n if (typeof exports == 'object') {\n // For Node.js.\n module.exports = factory(root);\n } else if (typeof define == 'function' && define.amd) {\n // For AMD. Register as an anonymous module.\n define([], factory.bind(root, root));\n } else {\n // For browser globals (not exposing the function separately).\n factory(root);\n }\n})(typeof global != 'undefined' ? global : this, function (root) {\n if (root.CSS && root.CSS.escape) {\n return root.CSS.escape;\n }\n\n // https://drafts.csswg.org/cssom/#serialize-an-identifier\n var cssEscape = function (value) {\n if (arguments.length == 0) {\n throw new TypeError('`CSS.escape` requires an argument.');\n }\n var string = String(value);\n var length = string.length;\n var index = -1;\n var codeUnit;\n var result = '';\n var firstCodeUnit = string.charCodeAt(0);\n while (++index < length) {\n codeUnit = string.charCodeAt(index);\n // Note: there’s no need to special-case astral symbols, surrogate\n // pairs, or lone surrogates.\n\n // If the character is NULL (U+0000), then the REPLACEMENT CHARACTER\n // (U+FFFD).\n if (codeUnit == 0x0000) {\n result += '\\uFFFD';\n continue;\n }\n if (\n // If the character is in the range [\\1-\\1F] (U+0001 to U+001F) or is\n // U+007F, […]\n codeUnit >= 0x0001 && codeUnit <= 0x001F || codeUnit == 0x007F ||\n // If the character is the first character and is in the range [0-9]\n // (U+0030 to U+0039), […]\n index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039 ||\n // If the character is the second character and is in the range [0-9]\n // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]\n\n index == 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit == 0x002D) {\n // https://drafts.csswg.org/cssom/#escape-a-character-as-code-point\n result += '\\\\' + codeUnit.toString(16) + ' ';\n continue;\n }\n if (\n // If the character is the first character and is a `-` (U+002D), and\n // there is no second character, […]\n index == 0 && length == 1 && codeUnit == 0x002D) {\n result += '\\\\' + string.charAt(index);\n continue;\n }\n\n // If the character is not handled by one of the above rules and is\n // greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or\n // is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to\n // U+005A), or [a-z] (U+0061 to U+007A), […]\n if (codeUnit >= 0x0080 || codeUnit == 0x002D || codeUnit == 0x005F || codeUnit >= 0x0030 && codeUnit <= 0x0039 || codeUnit >= 0x0041 && codeUnit <= 0x005A || codeUnit >= 0x0061 && codeUnit <= 0x007A) {\n // the character itself\n result += string.charAt(index);\n continue;\n }\n\n // Otherwise, the escaped character.\n // https://drafts.csswg.org/cssom/#escape-a-character\n result += '\\\\' + string.charAt(index);\n }\n return result;\n };\n if (!root.CSS) {\n root.CSS = {};\n }\n root.CSS.escape = cssEscape;\n return cssEscape;\n});","'use strict';\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n if (!port) return false;\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n case 'https':\n case 'wss':\n return port !== 443;\n case 'ftp':\n return port !== 21;\n case 'gopher':\n return port !== 70;\n case 'file':\n return false;\n }\n return port !== 0;\n};","'use strict';\n\nvar has = Object.prototype.hasOwnProperty,\n undef;\n\n/**\n * Decode a URI encoded string.\n *\n * @param {String} input The URI encoded string.\n * @returns {String|Null} The decoded string.\n * @api private\n */\nfunction decode(input) {\n try {\n return decodeURIComponent(input.replace(/\\+/g, ' '));\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Attempts to encode a given input.\n *\n * @param {String} input The string that needs to be encoded.\n * @returns {String|Null} The encoded string.\n * @api private\n */\nfunction encode(input) {\n try {\n return encodeURIComponent(input);\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\nfunction querystring(query) {\n var parser = /([^=?#&]+)=?([^&]*)/g,\n result = {},\n part;\n while (part = parser.exec(query)) {\n var key = decode(part[1]),\n value = decode(part[2]);\n\n //\n // Prevent overriding of existing properties. This ensures that build-in\n // methods like `toString` or __proto__ are not overriden by malicious\n // querystrings.\n //\n // In the case if failed decoding, we want to omit the key/value pairs\n // from the result.\n //\n if (key === null || value === null || key in result) continue;\n result[key] = value;\n }\n return result;\n}\n\n/**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\nfunction querystringify(obj, prefix) {\n prefix = prefix || '';\n var pairs = [],\n value,\n key;\n\n //\n // Optionally prefix with a '?' if needed\n //\n if ('string' !== typeof prefix) prefix = '?';\n for (key in obj) {\n if (has.call(obj, key)) {\n value = obj[key];\n\n //\n // Edge cases where we actually want to encode the value to an empty\n // string instead of the stringified value.\n //\n if (!value && (value === null || value === undef || isNaN(value))) {\n value = '';\n }\n key = encode(key);\n value = encode(value);\n\n //\n // If we failed to encode the strings, we should bail out as we don't\n // want to add invalid strings to the query.\n //\n if (key === null || value === null) continue;\n pairs.push(key + '=' + value);\n }\n }\n return pairs.length ? prefix + pairs.join('&') : '';\n}\n\n//\n// Expose the module.\n//\nexports.stringify = querystringify;\nexports.parse = querystring;","'use strict';\n\nvar required = require('requires-port'),\n qs = require('querystringify'),\n controlOrWhitespace = /^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/,\n CRHTLF = /[\\n\\r\\t]/g,\n slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//,\n port = /:\\d+$/,\n protocolre = /^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i,\n windowsDriveLetter = /^[a-zA-Z]:/;\n\n/**\n * Remove control characters and whitespace from the beginning of a string.\n *\n * @param {Object|String} str String to trim.\n * @returns {String} A new string representing `str` stripped of control\n * characters and whitespace from its beginning.\n * @public\n */\nfunction trimLeft(str) {\n return (str ? str : '').toString().replace(controlOrWhitespace, '');\n}\n\n/**\n * These are the parse rules for the URL parser, it informs the parser\n * about:\n *\n * 0. The char it Needs to parse, if it's a string it should be done using\n * indexOf, RegExp using exec and NaN means set as current value.\n * 1. The property we should set when parsing this value.\n * 2. Indication if it's backwards or forward parsing, when set as number it's\n * the value of extra chars that should be split off.\n * 3. Inherit from location if non existing in the parser.\n * 4. `toLowerCase` the resulting value.\n */\nvar rules = [['#', 'hash'],\n// Extract from the back.\n['?', 'query'],\n// Extract from the back.\nfunction sanitize(address, url) {\n // Sanitize what is left of the address\n return isSpecial(url.protocol) ? address.replace(/\\\\/g, '/') : address;\n}, ['/', 'pathname'],\n// Extract from the back.\n['@', 'auth', 1],\n// Extract from the front.\n[NaN, 'host', undefined, 1, 1],\n// Set left over value.\n[/:(\\d*)$/, 'port', undefined, 1],\n// RegExp the back.\n[NaN, 'hostname', undefined, 1, 1] // Set left over.\n];\n\n/**\n * These properties should not be copied or inherited from. This is only needed\n * for all non blob URL's as a blob URL does not include a hash, only the\n * origin.\n *\n * @type {Object}\n * @private\n */\nvar ignore = {\n hash: 1,\n query: 1\n};\n\n/**\n * The location object differs when your code is loaded through a normal page,\n * Worker or through a worker using a blob. And with the blobble begins the\n * trouble as the location object will contain the URL of the blob, not the\n * location of the page where our code is loaded in. The actual origin is\n * encoded in the `pathname` so we can thankfully generate a good \"default\"\n * location from it so we can generate proper relative URL's again.\n *\n * @param {Object|String} loc Optional default location object.\n * @returns {Object} lolcation object.\n * @public\n */\nfunction lolcation(loc) {\n var globalVar;\n if (typeof window !== 'undefined') globalVar = window;else if (typeof global !== 'undefined') globalVar = global;else if (typeof self !== 'undefined') globalVar = self;else globalVar = {};\n var location = globalVar.location || {};\n loc = loc || location;\n var finaldestination = {},\n type = typeof loc,\n key;\n if ('blob:' === loc.protocol) {\n finaldestination = new Url(unescape(loc.pathname), {});\n } else if ('string' === type) {\n finaldestination = new Url(loc, {});\n for (key in ignore) delete finaldestination[key];\n } else if ('object' === type) {\n for (key in loc) {\n if (key in ignore) continue;\n finaldestination[key] = loc[key];\n }\n if (finaldestination.slashes === undefined) {\n finaldestination.slashes = slashes.test(loc.href);\n }\n }\n return finaldestination;\n}\n\n/**\n * Check whether a protocol scheme is special.\n *\n * @param {String} The protocol scheme of the URL\n * @return {Boolean} `true` if the protocol scheme is special, else `false`\n * @private\n */\nfunction isSpecial(scheme) {\n return scheme === 'file:' || scheme === 'ftp:' || scheme === 'http:' || scheme === 'https:' || scheme === 'ws:' || scheme === 'wss:';\n}\n\n/**\n * @typedef ProtocolExtract\n * @type Object\n * @property {String} protocol Protocol matched in the URL, in lowercase.\n * @property {Boolean} slashes `true` if protocol is followed by \"//\", else `false`.\n * @property {String} rest Rest of the URL that is not part of the protocol.\n */\n\n/**\n * Extract protocol information from a URL with/without double slash (\"//\").\n *\n * @param {String} address URL we want to extract from.\n * @param {Object} location\n * @return {ProtocolExtract} Extracted information.\n * @private\n */\nfunction extractProtocol(address, location) {\n address = trimLeft(address);\n address = address.replace(CRHTLF, '');\n location = location || {};\n var match = protocolre.exec(address);\n var protocol = match[1] ? match[1].toLowerCase() : '';\n var forwardSlashes = !!match[2];\n var otherSlashes = !!match[3];\n var slashesCount = 0;\n var rest;\n if (forwardSlashes) {\n if (otherSlashes) {\n rest = match[2] + match[3] + match[4];\n slashesCount = match[2].length + match[3].length;\n } else {\n rest = match[2] + match[4];\n slashesCount = match[2].length;\n }\n } else {\n if (otherSlashes) {\n rest = match[3] + match[4];\n slashesCount = match[3].length;\n } else {\n rest = match[4];\n }\n }\n if (protocol === 'file:') {\n if (slashesCount >= 2) {\n rest = rest.slice(2);\n }\n } else if (isSpecial(protocol)) {\n rest = match[4];\n } else if (protocol) {\n if (forwardSlashes) {\n rest = rest.slice(2);\n }\n } else if (slashesCount >= 2 && isSpecial(location.protocol)) {\n rest = match[4];\n }\n return {\n protocol: protocol,\n slashes: forwardSlashes || isSpecial(protocol),\n slashesCount: slashesCount,\n rest: rest\n };\n}\n\n/**\n * Resolve a relative URL pathname against a base URL pathname.\n *\n * @param {String} relative Pathname of the relative URL.\n * @param {String} base Pathname of the base URL.\n * @return {String} Resolved pathname.\n * @private\n */\nfunction resolve(relative, base) {\n if (relative === '') return base;\n var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')),\n i = path.length,\n last = path[i - 1],\n unshift = false,\n up = 0;\n while (i--) {\n if (path[i] === '.') {\n path.splice(i, 1);\n } else if (path[i] === '..') {\n path.splice(i, 1);\n up++;\n } else if (up) {\n if (i === 0) unshift = true;\n path.splice(i, 1);\n up--;\n }\n }\n if (unshift) path.unshift('');\n if (last === '.' || last === '..') path.push('');\n return path.join('/');\n}\n\n/**\n * The actual URL instance. Instead of returning an object we've opted-in to\n * create an actual constructor as it's much more memory efficient and\n * faster and it pleases my OCD.\n *\n * It is worth noting that we should not use `URL` as class name to prevent\n * clashes with the global URL instance that got introduced in browsers.\n *\n * @constructor\n * @param {String} address URL we want to parse.\n * @param {Object|String} [location] Location defaults for relative paths.\n * @param {Boolean|Function} [parser] Parser for the query string.\n * @private\n */\nfunction Url(address, location, parser) {\n address = trimLeft(address);\n address = address.replace(CRHTLF, '');\n if (!(this instanceof Url)) {\n return new Url(address, location, parser);\n }\n var relative,\n extracted,\n parse,\n instruction,\n index,\n key,\n instructions = rules.slice(),\n type = typeof location,\n url = this,\n i = 0;\n\n //\n // The following if statements allows this module two have compatibility with\n // 2 different API:\n //\n // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments\n // where the boolean indicates that the query string should also be parsed.\n //\n // 2. The `URL` interface of the browser which accepts a URL, object as\n // arguments. The supplied object will be used as default values / fall-back\n // for relative paths.\n //\n if ('object' !== type && 'string' !== type) {\n parser = location;\n location = null;\n }\n if (parser && 'function' !== typeof parser) parser = qs.parse;\n location = lolcation(location);\n\n //\n // Extract protocol information before running the instructions.\n //\n extracted = extractProtocol(address || '', location);\n relative = !extracted.protocol && !extracted.slashes;\n url.slashes = extracted.slashes || relative && location.slashes;\n url.protocol = extracted.protocol || location.protocol || '';\n address = extracted.rest;\n\n //\n // When the authority component is absent the URL starts with a path\n // component.\n //\n if (extracted.protocol === 'file:' && (extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) || !extracted.slashes && (extracted.protocol || extracted.slashesCount < 2 || !isSpecial(url.protocol))) {\n instructions[3] = [/(.*)/, 'pathname'];\n }\n for (; i < instructions.length; i++) {\n instruction = instructions[i];\n if (typeof instruction === 'function') {\n address = instruction(address, url);\n continue;\n }\n parse = instruction[0];\n key = instruction[1];\n if (parse !== parse) {\n url[key] = address;\n } else if ('string' === typeof parse) {\n index = parse === '@' ? address.lastIndexOf(parse) : address.indexOf(parse);\n if (~index) {\n if ('number' === typeof instruction[2]) {\n url[key] = address.slice(0, index);\n address = address.slice(index + instruction[2]);\n } else {\n url[key] = address.slice(index);\n address = address.slice(0, index);\n }\n }\n } else if (index = parse.exec(address)) {\n url[key] = index[1];\n address = address.slice(0, index.index);\n }\n url[key] = url[key] || (relative && instruction[3] ? location[key] || '' : '');\n\n //\n // Hostname, host and protocol should be lowercased so they can be used to\n // create a proper `origin`.\n //\n if (instruction[4]) url[key] = url[key].toLowerCase();\n }\n\n //\n // Also parse the supplied query string in to an object. If we're supplied\n // with a custom parser as function use that instead of the default build-in\n // parser.\n //\n if (parser) url.query = parser(url.query);\n\n //\n // If the URL is relative, resolve the pathname against the base URL.\n //\n if (relative && location.slashes && url.pathname.charAt(0) !== '/' && (url.pathname !== '' || location.pathname !== '')) {\n url.pathname = resolve(url.pathname, location.pathname);\n }\n\n //\n // Default to a / for pathname if none exists. This normalizes the URL\n // to always have a /\n //\n if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {\n url.pathname = '/' + url.pathname;\n }\n\n //\n // We should not add port numbers if they are already the default port number\n // for a given protocol. As the host also contains the port number we're going\n // override it with the hostname which contains no port number.\n //\n if (!required(url.port, url.protocol)) {\n url.host = url.hostname;\n url.port = '';\n }\n\n //\n // Parse down the `auth` for the username and password.\n //\n url.username = url.password = '';\n if (url.auth) {\n index = url.auth.indexOf(':');\n if (~index) {\n url.username = url.auth.slice(0, index);\n url.username = encodeURIComponent(decodeURIComponent(url.username));\n url.password = url.auth.slice(index + 1);\n url.password = encodeURIComponent(decodeURIComponent(url.password));\n } else {\n url.username = encodeURIComponent(decodeURIComponent(url.auth));\n }\n url.auth = url.password ? url.username + ':' + url.password : url.username;\n }\n url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';\n\n //\n // The href is just the compiled result.\n //\n url.href = url.toString();\n}\n\n/**\n * This is convenience method for changing properties in the URL instance to\n * insure that they all propagate correctly.\n *\n * @param {String} part Property we need to adjust.\n * @param {Mixed} value The newly assigned value.\n * @param {Boolean|Function} fn When setting the query, it will be the function\n * used to parse the query.\n * When setting the protocol, double slash will be\n * removed from the final url if it is true.\n * @returns {URL} URL instance for chaining.\n * @public\n */\nfunction set(part, value, fn) {\n var url = this;\n switch (part) {\n case 'query':\n if ('string' === typeof value && value.length) {\n value = (fn || qs.parse)(value);\n }\n url[part] = value;\n break;\n case 'port':\n url[part] = value;\n if (!required(value, url.protocol)) {\n url.host = url.hostname;\n url[part] = '';\n } else if (value) {\n url.host = url.hostname + ':' + value;\n }\n break;\n case 'hostname':\n url[part] = value;\n if (url.port) value += ':' + url.port;\n url.host = value;\n break;\n case 'host':\n url[part] = value;\n if (port.test(value)) {\n value = value.split(':');\n url.port = value.pop();\n url.hostname = value.join(':');\n } else {\n url.hostname = value;\n url.port = '';\n }\n break;\n case 'protocol':\n url.protocol = value.toLowerCase();\n url.slashes = !fn;\n break;\n case 'pathname':\n case 'hash':\n if (value) {\n var char = part === 'pathname' ? '/' : '#';\n url[part] = value.charAt(0) !== char ? char + value : value;\n } else {\n url[part] = value;\n }\n break;\n case 'username':\n case 'password':\n url[part] = encodeURIComponent(value);\n break;\n case 'auth':\n var index = value.indexOf(':');\n if (~index) {\n url.username = value.slice(0, index);\n url.username = encodeURIComponent(decodeURIComponent(url.username));\n url.password = value.slice(index + 1);\n url.password = encodeURIComponent(decodeURIComponent(url.password));\n } else {\n url.username = encodeURIComponent(decodeURIComponent(value));\n }\n }\n for (var i = 0; i < rules.length; i++) {\n var ins = rules[i];\n if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();\n }\n url.auth = url.password ? url.username + ':' + url.password : url.username;\n url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host ? url.protocol + '//' + url.host : 'null';\n url.href = url.toString();\n return url;\n}\n\n/**\n * Transform the properties back in to a valid and full URL string.\n *\n * @param {Function} stringify Optional query stringify function.\n * @returns {String} Compiled version of the URL.\n * @public\n */\nfunction toString(stringify) {\n if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;\n var query,\n url = this,\n host = url.host,\n protocol = url.protocol;\n if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';\n var result = protocol + (url.protocol && url.slashes || isSpecial(url.protocol) ? '//' : '');\n if (url.username) {\n result += url.username;\n if (url.password) result += ':' + url.password;\n result += '@';\n } else if (url.password) {\n result += ':' + url.password;\n result += '@';\n } else if (url.protocol !== 'file:' && isSpecial(url.protocol) && !host && url.pathname !== '/') {\n //\n // Add back the empty userinfo, otherwise the original invalid URL\n // might be transformed into a valid one with `url.pathname` as host.\n //\n result += '@';\n }\n\n //\n // Trailing colon is removed from `url.host` when it is parsed. If it still\n // ends with a colon, then add back the trailing colon that was removed. This\n // prevents an invalid URL from being transformed into a valid one.\n //\n if (host[host.length - 1] === ':' || port.test(url.hostname) && !url.port) {\n host += ':';\n }\n result += host + url.pathname;\n query = 'object' === typeof url.query ? stringify(url.query) : url.query;\n if (query) result += '?' !== query.charAt(0) ? '?' + query : query;\n if (url.hash) result += url.hash;\n return result;\n}\nUrl.prototype = {\n set: set,\n toString: toString\n};\n\n//\n// Expose the URL parser and some additional properties that might be useful for\n// others or testing.\n//\nUrl.extractProtocol = extractProtocol;\nUrl.location = lolcation;\nUrl.trimLeft = trimLeft;\nUrl.qs = qs;\nmodule.exports = Url;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\nmodule.exports = function () {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n }\n ;\n shim.isRequired = shim;\n function getShim() {\n return shim;\n }\n ;\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}","/**\n * A specialized version of `_.forEach` 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 * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\nmodule.exports = arrayEach;","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\nmodule.exports = baseAssign;","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\nmodule.exports = baseAssignIn;","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\nmodule.exports = copySymbols;","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\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 and inherited 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 getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\nmodule.exports = getSymbolsIn;","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\nmodule.exports = copySymbolsIn;","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * 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 getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\nmodule.exports = getAllKeysIn;","/** 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 * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\nmodule.exports = initCloneArray;","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\nmodule.exports = cloneDataView;","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\nmodule.exports = cloneRegExp;","var Symbol = require('./_Symbol');\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 * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\nmodule.exports = cloneSymbol;","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\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/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n case dataViewTag:\n return cloneDataView(object, isDeep);\n case float32Tag:\n case float64Tag:\n case int8Tag:\n case int16Tag:\n case int32Tag:\n case uint8Tag:\n case uint8ClampedTag:\n case uint16Tag:\n case uint32Tag:\n return cloneTypedArray(object, isDeep);\n case mapTag:\n return new Ctor();\n case numberTag:\n case stringTag:\n return new Ctor(object);\n case regexpTag:\n return cloneRegExp(object);\n case setTag:\n return new Ctor();\n case symbolTag:\n return cloneSymbol(object);\n }\n}\nmodule.exports = initCloneByTag;","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\nmodule.exports = baseIsMap;","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\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 map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\nmodule.exports = isMap;","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\nmodule.exports = baseIsSet;","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\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 set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\nmodule.exports = isSet;","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\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 genTag = '[object GeneratorFunction]',\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 symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\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 supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || isFunc && !object) {\n result = isFlat || isFunc ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack());\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n if (isSet(value)) {\n value.forEach(function (subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function (subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function (subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\nmodule.exports = baseClone;","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\nmodule.exports = last;","var baseGet = require('./_baseGet'),\n baseSlice = require('./_baseSlice');\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\nmodule.exports = parent;","var castPath = require('./_castPath'),\n last = require('./last'),\n parent = require('./_parent'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n}\nmodule.exports = baseUnset;","var isPlainObject = require('./isPlainObject');\n\n/**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\nfunction customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n}\nmodule.exports = customOmitClone;","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\nmodule.exports = isFlattenable;","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n predicate || (predicate = isFlattenable);\n result || (result = []);\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\nmodule.exports = baseFlatten;","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\nmodule.exports = flatten;","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\nmodule.exports = flatRest;","var arrayMap = require('./_arrayMap'),\n baseClone = require('./_baseClone'),\n baseUnset = require('./_baseUnset'),\n castPath = require('./_castPath'),\n copyObject = require('./_copyObject'),\n customOmitClone = require('./_customOmitClone'),\n flatRest = require('./_flatRest'),\n getAllKeysIn = require('./_getAllKeysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\nvar omit = flatRest(function (object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function (path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n});\nmodule.exports = omit;","/**\n * Zenscroll 4.0.2\n * https://github.com/zengabor/zenscroll/\n *\n * Copyright 2015–2018 Gabor Lenard\n *\n * This is free and unencumbered software released into the public domain.\n * \n * Anyone is free to copy, modify, publish, use, compile, sell, or\n * distribute this software, either in source code form or as a compiled\n * binary, for any purpose, commercial or non-commercial, and by any\n * means.\n * \n * In jurisdictions that recognize copyright laws, the author or authors\n * of this software dedicate any and all copyright interest in the\n * software to the public domain. We make this dedication for the benefit\n * of the public at large and to the detriment of our heirs and\n * successors. We intend this dedication to be an overt act of\n * relinquishment in perpetuity of all present and future rights to this\n * software under copyright law.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n * \n * For more information, please refer to \n * \n */\n\n/*jshint devel:true, asi:true */\n\n/*global define, module */\n\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory());\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n (function install() {\n // To make sure Zenscroll can be referenced from the header, before `body` is available\n if (document && document.body) {\n root.zenscroll = factory();\n } else {\n // retry 9ms later\n setTimeout(install, 9);\n }\n })();\n }\n})(this, function () {\n \"use strict\";\n\n // Detect if the browser already supports native smooth scrolling (e.g., Firefox 36+ and Chrome 49+) and it is enabled:\n var isNativeSmoothScrollEnabledOn = function (elem) {\n return elem && \"getComputedStyle\" in window && window.getComputedStyle(elem)[\"scroll-behavior\"] === \"smooth\";\n };\n\n // Exit if it’s not a browser environment:\n if (typeof window === \"undefined\" || !(\"document\" in window)) {\n return {};\n }\n var makeScroller = function (container, defaultDuration, edgeOffset) {\n // Use defaults if not provided\n defaultDuration = defaultDuration || 999; //ms\n if (!edgeOffset && edgeOffset !== 0) {\n // When scrolling, this amount of distance is kept from the edges of the container:\n edgeOffset = 9; //px\n }\n\n // Handling the life-cycle of the scroller\n var scrollTimeoutId;\n var setScrollTimeoutId = function (newValue) {\n scrollTimeoutId = newValue;\n };\n\n /**\n * Stop the current smooth scroll operation immediately\n */\n var stopScroll = function () {\n clearTimeout(scrollTimeoutId);\n setScrollTimeoutId(0);\n };\n var getTopWithEdgeOffset = function (elem) {\n return Math.max(0, container.getTopOf(elem) - edgeOffset);\n };\n\n /**\n * Scrolls to a specific vertical position in the document.\n *\n * @param {targetY} The vertical position within the document.\n * @param {duration} Optionally the duration of the scroll operation.\n * If not provided the default duration is used.\n * @param {onDone} An optional callback function to be invoked once the scroll finished.\n */\n var scrollToY = function (targetY, duration, onDone) {\n stopScroll();\n if (duration === 0 || duration && duration < 0 || isNativeSmoothScrollEnabledOn(container.body)) {\n container.toY(targetY);\n if (onDone) {\n onDone();\n }\n } else {\n var startY = container.getY();\n var distance = Math.max(0, targetY) - startY;\n var startTime = new Date().getTime();\n duration = duration || Math.min(Math.abs(distance), defaultDuration);\n (function loopScroll() {\n setScrollTimeoutId(setTimeout(function () {\n // Calculate percentage:\n var p = Math.min(1, (new Date().getTime() - startTime) / duration);\n // Calculate the absolute vertical position:\n var y = Math.max(0, Math.floor(startY + distance * (p < 0.5 ? 2 * p * p : p * (4 - p * 2) - 1)));\n container.toY(y);\n if (p < 1 && container.getHeight() + y < container.body.scrollHeight) {\n loopScroll();\n } else {\n setTimeout(stopScroll, 99); // with cooldown time\n if (onDone) {\n onDone();\n }\n }\n }, 9));\n })();\n }\n };\n\n /**\n * Scrolls to the top of a specific element.\n *\n * @param {elem} The element to scroll to.\n * @param {duration} Optionally the duration of the scroll operation.\n * @param {onDone} An optional callback function to be invoked once the scroll finished.\n */\n var scrollToElem = function (elem, duration, onDone) {\n scrollToY(getTopWithEdgeOffset(elem), duration, onDone);\n };\n\n /**\n * Scrolls an element into view if necessary.\n *\n * @param {elem} The element.\n * @param {duration} Optionally the duration of the scroll operation.\n * @param {onDone} An optional callback function to be invoked once the scroll finished.\n */\n var scrollIntoView = function (elem, duration, onDone) {\n var elemHeight = elem.getBoundingClientRect().height;\n var elemBottom = container.getTopOf(elem) + elemHeight;\n var containerHeight = container.getHeight();\n var y = container.getY();\n var containerBottom = y + containerHeight;\n if (getTopWithEdgeOffset(elem) < y || elemHeight + edgeOffset > containerHeight) {\n // Element is clipped at top or is higher than screen.\n scrollToElem(elem, duration, onDone);\n } else if (elemBottom + edgeOffset > containerBottom) {\n // Element is clipped at the bottom.\n scrollToY(elemBottom - containerHeight + edgeOffset, duration, onDone);\n } else if (onDone) {\n onDone();\n }\n };\n\n /**\n * Scrolls to the center of an element.\n *\n * @param {elem} The element.\n * @param {duration} Optionally the duration of the scroll operation.\n * @param {offset} Optionally the offset of the top of the element from the center of the screen.\n * A value of 0 is ignored.\n * @param {onDone} An optional callback function to be invoked once the scroll finished.\n */\n var scrollToCenterOf = function (elem, duration, offset, onDone) {\n scrollToY(Math.max(0, container.getTopOf(elem) - container.getHeight() / 2 + (offset || elem.getBoundingClientRect().height / 2)), duration, onDone);\n };\n\n /**\n * Changes default settings for this scroller.\n *\n * @param {newDefaultDuration} Optionally a new value for default duration, used for each scroll method by default.\n * Ignored if null or undefined.\n * @param {newEdgeOffset} Optionally a new value for the edge offset, used by each scroll method by default. Ignored if null or undefined.\n * @returns An object with the current values.\n */\n var setup = function (newDefaultDuration, newEdgeOffset) {\n if (newDefaultDuration === 0 || newDefaultDuration) {\n defaultDuration = newDefaultDuration;\n }\n if (newEdgeOffset === 0 || newEdgeOffset) {\n edgeOffset = newEdgeOffset;\n }\n return {\n defaultDuration: defaultDuration,\n edgeOffset: edgeOffset\n };\n };\n return {\n setup: setup,\n to: scrollToElem,\n toY: scrollToY,\n intoView: scrollIntoView,\n center: scrollToCenterOf,\n stop: stopScroll,\n moving: function () {\n return !!scrollTimeoutId;\n },\n getY: container.getY,\n getTopOf: container.getTopOf\n };\n };\n var docElem = document.documentElement;\n var getDocY = function () {\n return window.scrollY || docElem.scrollTop;\n };\n\n // Create a scroller for the document:\n var zenscroll = makeScroller({\n body: document.scrollingElement || document.body,\n toY: function (y) {\n window.scrollTo(0, y);\n },\n getY: getDocY,\n getHeight: function () {\n return window.innerHeight || docElem.clientHeight;\n },\n getTopOf: function (elem) {\n return elem.getBoundingClientRect().top + getDocY() - docElem.offsetTop;\n }\n });\n\n /**\n * Creates a scroller from the provided container element (e.g., a DIV)\n *\n * @param {scrollContainer} The vertical position within the document.\n * @param {defaultDuration} Optionally a value for default duration, used for each scroll method by default.\n * Ignored if 0 or null or undefined.\n * @param {edgeOffset} Optionally a value for the edge offset, used by each scroll method by default. \n * Ignored if null or undefined.\n * @returns A scroller object, similar to `zenscroll` but controlling the provided element.\n */\n zenscroll.createScroller = function (scrollContainer, defaultDuration, edgeOffset) {\n return makeScroller({\n body: scrollContainer,\n toY: function (y) {\n scrollContainer.scrollTop = y;\n },\n getY: function () {\n return scrollContainer.scrollTop;\n },\n getHeight: function () {\n return Math.min(scrollContainer.clientHeight, window.innerHeight || docElem.clientHeight);\n },\n getTopOf: function (elem) {\n return elem.offsetTop;\n }\n }, defaultDuration, edgeOffset);\n };\n\n // Automatic link-smoothing on achors\n // Exclude IE8- or when native is enabled or Zenscroll auto- is disabled\n if (\"addEventListener\" in window && !window.noZensmooth && !isNativeSmoothScrollEnabledOn(document.body)) {\n var isHistorySupported = \"history\" in window && \"pushState\" in history;\n var isScrollRestorationSupported = isHistorySupported && \"scrollRestoration\" in history;\n\n // On first load & refresh make sure the browser restores the position first\n if (isScrollRestorationSupported) {\n history.scrollRestoration = \"auto\";\n }\n window.addEventListener(\"load\", function () {\n if (isScrollRestorationSupported) {\n // Set it to manual\n setTimeout(function () {\n history.scrollRestoration = \"manual\";\n }, 9);\n window.addEventListener(\"popstate\", function (event) {\n if (event.state && \"zenscrollY\" in event.state) {\n zenscroll.toY(event.state.zenscrollY);\n }\n }, false);\n }\n\n // Add edge offset on first load if necessary\n // This may not work on IE (or older computer?) as it requires more timeout, around 100 ms\n if (window.location.hash) {\n setTimeout(function () {\n // Adjustment is only needed if there is an edge offset:\n var edgeOffset = zenscroll.setup().edgeOffset;\n if (edgeOffset) {\n var targetElem = document.getElementById(window.location.href.split(\"#\")[1]);\n if (targetElem) {\n var targetY = Math.max(0, zenscroll.getTopOf(targetElem) - edgeOffset);\n var diff = zenscroll.getY() - targetY;\n // Only do the adjustment if the browser is very close to the element:\n if (0 <= diff && diff < 9) {\n window.scrollTo(0, targetY);\n }\n }\n }\n }, 9);\n }\n }, false);\n\n // Handling clicks on anchors\n var RE_noZensmooth = new RegExp(\"(^|\\\\s)noZensmooth(\\\\s|$)\");\n window.addEventListener(\"click\", function (event) {\n var anchor = event.target;\n while (anchor && anchor.tagName !== \"A\") {\n anchor = anchor.parentNode;\n }\n // Let the browser handle the click if it wasn't with the primary button, or with some modifier keys:\n if (!anchor || event.which !== 1 || event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {\n return;\n }\n // Save the current scrolling position so it can be used for scroll restoration:\n if (isScrollRestorationSupported) {\n var historyState = history.state && typeof history.state === \"object\" ? history.state : {};\n historyState.zenscrollY = zenscroll.getY();\n try {\n history.replaceState(historyState, \"\");\n } catch (e) {\n // Avoid the Chrome Security exception on file protocol, e.g., file://index.html\n }\n }\n // Find the referenced ID:\n var href = anchor.getAttribute(\"href\") || \"\";\n if (href.indexOf(\"#\") === 0 && !RE_noZensmooth.test(anchor.className)) {\n var targetY = 0;\n var targetElem = document.getElementById(href.substring(1));\n if (href !== \"#\") {\n if (!targetElem) {\n // Let the browser handle the click if the target ID is not found.\n return;\n }\n targetY = zenscroll.getTopOf(targetElem);\n }\n event.preventDefault();\n // By default trigger the browser's `hashchange` event...\n var onDone = function () {\n window.location = href;\n };\n // ...unless there is an edge offset specified\n var edgeOffset = zenscroll.setup().edgeOffset;\n if (edgeOffset) {\n targetY = Math.max(0, targetY - edgeOffset);\n if (isHistorySupported) {\n onDone = function () {\n history.pushState({}, \"\", href);\n };\n }\n }\n zenscroll.toY(targetY, null, onDone);\n }\n }, false);\n }\n return zenscroll;\n});","/**\n * @license\n * MIT License\n * \n * Copyright (c) 2014-present, Lee Byron and other contributors.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// Used for setting prototype methods that IE8 chokes on.\nvar DELETE = 'delete';\n\n// Constants describing the size of trie nodes.\nvar SHIFT = 5; // Resulted in best performance after ______?\nvar SIZE = 1 << SHIFT;\nvar MASK = SIZE - 1;\n\n// A consistent shared value representing \"not set\" which equals nothing other\n// than itself, and nothing that could be provided externally.\nvar NOT_SET = {};\n\n// Boolean references, Rough equivalent of `bool &`.\nfunction MakeRef() {\n return {\n value: false\n };\n}\nfunction SetRef(ref) {\n if (ref) {\n ref.value = true;\n }\n}\n\n// A function which returns a value representing an \"owner\" for transient writes\n// to tries. The return value will only ever equal itself, and will not equal\n// the return of any subsequent call of this function.\nfunction OwnerID() {}\nfunction ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n}\nfunction wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n}\nfunction returnTrue() {\n return true;\n}\nfunction wholeSlice(begin, end, size) {\n return (begin === 0 && !isNeg(begin) || size !== undefined && begin <= -size) && (end === undefined || size !== undefined && end >= size);\n}\nfunction resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n}\nfunction resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n}\nfunction resolveIndex(index, size, defaultIndex) {\n // Sanitize indices using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n return index === undefined ? defaultIndex : isNeg(index) ? size === Infinity ? size : Math.max(0, size + index) | 0 : size === undefined || size === index ? index : Math.min(size, index) | 0;\n}\nfunction isNeg(value) {\n // Account for -0 which is negative, but not less than 0.\n return value < 0 || value === 0 && 1 / value === -Infinity;\n}\n\n// Note: value is unchanged to not break immutable-devtools.\nvar IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';\nfunction isCollection(maybeCollection) {\n return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]);\n}\nvar IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@';\nfunction isKeyed(maybeKeyed) {\n return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]);\n}\nvar IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@';\nfunction isIndexed(maybeIndexed) {\n return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]);\n}\nfunction isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n}\nvar Collection = function Collection(value) {\n // eslint-disable-next-line no-constructor-return\n return isCollection(value) ? value : Seq(value);\n};\nvar KeyedCollection = /*@__PURE__*/function (Collection) {\n function KeyedCollection(value) {\n // eslint-disable-next-line no-constructor-return\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n if (Collection) KeyedCollection.__proto__ = Collection;\n KeyedCollection.prototype = Object.create(Collection && Collection.prototype);\n KeyedCollection.prototype.constructor = KeyedCollection;\n return KeyedCollection;\n}(Collection);\nvar IndexedCollection = /*@__PURE__*/function (Collection) {\n function IndexedCollection(value) {\n // eslint-disable-next-line no-constructor-return\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n if (Collection) IndexedCollection.__proto__ = Collection;\n IndexedCollection.prototype = Object.create(Collection && Collection.prototype);\n IndexedCollection.prototype.constructor = IndexedCollection;\n return IndexedCollection;\n}(Collection);\nvar SetCollection = /*@__PURE__*/function (Collection) {\n function SetCollection(value) {\n // eslint-disable-next-line no-constructor-return\n return isCollection(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n if (Collection) SetCollection.__proto__ = Collection;\n SetCollection.prototype = Object.create(Collection && Collection.prototype);\n SetCollection.prototype.constructor = SetCollection;\n return SetCollection;\n}(Collection);\nCollection.Keyed = KeyedCollection;\nCollection.Indexed = IndexedCollection;\nCollection.Set = SetCollection;\nvar IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@';\nfunction isSeq(maybeSeq) {\n return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]);\n}\nvar IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@';\nfunction isRecord(maybeRecord) {\n return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]);\n}\nfunction isImmutable(maybeImmutable) {\n return isCollection(maybeImmutable) || isRecord(maybeImmutable);\n}\nvar IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@';\nfunction isOrdered(maybeOrdered) {\n return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]);\n}\nvar ITERATE_KEYS = 0;\nvar ITERATE_VALUES = 1;\nvar ITERATE_ENTRIES = 2;\nvar REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nvar ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\nvar Iterator = function Iterator(next) {\n this.next = next;\n};\nIterator.prototype.toString = function toString() {\n return '[Iterator]';\n};\nIterator.KEYS = ITERATE_KEYS;\nIterator.VALUES = ITERATE_VALUES;\nIterator.ENTRIES = ITERATE_ENTRIES;\nIterator.prototype.inspect = Iterator.prototype.toSource = function () {\n return this.toString();\n};\nIterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n};\nfunction iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult ? iteratorResult.value = value : iteratorResult = {\n value: value,\n done: false\n };\n return iteratorResult;\n}\nfunction iteratorDone() {\n return {\n value: undefined,\n done: true\n };\n}\nfunction hasIterator(maybeIterable) {\n if (Array.isArray(maybeIterable)) {\n // IE11 trick as it does not support `Symbol.iterator`\n return true;\n }\n return !!getIteratorFn(maybeIterable);\n}\nfunction isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n}\nfunction getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n}\nfunction getIteratorFn(iterable) {\n var iteratorFn = iterable && (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL] || iterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\nfunction isEntriesIterable(maybeIterable) {\n var iteratorFn = getIteratorFn(maybeIterable);\n return iteratorFn && iteratorFn === maybeIterable.entries;\n}\nfunction isKeysIterable(maybeIterable) {\n var iteratorFn = getIteratorFn(maybeIterable);\n return iteratorFn && iteratorFn === maybeIterable.keys;\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction isArrayLike(value) {\n if (Array.isArray(value) || typeof value === 'string') {\n return true;\n }\n return value && typeof value === 'object' && Number.isInteger(value.length) && value.length >= 0 && (value.length === 0 ?\n // Only {length: 0} is considered Array-like.\n Object.keys(value).length === 1 :\n // An object is only Array-like if it has a property where the last value\n // in the array-like may be found (which could be undefined).\n value.hasOwnProperty(value.length - 1));\n}\nvar Seq = /*@__PURE__*/function (Collection) {\n function Seq(value) {\n // eslint-disable-next-line no-constructor-return\n return value === undefined || value === null ? emptySequence() : isImmutable(value) ? value.toSeq() : seqFromValue(value);\n }\n if (Collection) Seq.__proto__ = Collection;\n Seq.prototype = Object.create(Collection && Collection.prototype);\n Seq.prototype.constructor = Seq;\n Seq.prototype.toSeq = function toSeq() {\n return this;\n };\n Seq.prototype.toString = function toString() {\n return this.__toString('Seq {', '}');\n };\n Seq.prototype.cacheResult = function cacheResult() {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function __iterate(fn, reverse) {\n var cache = this._cache;\n if (cache) {\n var size = cache.length;\n var i = 0;\n while (i !== size) {\n var entry = cache[reverse ? size - ++i : i++];\n if (fn(entry[1], entry[0], this) === false) {\n break;\n }\n }\n return i;\n }\n return this.__iterateUncached(fn, reverse);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function __iterator(type, reverse) {\n var cache = this._cache;\n if (cache) {\n var size = cache.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var entry = cache[reverse ? size - ++i : i++];\n return iteratorValue(type, entry[0], entry[1]);\n });\n }\n return this.__iteratorUncached(type, reverse);\n };\n return Seq;\n}(Collection);\nvar KeyedSeq = /*@__PURE__*/function (Seq) {\n function KeyedSeq(value) {\n // eslint-disable-next-line no-constructor-return\n return value === undefined || value === null ? emptySequence().toKeyedSeq() : isCollection(value) ? isKeyed(value) ? value.toSeq() : value.fromEntrySeq() : isRecord(value) ? value.toSeq() : keyedSeqFromValue(value);\n }\n if (Seq) KeyedSeq.__proto__ = Seq;\n KeyedSeq.prototype = Object.create(Seq && Seq.prototype);\n KeyedSeq.prototype.constructor = KeyedSeq;\n KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq() {\n return this;\n };\n return KeyedSeq;\n}(Seq);\nvar IndexedSeq = /*@__PURE__*/function (Seq) {\n function IndexedSeq(value) {\n // eslint-disable-next-line no-constructor-return\n return value === undefined || value === null ? emptySequence() : isCollection(value) ? isKeyed(value) ? value.entrySeq() : value.toIndexedSeq() : isRecord(value) ? value.toSeq().entrySeq() : indexedSeqFromValue(value);\n }\n if (Seq) IndexedSeq.__proto__ = Seq;\n IndexedSeq.prototype = Object.create(Seq && Seq.prototype);\n IndexedSeq.prototype.constructor = IndexedSeq;\n IndexedSeq.of = function of(/*...values*/\n ) {\n return IndexedSeq(arguments);\n };\n IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq() {\n return this;\n };\n IndexedSeq.prototype.toString = function toString() {\n return this.__toString('Seq [', ']');\n };\n return IndexedSeq;\n}(Seq);\nvar SetSeq = /*@__PURE__*/function (Seq) {\n function SetSeq(value) {\n // eslint-disable-next-line no-constructor-return\n return (isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value)).toSetSeq();\n }\n if (Seq) SetSeq.__proto__ = Seq;\n SetSeq.prototype = Object.create(Seq && Seq.prototype);\n SetSeq.prototype.constructor = SetSeq;\n SetSeq.of = function of(/*...values*/\n ) {\n return SetSeq(arguments);\n };\n SetSeq.prototype.toSetSeq = function toSetSeq() {\n return this;\n };\n return SetSeq;\n}(Seq);\nSeq.isSeq = isSeq;\nSeq.Keyed = KeyedSeq;\nSeq.Set = SetSeq;\nSeq.Indexed = IndexedSeq;\nSeq.prototype[IS_SEQ_SYMBOL] = true;\n\n// #pragma Root Sequences\n\nvar ArraySeq = /*@__PURE__*/function (IndexedSeq) {\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n if (IndexedSeq) ArraySeq.__proto__ = IndexedSeq;\n ArraySeq.prototype = Object.create(IndexedSeq && IndexedSeq.prototype);\n ArraySeq.prototype.constructor = ArraySeq;\n ArraySeq.prototype.get = function get(index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n ArraySeq.prototype.__iterate = function __iterate(fn, reverse) {\n var array = this._array;\n var size = array.length;\n var i = 0;\n while (i !== size) {\n var ii = reverse ? size - ++i : i++;\n if (fn(array[ii], ii, this) === false) {\n break;\n }\n }\n return i;\n };\n ArraySeq.prototype.__iterator = function __iterator(type, reverse) {\n var array = this._array;\n var size = array.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var ii = reverse ? size - ++i : i++;\n return iteratorValue(type, ii, array[ii]);\n });\n };\n return ArraySeq;\n}(IndexedSeq);\nvar ObjectSeq = /*@__PURE__*/function (KeyedSeq) {\n function ObjectSeq(object) {\n var keys = Object.keys(object).concat(Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : []);\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n if (KeyedSeq) ObjectSeq.__proto__ = KeyedSeq;\n ObjectSeq.prototype = Object.create(KeyedSeq && KeyedSeq.prototype);\n ObjectSeq.prototype.constructor = ObjectSeq;\n ObjectSeq.prototype.get = function get(key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n ObjectSeq.prototype.has = function has(key) {\n return hasOwnProperty.call(this._object, key);\n };\n ObjectSeq.prototype.__iterate = function __iterate(fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var size = keys.length;\n var i = 0;\n while (i !== size) {\n var key = keys[reverse ? size - ++i : i++];\n if (fn(object[key], key, this) === false) {\n break;\n }\n }\n return i;\n };\n ObjectSeq.prototype.__iterator = function __iterator(type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var size = keys.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var key = keys[reverse ? size - ++i : i++];\n return iteratorValue(type, key, object[key]);\n });\n };\n return ObjectSeq;\n}(KeyedSeq);\nObjectSeq.prototype[IS_ORDERED_SYMBOL] = true;\nvar CollectionSeq = /*@__PURE__*/function (IndexedSeq) {\n function CollectionSeq(collection) {\n this._collection = collection;\n this.size = collection.length || collection.size;\n }\n if (IndexedSeq) CollectionSeq.__proto__ = IndexedSeq;\n CollectionSeq.prototype = Object.create(IndexedSeq && IndexedSeq.prototype);\n CollectionSeq.prototype.constructor = CollectionSeq;\n CollectionSeq.prototype.__iterateUncached = function __iterateUncached(fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var collection = this._collection;\n var iterator = getIterator(collection);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached(type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var collection = this._collection;\n var iterator = getIterator(collection);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n return CollectionSeq;\n}(IndexedSeq);\n\n// # pragma Helper functions\n\nvar EMPTY_SEQ;\nfunction emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n}\nfunction keyedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return seq.fromEntrySeq();\n }\n if (typeof value === 'object') {\n return new ObjectSeq(value);\n }\n throw new TypeError('Expected Array or collection object of [k, v] entries, or keyed object: ' + value);\n}\nfunction indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return seq;\n }\n throw new TypeError('Expected Array or collection object of values: ' + value);\n}\nfunction seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return isEntriesIterable(value) ? seq.fromEntrySeq() : isKeysIterable(value) ? seq.toSetSeq() : seq;\n }\n if (typeof value === 'object') {\n return new ObjectSeq(value);\n }\n throw new TypeError('Expected Array or collection object of values, or keyed object: ' + value);\n}\nfunction maybeIndexedSeqFromValue(value) {\n return isArrayLike(value) ? new ArraySeq(value) : hasIterator(value) ? new CollectionSeq(value) : undefined;\n}\nvar IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@';\nfunction isMap(maybeMap) {\n return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]);\n}\nfunction isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n}\nfunction isValueObject(maybeValue) {\n return Boolean(maybeValue && typeof maybeValue.equals === 'function' && typeof maybeValue.hashCode === 'function');\n}\n\n/**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections are Value Objects: they implement `equals()`\n * and `hashCode()`.\n */\nfunction is(valueA, valueB) {\n if (valueA === valueB || valueA !== valueA && valueB !== valueB) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || valueA !== valueA && valueB !== valueB) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n return !!(isValueObject(valueA) && isValueObject(valueB) && valueA.equals(valueB));\n}\nvar imul = typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? Math.imul : function imul(a, b) {\n a |= 0; // int\n b |= 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return c * d + ((a >>> 16) * d + c * (b >>> 16) << 16 >>> 0) | 0; // int\n};\n\n// v8 has an optimization for storing 31-bit signed numbers.\n// Values which have either 00 or 11 as the high order bits qualify.\n// This function drops the highest order bit in a signed number, maintaining\n// the sign bit.\nfunction smi(i32) {\n return i32 >>> 1 & 0x40000000 | i32 & 0xbfffffff;\n}\nvar defaultValueOf = Object.prototype.valueOf;\nfunction hash(o) {\n if (o == null) {\n return hashNullish(o);\n }\n if (typeof o.hashCode === 'function') {\n // Drop any high bits from accidentally long hash codes.\n return smi(o.hashCode(o));\n }\n var v = valueOf(o);\n if (v == null) {\n return hashNullish(v);\n }\n switch (typeof v) {\n case 'boolean':\n // The hash values for built-in constants are a 1 value for each 5-byte\n // shift region expect for the first, which encodes the value. This\n // reduces the odds of a hash collision for these common values.\n return v ? 0x42108421 : 0x42108420;\n case 'number':\n return hashNumber(v);\n case 'string':\n return v.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(v) : hashString(v);\n case 'object':\n case 'function':\n return hashJSObj(v);\n case 'symbol':\n return hashSymbol(v);\n default:\n if (typeof v.toString === 'function') {\n return hashString(v.toString());\n }\n throw new Error('Value type ' + typeof v + ' cannot be hashed.');\n }\n}\nfunction hashNullish(nullish) {\n return nullish === null ? 0x42108422 : /* undefined */0x42108423;\n}\n\n// Compress arbitrarily large numbers into smi hashes.\nfunction hashNumber(n) {\n if (n !== n || n === Infinity) {\n return 0;\n }\n var hash = n | 0;\n if (hash !== n) {\n hash ^= n * 0xffffffff;\n }\n while (n > 0xffffffff) {\n n /= 0xffffffff;\n hash ^= n;\n }\n return smi(hash);\n}\nfunction cachedHashString(string) {\n var hashed = stringHashCache[string];\n if (hashed === undefined) {\n hashed = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hashed;\n }\n return hashed;\n}\n\n// http://jsperf.com/hashing-strings\nfunction hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hashed = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hashed = 31 * hashed + string.charCodeAt(ii) | 0;\n }\n return smi(hashed);\n}\nfunction hashSymbol(sym) {\n var hashed = symbolMap[sym];\n if (hashed !== undefined) {\n return hashed;\n }\n hashed = nextHash();\n symbolMap[sym] = hashed;\n return hashed;\n}\nfunction hashJSObj(obj) {\n var hashed;\n if (usingWeakMap) {\n hashed = weakMap.get(obj);\n if (hashed !== undefined) {\n return hashed;\n }\n }\n hashed = obj[UID_HASH_KEY];\n if (hashed !== undefined) {\n return hashed;\n }\n if (!canDefineProperty) {\n hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hashed !== undefined) {\n return hashed;\n }\n hashed = getIENodeHash(obj);\n if (hashed !== undefined) {\n return hashed;\n }\n }\n hashed = nextHash();\n if (usingWeakMap) {\n weakMap.set(obj, hashed);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: hashed\n });\n } else if (obj.propertyIsEnumerable !== undefined && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function () {\n return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hashed;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hashed;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n return hashed;\n}\n\n// Get references to ES5 object methods.\nvar isExtensible = Object.isExtensible;\n\n// True if Object.defineProperty works as expected. IE8 fails this test.\nvar canDefineProperty = function () {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n}();\n\n// IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n// and avoid memory leaks from the IE cloneNode bug.\nfunction getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1:\n // Element\n return node.uniqueID;\n case 9:\n // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n}\nfunction valueOf(obj) {\n return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function' ? obj.valueOf(obj) : obj;\n}\nfunction nextHash() {\n var nextHash = ++_objHashUID;\n if (_objHashUID & 0x40000000) {\n _objHashUID = 0;\n }\n return nextHash;\n}\n\n// If possible, use a WeakMap.\nvar usingWeakMap = typeof WeakMap === 'function';\nvar weakMap;\nif (usingWeakMap) {\n weakMap = new WeakMap();\n}\nvar symbolMap = Object.create(null);\nvar _objHashUID = 0;\nvar UID_HASH_KEY = '__immutablehash__';\nif (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n}\nvar STRING_HASH_CACHE_MIN_STRLEN = 16;\nvar STRING_HASH_CACHE_MAX_SIZE = 255;\nvar STRING_HASH_CACHE_SIZE = 0;\nvar stringHashCache = {};\nvar ToKeyedSequence = /*@__PURE__*/function (KeyedSeq) {\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n if (KeyedSeq) ToKeyedSequence.__proto__ = KeyedSeq;\n ToKeyedSequence.prototype = Object.create(KeyedSeq && KeyedSeq.prototype);\n ToKeyedSequence.prototype.constructor = ToKeyedSequence;\n ToKeyedSequence.prototype.get = function get(key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n ToKeyedSequence.prototype.has = function has(key) {\n return this._iter.has(key);\n };\n ToKeyedSequence.prototype.valueSeq = function valueSeq() {\n return this._iter.valueSeq();\n };\n ToKeyedSequence.prototype.reverse = function reverse() {\n var this$1$1 = this;\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function () {\n return this$1$1._iter.toSeq().reverse();\n };\n }\n return reversedSequence;\n };\n ToKeyedSequence.prototype.map = function map(mapper, context) {\n var this$1$1 = this;\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function () {\n return this$1$1._iter.toSeq().map(mapper, context);\n };\n }\n return mappedSequence;\n };\n ToKeyedSequence.prototype.__iterate = function __iterate(fn, reverse) {\n var this$1$1 = this;\n return this._iter.__iterate(function (v, k) {\n return fn(v, k, this$1$1);\n }, reverse);\n };\n ToKeyedSequence.prototype.__iterator = function __iterator(type, reverse) {\n return this._iter.__iterator(type, reverse);\n };\n return ToKeyedSequence;\n}(KeyedSeq);\nToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true;\nvar ToIndexedSequence = /*@__PURE__*/function (IndexedSeq) {\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n if (IndexedSeq) ToIndexedSequence.__proto__ = IndexedSeq;\n ToIndexedSequence.prototype = Object.create(IndexedSeq && IndexedSeq.prototype);\n ToIndexedSequence.prototype.constructor = ToIndexedSequence;\n ToIndexedSequence.prototype.includes = function includes(value) {\n return this._iter.includes(value);\n };\n ToIndexedSequence.prototype.__iterate = function __iterate(fn, reverse) {\n var this$1$1 = this;\n var i = 0;\n reverse && ensureSize(this);\n return this._iter.__iterate(function (v) {\n return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1);\n }, reverse);\n };\n ToIndexedSequence.prototype.__iterator = function __iterator(type, reverse) {\n var this$1$1 = this;\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var i = 0;\n reverse && ensureSize(this);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, reverse ? this$1$1.size - ++i : i++, step.value, step);\n });\n };\n return ToIndexedSequence;\n}(IndexedSeq);\nvar ToSetSequence = /*@__PURE__*/function (SetSeq) {\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n if (SetSeq) ToSetSequence.__proto__ = SetSeq;\n ToSetSequence.prototype = Object.create(SetSeq && SetSeq.prototype);\n ToSetSequence.prototype.constructor = ToSetSequence;\n ToSetSequence.prototype.has = function has(key) {\n return this._iter.includes(key);\n };\n ToSetSequence.prototype.__iterate = function __iterate(fn, reverse) {\n var this$1$1 = this;\n return this._iter.__iterate(function (v) {\n return fn(v, v, this$1$1);\n }, reverse);\n };\n ToSetSequence.prototype.__iterator = function __iterator(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, step.value, step.value, step);\n });\n };\n return ToSetSequence;\n}(SetSeq);\nvar FromEntriesSequence = /*@__PURE__*/function (KeyedSeq) {\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n if (KeyedSeq) FromEntriesSequence.__proto__ = KeyedSeq;\n FromEntriesSequence.prototype = Object.create(KeyedSeq && KeyedSeq.prototype);\n FromEntriesSequence.prototype.constructor = FromEntriesSequence;\n FromEntriesSequence.prototype.entrySeq = function entrySeq() {\n return this._iter.toSeq();\n };\n FromEntriesSequence.prototype.__iterate = function __iterate(fn, reverse) {\n var this$1$1 = this;\n return this._iter.__iterate(function (entry) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedCollection = isCollection(entry);\n return fn(indexedCollection ? entry.get(1) : entry[1], indexedCollection ? entry.get(0) : entry[0], this$1$1);\n }\n }, reverse);\n };\n FromEntriesSequence.prototype.__iterator = function __iterator(type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedCollection = isCollection(entry);\n return iteratorValue(type, indexedCollection ? entry.get(0) : entry[0], indexedCollection ? entry.get(1) : entry[1], step);\n }\n }\n });\n };\n return FromEntriesSequence;\n}(KeyedSeq);\nToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough;\nfunction flipFactory(collection) {\n var flipSequence = makeSequence(collection);\n flipSequence._iter = collection;\n flipSequence.size = collection.size;\n flipSequence.flip = function () {\n return collection;\n };\n flipSequence.reverse = function () {\n var reversedSequence = collection.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function () {\n return collection.reverse();\n };\n return reversedSequence;\n };\n flipSequence.has = function (key) {\n return collection.includes(key);\n };\n flipSequence.includes = function (key) {\n return collection.has(key);\n };\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n return collection.__iterate(function (v, k) {\n return fn(k, v, this$1$1) !== false;\n }, reverse);\n };\n flipSequence.__iteratorUncached = function (type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = collection.__iterator(type, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return collection.__iterator(type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse);\n };\n return flipSequence;\n}\nfunction mapFactory(collection, mapper, context) {\n var mappedSequence = makeSequence(collection);\n mappedSequence.size = collection.size;\n mappedSequence.has = function (key) {\n return collection.has(key);\n };\n mappedSequence.get = function (key, notSetValue) {\n var v = collection.get(key, NOT_SET);\n return v === NOT_SET ? notSetValue : mapper.call(context, v, key, collection);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n return collection.__iterate(function (v, k, c) {\n return fn(mapper.call(context, v, k, c), k, this$1$1) !== false;\n }, reverse);\n };\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(type, key, mapper.call(context, entry[1], key, collection), step);\n });\n };\n return mappedSequence;\n}\nfunction reverseFactory(collection, useKeys) {\n var this$1$1 = this;\n var reversedSequence = makeSequence(collection);\n reversedSequence._iter = collection;\n reversedSequence.size = collection.size;\n reversedSequence.reverse = function () {\n return collection;\n };\n if (collection.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(collection);\n flipSequence.reverse = function () {\n return collection.flip();\n };\n return flipSequence;\n };\n }\n reversedSequence.get = function (key, notSetValue) {\n return collection.get(useKeys ? key : -1 - key, notSetValue);\n };\n reversedSequence.has = function (key) {\n return collection.has(useKeys ? key : -1 - key);\n };\n reversedSequence.includes = function (value) {\n return collection.includes(value);\n };\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {\n var this$1$1 = this;\n var i = 0;\n reverse && ensureSize(collection);\n return collection.__iterate(function (v, k) {\n return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1);\n }, !reverse);\n };\n reversedSequence.__iterator = function (type, reverse) {\n var i = 0;\n reverse && ensureSize(collection);\n var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n return iteratorValue(type, useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++, entry[1], step);\n });\n };\n return reversedSequence;\n}\nfunction filterFactory(collection, predicate, context, useKeys) {\n var filterSequence = makeSequence(collection);\n if (useKeys) {\n filterSequence.has = function (key) {\n var v = collection.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, collection);\n };\n filterSequence.get = function (key, notSetValue) {\n var v = collection.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, collection) ? v : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1$1);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, collection)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n };\n return filterSequence;\n}\nfunction countByFactory(collection, grouper, context) {\n var groups = Map().asMutable();\n collection.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, collection), 0, function (a) {\n return a + 1;\n });\n });\n return groups.asImmutable();\n}\nfunction groupByFactory(collection, grouper, context) {\n var isKeyedIter = isKeyed(collection);\n var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable();\n collection.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, collection), function (a) {\n return a = a || [], a.push(isKeyedIter ? [k, v] : v), a;\n });\n });\n var coerce = collectionClass(collection);\n return groups.map(function (arr) {\n return reify(collection, coerce(arr));\n }).asImmutable();\n}\nfunction partitionFactory(collection, predicate, context) {\n var isKeyedIter = isKeyed(collection);\n var groups = [[], []];\n collection.__iterate(function (v, k) {\n groups[predicate.call(context, v, k, collection) ? 1 : 0].push(isKeyedIter ? [k, v] : v);\n });\n var coerce = collectionClass(collection);\n return groups.map(function (arr) {\n return reify(collection, coerce(arr));\n });\n}\nfunction sliceFactory(collection, begin, end, useKeys) {\n var originalSize = collection.size;\n if (wholeSlice(begin, end, originalSize)) {\n return collection;\n }\n\n // begin or end can not be resolved if they were provided as negative numbers and\n // this collection's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (typeof originalSize === 'undefined' && (begin < 0 || end < 0)) {\n return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);\n }\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n var sliceSeq = makeSequence(collection);\n\n // If collection.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size = sliceSize === 0 ? sliceSize : collection.size && sliceSize || undefined;\n if (!useKeys && isSeq(collection) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize ? collection.get(index + resolvedBegin, notSetValue) : notSetValue;\n };\n }\n sliceSeq.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n collection.__iterate(function (v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1$1) !== false && iterations !== sliceSize;\n }\n });\n return iterations;\n };\n sliceSeq.__iteratorUncached = function (type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n if (sliceSize === 0) {\n return new Iterator(iteratorDone);\n }\n var iterator = collection.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function () {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES || step.done) {\n return step;\n }\n if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n }\n return iteratorValue(type, iterations - 1, step.value[1], step);\n });\n };\n return sliceSeq;\n}\nfunction takeWhileFactory(collection, predicate, context) {\n var takeSequence = makeSequence(collection);\n takeSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1);\n });\n return iterations;\n };\n takeSequence.__iteratorUncached = function (type, reverse) {\n var this$1$1 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function () {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$1$1)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n}\nfunction skipWhileFactory(collection, predicate, context, useKeys) {\n var skipSequence = makeSequence(collection);\n skipSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1$1);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function (type, reverse) {\n var this$1$1 = this;\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function () {\n var step;\n var k;\n var v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n }\n if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n }\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$1$1));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n}\nfunction concatFactory(collection, values) {\n var isKeyedCollection = isKeyed(collection);\n var iters = [collection].concat(values).map(function (v) {\n if (!isCollection(v)) {\n v = isKeyedCollection ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedCollection) {\n v = KeyedCollection(v);\n }\n return v;\n }).filter(function (v) {\n return v.size !== 0;\n });\n if (iters.length === 0) {\n return collection;\n }\n if (iters.length === 1) {\n var singleton = iters[0];\n if (singleton === collection || isKeyedCollection && isKeyed(singleton) || isIndexed(collection) && isIndexed(singleton)) {\n return singleton;\n }\n }\n var concatSeq = new ArraySeq(iters);\n if (isKeyedCollection) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(collection)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(function (sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n }, 0);\n return concatSeq;\n}\nfunction flattenFactory(collection, depth, useKeys) {\n var flatSequence = makeSequence(collection);\n flatSequence.__iterateUncached = function (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {\n iter.__iterate(function (v, k) {\n if ((!depth || currentDepth < depth) && isCollection(v)) {\n flatDeep(v, currentDepth + 1);\n } else {\n iterations++;\n if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) {\n stopped = true;\n }\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(collection, 0);\n return iterations;\n };\n flatSequence.__iteratorUncached = function (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function () {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isCollection(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n };\n return flatSequence;\n}\nfunction flatMapFactory(collection, mapper, context) {\n var coerce = collectionClass(collection);\n return collection.toSeq().map(function (v, k) {\n return coerce(mapper.call(context, v, k, collection));\n }).flatten(true);\n}\nfunction interposeFactory(collection, separator) {\n var interposedSequence = makeSequence(collection);\n interposedSequence.size = collection.size && collection.size * 2 - 1;\n interposedSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n var iterations = 0;\n collection.__iterate(function (v) {\n return (!iterations || fn(separator, iterations++, this$1$1) !== false) && fn(v, iterations++, this$1$1) !== false;\n }, reverse);\n return iterations;\n };\n interposedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function () {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n}\nfunction sortFactory(collection, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedCollection = isKeyed(collection);\n var index = 0;\n var entries = collection.toSeq().map(function (v, k) {\n return [k, v, index++, mapper ? mapper(v, k, collection) : v];\n }).valueSeq().toArray();\n entries.sort(function (a, b) {\n return comparator(a[3], b[3]) || a[2] - b[2];\n }).forEach(isKeyedCollection ? function (v, i) {\n entries[i].length = 2;\n } : function (v, i) {\n entries[i] = v[1];\n });\n return isKeyedCollection ? KeyedSeq(entries) : isIndexed(collection) ? IndexedSeq(entries) : SetSeq(entries);\n}\nfunction maxFactory(collection, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = collection.toSeq().map(function (v, k) {\n return [v, mapper(v, k, collection)];\n }).reduce(function (a, b) {\n return maxCompare(comparator, a[1], b[1]) ? b : a;\n });\n return entry && entry[0];\n }\n return collection.reduce(function (a, b) {\n return maxCompare(comparator, a, b) ? b : a;\n });\n}\nfunction maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return comp === 0 && b !== a && (b === undefined || b === null || b !== b) || comp > 0;\n}\nfunction zipWithFactory(keyIter, zipper, iters, zipAll) {\n var zipSequence = makeSequence(keyIter);\n var sizes = new ArraySeq(iters).map(function (i) {\n return i.size;\n });\n zipSequence.size = zipAll ? sizes.max() : sizes.min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function (fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function (type, reverse) {\n var iterators = iters.map(function (i) {\n return i = Collection(i), getIterator(reverse ? i.reverse() : i);\n });\n var iterations = 0;\n var isDone = false;\n return new Iterator(function () {\n var steps;\n if (!isDone) {\n steps = iterators.map(function (i) {\n return i.next();\n });\n isDone = zipAll ? steps.every(function (s) {\n return s.done;\n }) : steps.some(function (s) {\n return s.done;\n });\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(type, iterations++, zipper.apply(null, steps.map(function (s) {\n return s.value;\n })));\n });\n };\n return zipSequence;\n}\n\n// #pragma Helper Functions\n\nfunction reify(iter, seq) {\n return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq);\n}\nfunction validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n}\nfunction collectionClass(collection) {\n return isKeyed(collection) ? KeyedCollection : isIndexed(collection) ? IndexedCollection : SetCollection;\n}\nfunction makeSequence(collection) {\n return Object.create((isKeyed(collection) ? KeyedSeq : isIndexed(collection) ? IndexedSeq : SetSeq).prototype);\n}\nfunction cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n }\n return Seq.prototype.cacheResult.call(this);\n}\nfunction defaultComparator(a, b) {\n if (a === undefined && b === undefined) {\n return 0;\n }\n if (a === undefined) {\n return 1;\n }\n if (b === undefined) {\n return -1;\n }\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\n// http://jsperf.com/copy-array-inline\nfunction arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n}\nfunction invariant(condition, error) {\n if (!condition) {\n throw new Error(error);\n }\n}\nfunction assertNotInfinite(size) {\n invariant(size !== Infinity, 'Cannot perform this action with an infinite size.');\n}\nfunction coerceKeyPath(keyPath) {\n if (isArrayLike(keyPath) && typeof keyPath !== 'string') {\n return keyPath;\n }\n if (isOrdered(keyPath)) {\n return keyPath.toArray();\n }\n throw new TypeError('Invalid keyPath: expected Ordered Collection or Array: ' + keyPath);\n}\nvar toString = Object.prototype.toString;\nfunction isPlainObject(value) {\n // The base prototype's toString deals with Argument objects and native namespaces like Math\n if (!value || typeof value !== 'object' || toString.call(value) !== '[object Object]') {\n return false;\n }\n var proto = Object.getPrototypeOf(value);\n if (proto === null) {\n return true;\n }\n\n // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc)\n var parentProto = proto;\n var nextProto = Object.getPrototypeOf(proto);\n while (nextProto !== null) {\n parentProto = nextProto;\n nextProto = Object.getPrototypeOf(parentProto);\n }\n return parentProto === proto;\n}\n\n/**\n * Returns true if the value is a potentially-persistent data structure, either\n * provided by Immutable.js or a plain Array or Object.\n */\nfunction isDataStructure(value) {\n return typeof value === 'object' && (isImmutable(value) || Array.isArray(value) || isPlainObject(value));\n}\n\n/**\n * Converts a value to a string, adding quotes if a string was provided.\n */\nfunction quoteString(value) {\n try {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n } catch (_ignoreError) {\n return JSON.stringify(value);\n }\n}\nfunction has(collection, key) {\n return isImmutable(collection) ? collection.has(key) : isDataStructure(collection) && hasOwnProperty.call(collection, key);\n}\nfunction get(collection, key, notSetValue) {\n return isImmutable(collection) ? collection.get(key, notSetValue) : !has(collection, key) ? notSetValue : typeof collection.get === 'function' ? collection.get(key) : collection[key];\n}\nfunction shallowCopy(from) {\n if (Array.isArray(from)) {\n return arrCopy(from);\n }\n var to = {};\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n return to;\n}\nfunction remove(collection, key) {\n if (!isDataStructure(collection)) {\n throw new TypeError('Cannot update non-data-structure value: ' + collection);\n }\n if (isImmutable(collection)) {\n if (!collection.remove) {\n throw new TypeError('Cannot update immutable value without .remove() method: ' + collection);\n }\n return collection.remove(key);\n }\n if (!hasOwnProperty.call(collection, key)) {\n return collection;\n }\n var collectionCopy = shallowCopy(collection);\n if (Array.isArray(collectionCopy)) {\n collectionCopy.splice(key, 1);\n } else {\n delete collectionCopy[key];\n }\n return collectionCopy;\n}\nfunction set(collection, key, value) {\n if (!isDataStructure(collection)) {\n throw new TypeError('Cannot update non-data-structure value: ' + collection);\n }\n if (isImmutable(collection)) {\n if (!collection.set) {\n throw new TypeError('Cannot update immutable value without .set() method: ' + collection);\n }\n return collection.set(key, value);\n }\n if (hasOwnProperty.call(collection, key) && value === collection[key]) {\n return collection;\n }\n var collectionCopy = shallowCopy(collection);\n collectionCopy[key] = value;\n return collectionCopy;\n}\nfunction updateIn$1(collection, keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeeply(isImmutable(collection), collection, coerceKeyPath(keyPath), 0, notSetValue, updater);\n return updatedValue === NOT_SET ? notSetValue : updatedValue;\n}\nfunction updateInDeeply(inImmutable, existing, keyPath, i, notSetValue, updater) {\n var wasNotSet = existing === NOT_SET;\n if (i === keyPath.length) {\n var existingValue = wasNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n if (!wasNotSet && !isDataStructure(existing)) {\n throw new TypeError('Cannot update within non-data-structure value in path [' + keyPath.slice(0, i).map(quoteString) + ']: ' + existing);\n }\n var key = keyPath[i];\n var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET);\n var nextUpdated = updateInDeeply(nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), nextExisting, keyPath, i + 1, notSetValue, updater);\n return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? remove(existing, key) : set(wasNotSet ? inImmutable ? emptyMap() : {} : existing, key, nextUpdated);\n}\nfunction setIn$1(collection, keyPath, value) {\n return updateIn$1(collection, keyPath, NOT_SET, function () {\n return value;\n });\n}\nfunction setIn(keyPath, v) {\n return setIn$1(this, keyPath, v);\n}\nfunction removeIn(collection, keyPath) {\n return updateIn$1(collection, keyPath, function () {\n return NOT_SET;\n });\n}\nfunction deleteIn(keyPath) {\n return removeIn(this, keyPath);\n}\nfunction update$1(collection, key, notSetValue, updater) {\n return updateIn$1(collection, [key], notSetValue, updater);\n}\nfunction update(key, notSetValue, updater) {\n return arguments.length === 1 ? key(this) : update$1(this, key, notSetValue, updater);\n}\nfunction updateIn(keyPath, notSetValue, updater) {\n return updateIn$1(this, keyPath, notSetValue, updater);\n}\nfunction merge$1() {\n var iters = [],\n len = arguments.length;\n while (len--) iters[len] = arguments[len];\n return mergeIntoKeyedWith(this, iters);\n}\nfunction mergeWith$1(merger) {\n var iters = [],\n len = arguments.length - 1;\n while (len-- > 0) iters[len] = arguments[len + 1];\n if (typeof merger !== 'function') {\n throw new TypeError('Invalid merger function: ' + merger);\n }\n return mergeIntoKeyedWith(this, iters, merger);\n}\nfunction mergeIntoKeyedWith(collection, collections, merger) {\n var iters = [];\n for (var ii = 0; ii < collections.length; ii++) {\n var collection$1 = KeyedCollection(collections[ii]);\n if (collection$1.size !== 0) {\n iters.push(collection$1);\n }\n }\n if (iters.length === 0) {\n return collection;\n }\n if (collection.toSeq().size === 0 && !collection.__ownerID && iters.length === 1) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function (collection) {\n var mergeIntoCollection = merger ? function (value, key) {\n update$1(collection, key, NOT_SET, function (oldVal) {\n return oldVal === NOT_SET ? value : merger(oldVal, value, key);\n });\n } : function (value, key) {\n collection.set(key, value);\n };\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoCollection);\n }\n });\n}\nfunction merge(collection) {\n var sources = [],\n len = arguments.length - 1;\n while (len-- > 0) sources[len] = arguments[len + 1];\n return mergeWithSources(collection, sources);\n}\nfunction mergeWith(merger, collection) {\n var sources = [],\n len = arguments.length - 2;\n while (len-- > 0) sources[len] = arguments[len + 2];\n return mergeWithSources(collection, sources, merger);\n}\nfunction mergeDeep$1(collection) {\n var sources = [],\n len = arguments.length - 1;\n while (len-- > 0) sources[len] = arguments[len + 1];\n return mergeDeepWithSources(collection, sources);\n}\nfunction mergeDeepWith$1(merger, collection) {\n var sources = [],\n len = arguments.length - 2;\n while (len-- > 0) sources[len] = arguments[len + 2];\n return mergeDeepWithSources(collection, sources, merger);\n}\nfunction mergeDeepWithSources(collection, sources, merger) {\n return mergeWithSources(collection, sources, deepMergerWith(merger));\n}\nfunction mergeWithSources(collection, sources, merger) {\n if (!isDataStructure(collection)) {\n throw new TypeError('Cannot merge into non-data-structure value: ' + collection);\n }\n if (isImmutable(collection)) {\n return typeof merger === 'function' && collection.mergeWith ? collection.mergeWith.apply(collection, [merger].concat(sources)) : collection.merge ? collection.merge.apply(collection, sources) : collection.concat.apply(collection, sources);\n }\n var isArray = Array.isArray(collection);\n var merged = collection;\n var Collection = isArray ? IndexedCollection : KeyedCollection;\n var mergeItem = isArray ? function (value) {\n // Copy on write\n if (merged === collection) {\n merged = shallowCopy(merged);\n }\n merged.push(value);\n } : function (value, key) {\n var hasVal = hasOwnProperty.call(merged, key);\n var nextVal = hasVal && merger ? merger(merged[key], value, key) : value;\n if (!hasVal || nextVal !== merged[key]) {\n // Copy on write\n if (merged === collection) {\n merged = shallowCopy(merged);\n }\n merged[key] = nextVal;\n }\n };\n for (var i = 0; i < sources.length; i++) {\n Collection(sources[i]).forEach(mergeItem);\n }\n return merged;\n}\nfunction deepMergerWith(merger) {\n function deepMerger(oldValue, newValue, key) {\n return isDataStructure(oldValue) && isDataStructure(newValue) && areMergeable(oldValue, newValue) ? mergeWithSources(oldValue, [newValue], deepMerger) : merger ? merger(oldValue, newValue, key) : newValue;\n }\n return deepMerger;\n}\n\n/**\n * It's unclear what the desired behavior is for merging two collections that\n * fall into separate categories between keyed, indexed, or set-like, so we only\n * consider them mergeable if they fall into the same category.\n */\nfunction areMergeable(oldDataStructure, newDataStructure) {\n var oldSeq = Seq(oldDataStructure);\n var newSeq = Seq(newDataStructure);\n // This logic assumes that a sequence can only fall into one of the three\n // categories mentioned above (since there's no `isSetLike()` method).\n return isIndexed(oldSeq) === isIndexed(newSeq) && isKeyed(oldSeq) === isKeyed(newSeq);\n}\nfunction mergeDeep() {\n var iters = [],\n len = arguments.length;\n while (len--) iters[len] = arguments[len];\n return mergeDeepWithSources(this, iters);\n}\nfunction mergeDeepWith(merger) {\n var iters = [],\n len = arguments.length - 1;\n while (len-- > 0) iters[len] = arguments[len + 1];\n return mergeDeepWithSources(this, iters, merger);\n}\nfunction mergeIn(keyPath) {\n var iters = [],\n len = arguments.length - 1;\n while (len-- > 0) iters[len] = arguments[len + 1];\n return updateIn$1(this, keyPath, emptyMap(), function (m) {\n return mergeWithSources(m, iters);\n });\n}\nfunction mergeDeepIn(keyPath) {\n var iters = [],\n len = arguments.length - 1;\n while (len-- > 0) iters[len] = arguments[len + 1];\n return updateIn$1(this, keyPath, emptyMap(), function (m) {\n return mergeDeepWithSources(m, iters);\n });\n}\nfunction withMutations(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n}\nfunction asMutable() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n}\nfunction asImmutable() {\n return this.__ensureOwner();\n}\nfunction wasAltered() {\n return this.__altered;\n}\nvar Map = /*@__PURE__*/function (KeyedCollection) {\n function Map(value) {\n // eslint-disable-next-line no-constructor-return\n return value === undefined || value === null ? emptyMap() : isMap(value) && !isOrdered(value) ? value : emptyMap().withMutations(function (map) {\n var iter = KeyedCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) {\n return map.set(k, v);\n });\n });\n }\n if (KeyedCollection) Map.__proto__ = KeyedCollection;\n Map.prototype = Object.create(KeyedCollection && KeyedCollection.prototype);\n Map.prototype.constructor = Map;\n Map.prototype.toString = function toString() {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function get(k, notSetValue) {\n return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function set(k, v) {\n return updateMap(this, k, v);\n };\n Map.prototype.remove = function remove(k) {\n return updateMap(this, k, NOT_SET);\n };\n Map.prototype.deleteAll = function deleteAll(keys) {\n var collection = Collection(keys);\n if (collection.size === 0) {\n return this;\n }\n return this.withMutations(function (map) {\n collection.forEach(function (key) {\n return map.remove(key);\n });\n });\n };\n Map.prototype.clear = function clear() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.sort = function sort(comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n Map.prototype.sortBy = function sortBy(mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n Map.prototype.map = function map(mapper, context) {\n var this$1$1 = this;\n return this.withMutations(function (map) {\n map.forEach(function (value, key) {\n map.set(key, mapper.call(context, value, key, this$1$1));\n });\n });\n };\n\n // @pragma Mutability\n\n Map.prototype.__iterator = function __iterator(type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n Map.prototype.__iterate = function __iterate(fn, reverse) {\n var this$1$1 = this;\n var iterations = 0;\n this._root && this._root.iterate(function (entry) {\n iterations++;\n return fn(entry[1], entry[0], this$1$1);\n }, reverse);\n return iterations;\n };\n Map.prototype.__ensureOwner = function __ensureOwner(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyMap();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n return Map;\n}(KeyedCollection);\nMap.isMap = isMap;\nvar MapPrototype = Map.prototype;\nMapPrototype[IS_MAP_SYMBOL] = true;\nMapPrototype[DELETE] = MapPrototype.remove;\nMapPrototype.removeAll = MapPrototype.deleteAll;\nMapPrototype.setIn = setIn;\nMapPrototype.removeIn = MapPrototype.deleteIn = deleteIn;\nMapPrototype.update = update;\nMapPrototype.updateIn = updateIn;\nMapPrototype.merge = MapPrototype.concat = merge$1;\nMapPrototype.mergeWith = mergeWith$1;\nMapPrototype.mergeDeep = mergeDeep;\nMapPrototype.mergeDeepWith = mergeDeepWith;\nMapPrototype.mergeIn = mergeIn;\nMapPrototype.mergeDeepIn = mergeDeepIn;\nMapPrototype.withMutations = withMutations;\nMapPrototype.wasAltered = wasAltered;\nMapPrototype.asImmutable = asImmutable;\nMapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable;\nMapPrototype['@@transducer/step'] = function (result, arr) {\n return result.set(arr[0], arr[1]);\n};\nMapPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\n// #pragma Trie Nodes\n\nvar ArrayMapNode = function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n};\nArrayMapNode.prototype.get = function get(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n};\nArrayMapNode.prototype.update = function update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var entries = this.entries;\n var idx = 0;\n var len = entries.length;\n for (; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n if (removed && entries.length === 1) {\n return; // undefined\n }\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop();\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n return new ArrayMapNode(ownerID, newEntries);\n};\nvar BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n};\nBitmapIndexedNode.prototype.get = function get(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & bit - 1)].get(shift + SHIFT, keyHash, key, notSetValue);\n};\nBitmapIndexedNode.prototype.update = function update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n if (!exists && value === NOT_SET) {\n return this;\n }\n var idx = popCount(bitmap & bit - 1);\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {\n return nodes[idx ^ 1];\n }\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;\n var newNodes = exists ? newNode ? setAt(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable);\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n};\nvar HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n};\nHashArrayMapNode.prototype.get = function get(shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;\n};\nHashArrayMapNode.prototype.update = function update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n if (removed && !node) {\n return this;\n }\n var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);\n if (newNode === node) {\n return this;\n }\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setAt(nodes, idx, newNode, isEditable);\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n};\nvar HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n};\nHashCollisionNode.prototype.get = function get(shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n};\nHashCollisionNode.prototype.update = function update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var removed = value === NOT_SET;\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n var entries = this.entries;\n var idx = 0;\n var len = entries.length;\n for (; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n if (exists) {\n if (removed) {\n idx === len - 1 ? newEntries.pop() : newEntries[idx] = newEntries.pop();\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n};\nvar ValueNode = function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n};\nValueNode.prototype.get = function get(shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n};\nValueNode.prototype.update = function update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n SetRef(didAlter);\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n};\n\n// #pragma Iterators\n\nArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n};\nBitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n};\nvar MapIterator = /*@__PURE__*/function (Iterator) {\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n if (Iterator) MapIterator.__proto__ = Iterator;\n MapIterator.prototype = Object.create(Iterator && Iterator.prototype);\n MapIterator.prototype.constructor = MapIterator;\n MapIterator.prototype.next = function next() {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex = void 0;\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n return MapIterator;\n}(Iterator);\nfunction mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n}\nfunction mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev\n };\n}\nfunction makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n}\nvar EMPTY_MAP;\nfunction emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n}\nfunction updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef();\n var didAlter = MakeRef();\n newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n}\nfunction updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);\n}\nfunction isLeafNode(node) {\n return node.constructor === ValueNode || node.constructor === HashCollisionNode;\n}\nfunction mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var newNode;\n var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : (newNode = new ValueNode(ownerID, keyHash, entry), idx1 < idx2 ? [node, newNode] : [newNode, node]);\n return new BitmapIndexedNode(ownerID, 1 << idx1 | 1 << idx2, nodes);\n}\nfunction createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n}\nfunction packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n}\nfunction expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n}\nfunction popCount(x) {\n x -= x >> 1 & 0x55555555;\n x = (x & 0x33333333) + (x >> 2 & 0x33333333);\n x = x + (x >> 4) & 0x0f0f0f0f;\n x += x >> 8;\n x += x >> 16;\n return x & 0x7f;\n}\nfunction setAt(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n}\nfunction spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n}\nfunction spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n}\nvar MAX_ARRAY_MAP_SIZE = SIZE / 4;\nvar MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\nvar MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\nvar IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@';\nfunction isList(maybeList) {\n return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]);\n}\nvar List = /*@__PURE__*/function (IndexedCollection) {\n function List(value) {\n var empty = emptyList();\n if (value === undefined || value === null) {\n // eslint-disable-next-line no-constructor-return\n return empty;\n }\n if (isList(value)) {\n // eslint-disable-next-line no-constructor-return\n return value;\n }\n var iter = IndexedCollection(value);\n var size = iter.size;\n if (size === 0) {\n // eslint-disable-next-line no-constructor-return\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n // eslint-disable-next-line no-constructor-return\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n // eslint-disable-next-line no-constructor-return\n return empty.withMutations(function (list) {\n list.setSize(size);\n iter.forEach(function (v, i) {\n return list.set(i, v);\n });\n });\n }\n if (IndexedCollection) List.__proto__ = IndexedCollection;\n List.prototype = Object.create(IndexedCollection && IndexedCollection.prototype);\n List.prototype.constructor = List;\n List.of = function of(/*...values*/\n ) {\n return this(arguments);\n };\n List.prototype.toString = function toString() {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function get(index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function set(index, value) {\n return updateList(this, index, value);\n };\n List.prototype.remove = function remove(index) {\n return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1);\n };\n List.prototype.insert = function insert(index, value) {\n return this.splice(index, 0, value);\n };\n List.prototype.clear = function clear() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n List.prototype.push = function push(/*...values*/\n ) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function (list) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n List.prototype.pop = function pop() {\n return setListBounds(this, 0, -1);\n };\n List.prototype.unshift = function unshift(/*...values*/\n ) {\n var values = arguments;\n return this.withMutations(function (list) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n List.prototype.shift = function shift() {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.concat = function concat(/*...collections*/\n ) {\n var arguments$1 = arguments;\n var seqs = [];\n for (var i = 0; i < arguments.length; i++) {\n var argument = arguments$1[i];\n var seq = IndexedCollection(typeof argument !== 'string' && hasIterator(argument) ? argument : [argument]);\n if (seq.size !== 0) {\n seqs.push(seq);\n }\n }\n if (seqs.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && seqs.length === 1) {\n return this.constructor(seqs[0]);\n }\n return this.withMutations(function (list) {\n seqs.forEach(function (seq) {\n return seq.forEach(function (value) {\n return list.push(value);\n });\n });\n });\n };\n List.prototype.setSize = function setSize(size) {\n return setListBounds(this, 0, size);\n };\n List.prototype.map = function map(mapper, context) {\n var this$1$1 = this;\n return this.withMutations(function (list) {\n for (var i = 0; i < this$1$1.size; i++) {\n list.set(i, mapper.call(context, list.get(i), i, this$1$1));\n }\n });\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function slice(begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(this, resolveBegin(begin, size), resolveEnd(end, size));\n };\n List.prototype.__iterator = function __iterator(type, reverse) {\n var index = reverse ? this.size : 0;\n var values = iterateList(this, reverse);\n return new Iterator(function () {\n var value = values();\n return value === DONE ? iteratorDone() : iteratorValue(type, reverse ? --index : index++, value);\n });\n };\n List.prototype.__iterate = function __iterate(fn, reverse) {\n var index = reverse ? this.size : 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, reverse ? --index : index++, this) === false) {\n break;\n }\n }\n return index;\n };\n List.prototype.__ensureOwner = function __ensureOwner(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyList();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);\n };\n return List;\n}(IndexedCollection);\nList.isList = isList;\nvar ListPrototype = List.prototype;\nListPrototype[IS_LIST_SYMBOL] = true;\nListPrototype[DELETE] = ListPrototype.remove;\nListPrototype.merge = ListPrototype.concat;\nListPrototype.setIn = setIn;\nListPrototype.deleteIn = ListPrototype.removeIn = deleteIn;\nListPrototype.update = update;\nListPrototype.updateIn = updateIn;\nListPrototype.mergeIn = mergeIn;\nListPrototype.mergeDeepIn = mergeDeepIn;\nListPrototype.withMutations = withMutations;\nListPrototype.wasAltered = wasAltered;\nListPrototype.asImmutable = asImmutable;\nListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable;\nListPrototype['@@transducer/step'] = function (result, arr) {\n return result.push(arr);\n};\nListPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\nvar VNode = function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n};\n\n// TODO: seems like these methods are very similar\n\nVNode.prototype.removeBefore = function removeBefore(ownerID, level, index) {\n if ((index & (1 << level + SHIFT) - 1) === 0 || this.array.length === 0) {\n return this;\n }\n var originIndex = index >>> level & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n};\nVNode.prototype.removeAfter = function removeAfter(ownerID, level, index) {\n if (index === (level ? 1 << level + SHIFT : SIZE) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = index - 1 >>> level & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n};\nvar DONE = {};\nfunction iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n return iterateNodeOrLeaf(list._root, list._level, 0);\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset);\n }\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : left - offset >> level;\n var to = (right - offset >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n while (true) {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(array && array[idx], level - SHIFT, offset + (idx << level));\n }\n };\n }\n}\nfunction makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n}\nfunction emptyList() {\n return makeList(0, 0, SHIFT);\n}\nfunction updateList(list, index, value) {\n index = wrapIndex(list, index);\n if (index !== index) {\n return list;\n }\n if (index >= list.size || index < 0) {\n return list.withMutations(function (list) {\n index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value);\n });\n }\n index += list._origin;\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef();\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);\n }\n if (!didAlter.value) {\n return list;\n }\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n}\nfunction updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = index >>> level & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n var newNode;\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n if (didAlter) {\n SetRef(didAlter);\n }\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n}\nfunction editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n}\nfunction listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << list._level + SHIFT) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[rawIndex >>> level & MASK];\n level -= SHIFT;\n }\n return node;\n }\n}\nfunction setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin |= 0;\n }\n if (end !== undefined) {\n end |= 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << newLevel + SHIFT) {\n newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;\n\n // Merge Tail into tree.\n if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = oldTailOffset >>> level & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[oldTailOffset >>> SHIFT & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = newOrigin >>> newLevel & MASK;\n if (beginIndex !== newTailOffset >>> newLevel & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n}\nfunction getTailOffset(size) {\n return size < SIZE ? 0 : size - 1 >>> SHIFT << SHIFT;\n}\nvar OrderedMap = /*@__PURE__*/function (Map) {\n function OrderedMap(value) {\n // eslint-disable-next-line no-constructor-return\n return value === undefined || value === null ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations(function (map) {\n var iter = KeyedCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) {\n return map.set(k, v);\n });\n });\n }\n if (Map) OrderedMap.__proto__ = Map;\n OrderedMap.prototype = Object.create(Map && Map.prototype);\n OrderedMap.prototype.constructor = OrderedMap;\n OrderedMap.of = function of(/*...values*/\n ) {\n return this(arguments);\n };\n OrderedMap.prototype.toString = function toString() {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function get(k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function clear() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n this.__altered = true;\n return this;\n }\n return emptyOrderedMap();\n };\n OrderedMap.prototype.set = function set(k, v) {\n return updateOrderedMap(this, k, v);\n };\n OrderedMap.prototype.remove = function remove(k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n OrderedMap.prototype.__iterate = function __iterate(fn, reverse) {\n var this$1$1 = this;\n return this._list.__iterate(function (entry) {\n return entry && fn(entry[1], entry[0], this$1$1);\n }, reverse);\n };\n OrderedMap.prototype.__iterator = function __iterator(type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n OrderedMap.prototype.__ensureOwner = function __ensureOwner(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n if (this.size === 0) {\n return emptyOrderedMap();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n return OrderedMap;\n}(Map);\nOrderedMap.isOrderedMap = isOrderedMap;\nOrderedMap.prototype[IS_ORDERED_SYMBOL] = true;\nOrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\nfunction makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n omap.__altered = false;\n return omap;\n}\nvar EMPTY_ORDERED_MAP;\nfunction emptyOrderedMap() {\n return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));\n}\nfunction updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) {\n // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function (entry, idx) {\n return entry !== undefined && i !== idx;\n });\n newMap = newList.toKeyedSeq().map(function (entry) {\n return entry[0];\n }).flip().toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n omap.__altered = true;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n}\nvar IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@';\nfunction isStack(maybeStack) {\n return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]);\n}\nvar Stack = /*@__PURE__*/function (IndexedCollection) {\n function Stack(value) {\n // eslint-disable-next-line no-constructor-return\n return value === undefined || value === null ? emptyStack() : isStack(value) ? value : emptyStack().pushAll(value);\n }\n if (IndexedCollection) Stack.__proto__ = IndexedCollection;\n Stack.prototype = Object.create(IndexedCollection && IndexedCollection.prototype);\n Stack.prototype.constructor = Stack;\n Stack.of = function of(/*...values*/\n ) {\n return this(arguments);\n };\n Stack.prototype.toString = function toString() {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function get(index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n Stack.prototype.peek = function peek() {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function push(/*...values*/\n ) {\n var arguments$1 = arguments;\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments$1[ii],\n next: head\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n Stack.prototype.pushAll = function pushAll(iter) {\n iter = IndexedCollection(iter);\n if (iter.size === 0) {\n return this;\n }\n if (this.size === 0 && isStack(iter)) {\n return iter;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.__iterate(function (value) {\n newSize++;\n head = {\n value: value,\n next: head\n };\n }, /* reverse */true);\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n Stack.prototype.pop = function pop() {\n return this.slice(1);\n };\n Stack.prototype.clear = function clear() {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n Stack.prototype.slice = function slice(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function __ensureOwner(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyStack();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function __iterate(fn, reverse) {\n var this$1$1 = this;\n if (reverse) {\n return new ArraySeq(this.toArray()).__iterate(function (v, k) {\n return fn(v, k, this$1$1);\n }, reverse);\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n Stack.prototype.__iterator = function __iterator(type, reverse) {\n if (reverse) {\n return new ArraySeq(this.toArray()).__iterator(type, reverse);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function () {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n return Stack;\n}(IndexedCollection);\nStack.isStack = isStack;\nvar StackPrototype = Stack.prototype;\nStackPrototype[IS_STACK_SYMBOL] = true;\nStackPrototype.shift = StackPrototype.pop;\nStackPrototype.unshift = StackPrototype.push;\nStackPrototype.unshiftAll = StackPrototype.pushAll;\nStackPrototype.withMutations = withMutations;\nStackPrototype.wasAltered = wasAltered;\nStackPrototype.asImmutable = asImmutable;\nStackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable;\nStackPrototype['@@transducer/step'] = function (result, arr) {\n return result.unshift(arr);\n};\nStackPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\nfunction makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n}\nvar EMPTY_STACK;\nfunction emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n}\nvar IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@';\nfunction isSet(maybeSet) {\n return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]);\n}\nfunction isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n}\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (!isCollection(b) || a.size !== undefined && b.size !== undefined && a.size !== b.size || a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b)) {\n return false;\n }\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n var notAssociative = !isAssociative(a);\n if (isOrdered(a)) {\n var entries = a.entries();\n return b.every(function (v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done;\n }\n var flipped = false;\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n var allEqual = true;\n var bSize = b.__iterate(function (v, k) {\n if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {\n allEqual = false;\n return false;\n }\n });\n return allEqual && a.size === bSize;\n}\n\n/**\n * Contributes additional methods to a constructor\n */\nfunction mixin(ctor, methods) {\n var keyCopier = function (key) {\n ctor.prototype[key] = methods[key];\n };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n}\nfunction toJS(value) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n if (!isCollection(value)) {\n if (!isDataStructure(value)) {\n return value;\n }\n value = Seq(value);\n }\n if (isKeyed(value)) {\n var result$1 = {};\n value.__iterate(function (v, k) {\n result$1[k] = toJS(v);\n });\n return result$1;\n }\n var result = [];\n value.__iterate(function (v) {\n result.push(toJS(v));\n });\n return result;\n}\nvar Set = /*@__PURE__*/function (SetCollection) {\n function Set(value) {\n // eslint-disable-next-line no-constructor-return\n return value === undefined || value === null ? emptySet() : isSet(value) && !isOrdered(value) ? value : emptySet().withMutations(function (set) {\n var iter = SetCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) {\n return set.add(v);\n });\n });\n }\n if (SetCollection) Set.__proto__ = SetCollection;\n Set.prototype = Object.create(SetCollection && SetCollection.prototype);\n Set.prototype.constructor = Set;\n Set.of = function of(/*...values*/\n ) {\n return this(arguments);\n };\n Set.fromKeys = function fromKeys(value) {\n return this(KeyedCollection(value).keySeq());\n };\n Set.intersect = function intersect(sets) {\n sets = Collection(sets).toArray();\n return sets.length ? SetPrototype.intersect.apply(Set(sets.pop()), sets) : emptySet();\n };\n Set.union = function union(sets) {\n sets = Collection(sets).toArray();\n return sets.length ? SetPrototype.union.apply(Set(sets.pop()), sets) : emptySet();\n };\n Set.prototype.toString = function toString() {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function has(value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function add(value) {\n return updateSet(this, this._map.set(value, value));\n };\n Set.prototype.remove = function remove(value) {\n return updateSet(this, this._map.remove(value));\n };\n Set.prototype.clear = function clear() {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.map = function map(mapper, context) {\n var this$1$1 = this;\n\n // keep track if the set is altered by the map function\n var didChanges = false;\n var newMap = updateSet(this, this._map.mapEntries(function (ref) {\n var v = ref[1];\n var mapped = mapper.call(context, v, v, this$1$1);\n if (mapped !== v) {\n didChanges = true;\n }\n return [mapped, mapped];\n }, context));\n return didChanges ? newMap : this;\n };\n Set.prototype.union = function union() {\n var iters = [],\n len = arguments.length;\n while (len--) iters[len] = arguments[len];\n iters = iters.filter(function (x) {\n return x.size !== 0;\n });\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function (set) {\n for (var ii = 0; ii < iters.length; ii++) {\n if (typeof iters[ii] === 'string') {\n set.add(iters[ii]);\n } else {\n SetCollection(iters[ii]).forEach(function (value) {\n return set.add(value);\n });\n }\n }\n });\n };\n Set.prototype.intersect = function intersect() {\n var iters = [],\n len = arguments.length;\n while (len--) iters[len] = arguments[len];\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) {\n return SetCollection(iter);\n });\n var toRemove = [];\n this.forEach(function (value) {\n if (!iters.every(function (iter) {\n return iter.includes(value);\n })) {\n toRemove.push(value);\n }\n });\n return this.withMutations(function (set) {\n toRemove.forEach(function (value) {\n set.remove(value);\n });\n });\n };\n Set.prototype.subtract = function subtract() {\n var iters = [],\n len = arguments.length;\n while (len--) iters[len] = arguments[len];\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) {\n return SetCollection(iter);\n });\n var toRemove = [];\n this.forEach(function (value) {\n if (iters.some(function (iter) {\n return iter.includes(value);\n })) {\n toRemove.push(value);\n }\n });\n return this.withMutations(function (set) {\n toRemove.forEach(function (value) {\n set.remove(value);\n });\n });\n };\n Set.prototype.sort = function sort(comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n Set.prototype.sortBy = function sortBy(mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n Set.prototype.wasAltered = function wasAltered() {\n return this._map.wasAltered();\n };\n Set.prototype.__iterate = function __iterate(fn, reverse) {\n var this$1$1 = this;\n return this._map.__iterate(function (k) {\n return fn(k, k, this$1$1);\n }, reverse);\n };\n Set.prototype.__iterator = function __iterator(type, reverse) {\n return this._map.__iterator(type, reverse);\n };\n Set.prototype.__ensureOwner = function __ensureOwner(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n if (this.size === 0) {\n return this.__empty();\n }\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n return Set;\n}(SetCollection);\nSet.isSet = isSet;\nvar SetPrototype = Set.prototype;\nSetPrototype[IS_SET_SYMBOL] = true;\nSetPrototype[DELETE] = SetPrototype.remove;\nSetPrototype.merge = SetPrototype.concat = SetPrototype.union;\nSetPrototype.withMutations = withMutations;\nSetPrototype.asImmutable = asImmutable;\nSetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable;\nSetPrototype['@@transducer/step'] = function (result, arr) {\n return result.add(arr);\n};\nSetPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\nSetPrototype.__empty = emptySet;\nSetPrototype.__make = makeSet;\nfunction updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap);\n}\nfunction makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n}\nvar EMPTY_SET;\nfunction emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n}\n\n/**\n * Returns a lazy seq of nums from start (inclusive) to end\n * (exclusive), by step, where start defaults to 0, step to 1, and end to\n * infinity. When start is equal to end, returns empty list.\n */\nvar Range = /*@__PURE__*/function (IndexedSeq) {\n function Range(start, end, step) {\n if (step === void 0) step = 1;\n if (!(this instanceof Range)) {\n // eslint-disable-next-line no-constructor-return\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n invariant(start !== undefined, 'You must define a start value when using Range');\n invariant(end !== undefined, 'You must define an end value when using Range');\n step = Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n // eslint-disable-next-line no-constructor-return\n return EMPTY_RANGE;\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n EMPTY_RANGE = this;\n }\n }\n if (IndexedSeq) Range.__proto__ = IndexedSeq;\n Range.prototype = Object.create(IndexedSeq && IndexedSeq.prototype);\n Range.prototype.constructor = Range;\n Range.prototype.toString = function toString() {\n if (this.size === 0) {\n return 'Range []';\n }\n return 'Range [ ' + this._start + '...' + this._end + (this._step !== 1 ? ' by ' + this._step : '') + ' ]';\n };\n Range.prototype.get = function get(index, notSetValue) {\n return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue;\n };\n Range.prototype.includes = function includes(searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex);\n };\n Range.prototype.slice = function slice(begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);\n };\n Range.prototype.indexOf = function indexOf(searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index;\n }\n }\n return -1;\n };\n Range.prototype.lastIndexOf = function lastIndexOf(searchValue) {\n return this.indexOf(searchValue);\n };\n Range.prototype.__iterate = function __iterate(fn, reverse) {\n var size = this.size;\n var step = this._step;\n var value = reverse ? this._start + (size - 1) * step : this._start;\n var i = 0;\n while (i !== size) {\n if (fn(value, reverse ? size - ++i : i++, this) === false) {\n break;\n }\n value += reverse ? -step : step;\n }\n return i;\n };\n Range.prototype.__iterator = function __iterator(type, reverse) {\n var size = this.size;\n var step = this._step;\n var value = reverse ? this._start + (size - 1) * step : this._start;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var v = value;\n value += reverse ? -step : step;\n return iteratorValue(type, reverse ? size - ++i : i++, v);\n });\n };\n Range.prototype.equals = function equals(other) {\n return other instanceof Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other);\n };\n return Range;\n}(IndexedSeq);\nvar EMPTY_RANGE;\nfunction getIn$1(collection, searchKeyPath, notSetValue) {\n var keyPath = coerceKeyPath(searchKeyPath);\n var i = 0;\n while (i !== keyPath.length) {\n collection = get(collection, keyPath[i++], NOT_SET);\n if (collection === NOT_SET) {\n return notSetValue;\n }\n }\n return collection;\n}\nfunction getIn(searchKeyPath, notSetValue) {\n return getIn$1(this, searchKeyPath, notSetValue);\n}\nfunction hasIn$1(collection, keyPath) {\n return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET;\n}\nfunction hasIn(searchKeyPath) {\n return hasIn$1(this, searchKeyPath);\n}\nfunction toObject() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function (v, k) {\n object[k] = v;\n });\n return object;\n}\nCollection.Iterator = Iterator;\nmixin(Collection, {\n // ### Conversion to other types\n\n toArray: function toArray() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n var useTuples = isKeyed(this);\n var i = 0;\n this.__iterate(function (v, k) {\n // Keyed collections produce an array of tuples.\n array[i++] = useTuples ? [k, v] : v;\n });\n return array;\n },\n toIndexedSeq: function toIndexedSeq() {\n return new ToIndexedSequence(this);\n },\n toJS: function toJS$1() {\n return toJS(this);\n },\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, true);\n },\n toMap: function toMap() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n toObject: toObject,\n toOrderedMap: function toOrderedMap() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n toOrderedSet: function toOrderedSet() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n toSet: function toSet() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n toSetSeq: function toSetSeq() {\n return new ToSetSequence(this);\n },\n toSeq: function toSeq() {\n return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq();\n },\n toStack: function toStack() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n toList: function toList() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n // ### Common JavaScript methods and properties\n\n toString: function toString() {\n return '[Collection]';\n },\n __toString: function __toString(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;\n },\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function concat() {\n var values = [],\n len = arguments.length;\n while (len--) values[len] = arguments[len];\n return reify(this, concatFactory(this, values));\n },\n includes: function includes(searchValue) {\n return this.some(function (value) {\n return is(value, searchValue);\n });\n },\n entries: function entries() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n every: function every(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function (v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n partition: function partition(predicate, context) {\n return partitionFactory(this, predicate, context);\n },\n find: function find(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n forEach: function forEach(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n join: function join(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function (v) {\n isFirst ? isFirst = false : joined += separator;\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n keys: function keys() {\n return this.__iterator(ITERATE_KEYS);\n },\n map: function map(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n reduce: function reduce$1(reducer, initialReduction, context) {\n return reduce(this, reducer, initialReduction, context, arguments.length < 2, false);\n },\n reduceRight: function reduceRight(reducer, initialReduction, context) {\n return reduce(this, reducer, initialReduction, context, arguments.length < 2, true);\n },\n reverse: function reverse() {\n return reify(this, reverseFactory(this, true));\n },\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n some: function some(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = false;\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n returnValue = true;\n return false;\n }\n });\n return returnValue;\n },\n sort: function sort(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n values: function values() {\n return this.__iterator(ITERATE_VALUES);\n },\n // ### More sequential methods\n\n butLast: function butLast() {\n return this.slice(0, -1);\n },\n isEmpty: function isEmpty() {\n return this.size !== undefined ? this.size === 0 : !this.some(function () {\n return true;\n });\n },\n count: function count(predicate, context) {\n return ensureSize(predicate ? this.toSeq().filter(predicate, context) : this);\n },\n countBy: function countBy(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n equals: function equals(other) {\n return deepEqual(this, other);\n },\n entrySeq: function entrySeq() {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var collection = this;\n if (collection._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(collection._cache);\n }\n var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function () {\n return collection.toSeq();\n };\n return entriesSequence;\n },\n filterNot: function filterNot(predicate, context) {\n return this.filter(not(predicate), context);\n },\n findEntry: function findEntry(predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n findKey: function findKey(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n findLast: function findLast(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n findLastEntry: function findLastEntry(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue);\n },\n findLastKey: function findLastKey(predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n first: function first(notSetValue) {\n return this.find(returnTrue, null, notSetValue);\n },\n flatMap: function flatMap(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n fromEntrySeq: function fromEntrySeq() {\n return new FromEntriesSequence(this);\n },\n get: function get(searchKey, notSetValue) {\n return this.find(function (_, key) {\n return is(key, searchKey);\n }, undefined, notSetValue);\n },\n getIn: getIn,\n groupBy: function groupBy(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n has: function has(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n hasIn: hasIn,\n isSubset: function isSubset(iter) {\n iter = typeof iter.includes === 'function' ? iter : Collection(iter);\n return this.every(function (value) {\n return iter.includes(value);\n });\n },\n isSuperset: function isSuperset(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Collection(iter);\n return iter.isSubset(this);\n },\n keyOf: function keyOf(searchValue) {\n return this.findKey(function (value) {\n return is(value, searchValue);\n });\n },\n keySeq: function keySeq() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n last: function last(notSetValue) {\n return this.toSeq().reverse().first(notSetValue);\n },\n lastKeyOf: function lastKeyOf(searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n max: function max(comparator) {\n return maxFactory(this, comparator);\n },\n maxBy: function maxBy(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n min: function min(comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);\n },\n minBy: function minBy(mapper, comparator) {\n return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);\n },\n rest: function rest() {\n return this.slice(1);\n },\n skip: function skip(amount) {\n return amount === 0 ? this : this.slice(Math.max(0, amount));\n },\n skipLast: function skipLast(amount) {\n return amount === 0 ? this : this.slice(0, -Math.max(0, amount));\n },\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n skipUntil: function skipUntil(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n sortBy: function sortBy(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n take: function take(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n takeLast: function takeLast(amount) {\n return this.slice(-Math.max(0, amount));\n },\n takeWhile: function takeWhile(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n takeUntil: function takeUntil(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n update: function update(fn) {\n return fn(this);\n },\n valueSeq: function valueSeq() {\n return this.toIndexedSeq();\n },\n // ### Hashable Object\n\n hashCode: function hashCode() {\n return this.__hash || (this.__hash = hashCollection(this));\n }\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n});\nvar CollectionPrototype = Collection.prototype;\nCollectionPrototype[IS_COLLECTION_SYMBOL] = true;\nCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values;\nCollectionPrototype.toJSON = CollectionPrototype.toArray;\nCollectionPrototype.__toStringMapper = quoteString;\nCollectionPrototype.inspect = CollectionPrototype.toSource = function () {\n return this.toString();\n};\nCollectionPrototype.chain = CollectionPrototype.flatMap;\nCollectionPrototype.contains = CollectionPrototype.includes;\nmixin(KeyedCollection, {\n // ### More sequential methods\n\n flip: function flip() {\n return reify(this, flipFactory(this));\n },\n mapEntries: function mapEntries(mapper, context) {\n var this$1$1 = this;\n var iterations = 0;\n return reify(this, this.toSeq().map(function (v, k) {\n return mapper.call(context, [k, v], iterations++, this$1$1);\n }).fromEntrySeq());\n },\n mapKeys: function mapKeys(mapper, context) {\n var this$1$1 = this;\n return reify(this, this.toSeq().flip().map(function (k, v) {\n return mapper.call(context, k, v, this$1$1);\n }).flip());\n }\n});\nvar KeyedCollectionPrototype = KeyedCollection.prototype;\nKeyedCollectionPrototype[IS_KEYED_SYMBOL] = true;\nKeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries;\nKeyedCollectionPrototype.toJSON = toObject;\nKeyedCollectionPrototype.__toStringMapper = function (v, k) {\n return quoteString(k) + ': ' + quoteString(v);\n};\nmixin(IndexedCollection, {\n // ### Conversion to other types\n\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, false);\n },\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n findIndex: function findIndex(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n indexOf: function indexOf(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n lastIndexOf: function lastIndexOf(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n reverse: function reverse() {\n return reify(this, reverseFactory(this, false));\n },\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n splice: function splice(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum || 0, 0);\n if (numArgs === 0 || numArgs === 2 && !removeNum) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)));\n },\n // ### More collection methods\n\n findLastIndex: function findLastIndex(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n first: function first(notSetValue) {\n return this.get(0, notSetValue);\n },\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n get: function get(index, notSetValue) {\n index = wrapIndex(this, index);\n return index < 0 || this.size === Infinity || this.size !== undefined && index > this.size ? notSetValue : this.find(function (_, key) {\n return key === index;\n }, undefined, notSetValue);\n },\n has: function has(index) {\n index = wrapIndex(this, index);\n return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1);\n },\n interpose: function interpose(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n interleave: function interleave(/*...collections*/\n ) {\n var collections = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * collections.length;\n }\n return reify(this, interleaved);\n },\n keySeq: function keySeq() {\n return Range(0, this.size);\n },\n last: function last(notSetValue) {\n return this.get(-1, notSetValue);\n },\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n zip: function zip(/*, ...collections */\n ) {\n var collections = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, collections));\n },\n zipAll: function zipAll(/*, ...collections */\n ) {\n var collections = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, collections, true));\n },\n zipWith: function zipWith(zipper /*, ...collections */) {\n var collections = arrCopy(arguments);\n collections[0] = this;\n return reify(this, zipWithFactory(this, zipper, collections));\n }\n});\nvar IndexedCollectionPrototype = IndexedCollection.prototype;\nIndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true;\nIndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true;\nmixin(SetCollection, {\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function get(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n includes: function includes(value) {\n return this.has(value);\n },\n // ### More sequential methods\n\n keySeq: function keySeq() {\n return this.valueSeq();\n }\n});\nvar SetCollectionPrototype = SetCollection.prototype;\nSetCollectionPrototype.has = CollectionPrototype.includes;\nSetCollectionPrototype.contains = SetCollectionPrototype.includes;\nSetCollectionPrototype.keys = SetCollectionPrototype.values;\n\n// Mixin subclasses\n\nmixin(KeyedSeq, KeyedCollectionPrototype);\nmixin(IndexedSeq, IndexedCollectionPrototype);\nmixin(SetSeq, SetCollectionPrototype);\n\n// #pragma Helper functions\n\nfunction reduce(collection, reducer, reduction, context, useFirst, reverse) {\n assertNotInfinite(collection.size);\n collection.__iterate(function (v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n }, reverse);\n return reduction;\n}\nfunction keyMapper(v, k) {\n return k;\n}\nfunction entryMapper(v, k) {\n return [k, v];\n}\nfunction not(predicate) {\n return function () {\n return !predicate.apply(this, arguments);\n };\n}\nfunction neg(predicate) {\n return function () {\n return -predicate.apply(this, arguments);\n };\n}\nfunction defaultZipper() {\n return arrCopy(arguments);\n}\nfunction defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n}\nfunction hashCollection(collection) {\n if (collection.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(collection);\n var keyed = isKeyed(collection);\n var h = ordered ? 1 : 0;\n collection.__iterate(keyed ? ordered ? function (v, k) {\n h = 31 * h + hashMerge(hash(v), hash(k)) | 0;\n } : function (v, k) {\n h = h + hashMerge(hash(v), hash(k)) | 0;\n } : ordered ? function (v) {\n h = 31 * h + hash(v) | 0;\n } : function (v) {\n h = h + hash(v) | 0;\n });\n return murmurHashOfSize(collection.size, h);\n}\nfunction murmurHashOfSize(size, h) {\n h = imul(h, 0xcc9e2d51);\n h = imul(h << 15 | h >>> -15, 0x1b873593);\n h = imul(h << 13 | h >>> -13, 5);\n h = (h + 0xe6546b64 | 0) ^ size;\n h = imul(h ^ h >>> 16, 0x85ebca6b);\n h = imul(h ^ h >>> 13, 0xc2b2ae35);\n h = smi(h ^ h >>> 16);\n return h;\n}\nfunction hashMerge(a, b) {\n return a ^ b + 0x9e3779b9 + (a << 6) + (a >> 2) | 0; // int\n}\nvar OrderedSet = /*@__PURE__*/function (Set) {\n function OrderedSet(value) {\n // eslint-disable-next-line no-constructor-return\n return value === undefined || value === null ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations(function (set) {\n var iter = SetCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) {\n return set.add(v);\n });\n });\n }\n if (Set) OrderedSet.__proto__ = Set;\n OrderedSet.prototype = Object.create(Set && Set.prototype);\n OrderedSet.prototype.constructor = OrderedSet;\n OrderedSet.of = function of(/*...values*/\n ) {\n return this(arguments);\n };\n OrderedSet.fromKeys = function fromKeys(value) {\n return this(KeyedCollection(value).keySeq());\n };\n OrderedSet.prototype.toString = function toString() {\n return this.__toString('OrderedSet {', '}');\n };\n return OrderedSet;\n}(Set);\nOrderedSet.isOrderedSet = isOrderedSet;\nvar OrderedSetPrototype = OrderedSet.prototype;\nOrderedSetPrototype[IS_ORDERED_SYMBOL] = true;\nOrderedSetPrototype.zip = IndexedCollectionPrototype.zip;\nOrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith;\nOrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll;\nOrderedSetPrototype.__empty = emptyOrderedSet;\nOrderedSetPrototype.__make = makeOrderedSet;\nfunction makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n}\nvar EMPTY_ORDERED_SET;\nfunction emptyOrderedSet() {\n return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));\n}\nvar PairSorting = {\n LeftThenRight: -1,\n RightThenLeft: +1\n};\nfunction throwOnInvalidDefaultValues(defaultValues) {\n if (isRecord(defaultValues)) {\n throw new Error('Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.');\n }\n if (isImmutable(defaultValues)) {\n throw new Error('Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.');\n }\n if (defaultValues === null || typeof defaultValues !== 'object') {\n throw new Error('Can not call `Record` with a non-object as default values. Use a plain javascript object instead.');\n }\n}\nvar Record = function Record(defaultValues, name) {\n var hasInitialized;\n throwOnInvalidDefaultValues(defaultValues);\n var RecordType = function Record(values) {\n var this$1$1 = this;\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n var indices = RecordTypePrototype._indices = {};\n // Deprecated: left to attempt not to break any external code which\n // relies on a ._name property existing on record instances.\n // Use Record.getDescriptiveName() instead\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n for (var i = 0; i < keys.length; i++) {\n var propName = keys[i];\n indices[propName] = i;\n if (RecordTypePrototype[propName]) {\n /* eslint-disable no-console */\n typeof console === 'object' && console.warn && console.warn('Cannot define ' + recordName(this) + ' with property \"' + propName + '\" since that property name is part of the Record API.');\n /* eslint-enable no-console */\n } else {\n setProp(RecordTypePrototype, propName);\n }\n }\n }\n this.__ownerID = undefined;\n this._values = List().withMutations(function (l) {\n l.setSize(this$1$1._keys.length);\n KeyedCollection(values).forEach(function (v, k) {\n l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v);\n });\n });\n return this;\n };\n var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);\n RecordTypePrototype.constructor = RecordType;\n if (name) {\n RecordType.displayName = name;\n }\n\n // eslint-disable-next-line no-constructor-return\n return RecordType;\n};\nRecord.prototype.toString = function toString() {\n var str = recordName(this) + ' { ';\n var keys = this._keys;\n var k;\n for (var i = 0, l = keys.length; i !== l; i++) {\n k = keys[i];\n str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k));\n }\n return str + ' }';\n};\nRecord.prototype.equals = function equals(other) {\n return this === other || isRecord(other) && recordSeq(this).equals(recordSeq(other));\n};\nRecord.prototype.hashCode = function hashCode() {\n return recordSeq(this).hashCode();\n};\n\n// @pragma Access\n\nRecord.prototype.has = function has(k) {\n return this._indices.hasOwnProperty(k);\n};\nRecord.prototype.get = function get(k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var index = this._indices[k];\n var value = this._values.get(index);\n return value === undefined ? this._defaultValues[k] : value;\n};\n\n// @pragma Modification\n\nRecord.prototype.set = function set(k, v) {\n if (this.has(k)) {\n var newValues = this._values.set(this._indices[k], v === this._defaultValues[k] ? undefined : v);\n if (newValues !== this._values && !this.__ownerID) {\n return makeRecord(this, newValues);\n }\n }\n return this;\n};\nRecord.prototype.remove = function remove(k) {\n return this.set(k);\n};\nRecord.prototype.clear = function clear() {\n var newValues = this._values.clear().setSize(this._keys.length);\n return this.__ownerID ? this : makeRecord(this, newValues);\n};\nRecord.prototype.wasAltered = function wasAltered() {\n return this._values.wasAltered();\n};\nRecord.prototype.toSeq = function toSeq() {\n return recordSeq(this);\n};\nRecord.prototype.toJS = function toJS$1() {\n return toJS(this);\n};\nRecord.prototype.entries = function entries() {\n return this.__iterator(ITERATE_ENTRIES);\n};\nRecord.prototype.__iterator = function __iterator(type, reverse) {\n return recordSeq(this).__iterator(type, reverse);\n};\nRecord.prototype.__iterate = function __iterate(fn, reverse) {\n return recordSeq(this).__iterate(fn, reverse);\n};\nRecord.prototype.__ensureOwner = function __ensureOwner(ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newValues = this._values.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._values = newValues;\n return this;\n }\n return makeRecord(this, newValues, ownerID);\n};\nRecord.isRecord = isRecord;\nRecord.getDescriptiveName = recordName;\nvar RecordPrototype = Record.prototype;\nRecordPrototype[IS_RECORD_SYMBOL] = true;\nRecordPrototype[DELETE] = RecordPrototype.remove;\nRecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn;\nRecordPrototype.getIn = getIn;\nRecordPrototype.hasIn = CollectionPrototype.hasIn;\nRecordPrototype.merge = merge$1;\nRecordPrototype.mergeWith = mergeWith$1;\nRecordPrototype.mergeIn = mergeIn;\nRecordPrototype.mergeDeep = mergeDeep;\nRecordPrototype.mergeDeepWith = mergeDeepWith;\nRecordPrototype.mergeDeepIn = mergeDeepIn;\nRecordPrototype.setIn = setIn;\nRecordPrototype.update = update;\nRecordPrototype.updateIn = updateIn;\nRecordPrototype.withMutations = withMutations;\nRecordPrototype.asMutable = asMutable;\nRecordPrototype.asImmutable = asImmutable;\nRecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries;\nRecordPrototype.toJSON = RecordPrototype.toObject = CollectionPrototype.toObject;\nRecordPrototype.inspect = RecordPrototype.toSource = function () {\n return this.toString();\n};\nfunction makeRecord(likeRecord, values, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._values = values;\n record.__ownerID = ownerID;\n return record;\n}\nfunction recordName(record) {\n return record.constructor.displayName || record.constructor.name || 'Record';\n}\nfunction recordSeq(record) {\n return keyedSeqFromValue(record._keys.map(function (k) {\n return [k, record.get(k)];\n }));\n}\nfunction setProp(prototype, name) {\n try {\n Object.defineProperty(prototype, name, {\n get: function () {\n return this.get(name);\n },\n set: function (value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n }\n });\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n}\n\n/**\n * Returns a lazy Seq of `value` repeated `times` times. When `times` is\n * undefined, returns an infinite sequence of `value`.\n */\nvar Repeat = /*@__PURE__*/function (IndexedSeq) {\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n // eslint-disable-next-line no-constructor-return\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n // eslint-disable-next-line no-constructor-return\n return EMPTY_REPEAT;\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n EMPTY_REPEAT = this;\n }\n }\n if (IndexedSeq) Repeat.__proto__ = IndexedSeq;\n Repeat.prototype = Object.create(IndexedSeq && IndexedSeq.prototype);\n Repeat.prototype.constructor = Repeat;\n Repeat.prototype.toString = function toString() {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n Repeat.prototype.get = function get(index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n Repeat.prototype.includes = function includes(searchValue) {\n return is(this._value, searchValue);\n };\n Repeat.prototype.slice = function slice(begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size) ? this : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));\n };\n Repeat.prototype.reverse = function reverse() {\n return this;\n };\n Repeat.prototype.indexOf = function indexOf(searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n Repeat.prototype.lastIndexOf = function lastIndexOf(searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n Repeat.prototype.__iterate = function __iterate(fn, reverse) {\n var size = this.size;\n var i = 0;\n while (i !== size) {\n if (fn(this._value, reverse ? size - ++i : i++, this) === false) {\n break;\n }\n }\n return i;\n };\n Repeat.prototype.__iterator = function __iterator(type, reverse) {\n var this$1$1 = this;\n var size = this.size;\n var i = 0;\n return new Iterator(function () {\n return i === size ? iteratorDone() : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value);\n });\n };\n Repeat.prototype.equals = function equals(other) {\n return other instanceof Repeat ? is(this._value, other._value) : deepEqual(this, other);\n };\n return Repeat;\n}(IndexedSeq);\nvar EMPTY_REPEAT;\nfunction fromJS(value, converter) {\n return fromJSWith([], converter || defaultConverter, value, '', converter && converter.length > 2 ? [] : undefined, {\n '': value\n });\n}\nfunction fromJSWith(stack, converter, value, key, keyPath, parentValue) {\n if (typeof value !== 'string' && !isImmutable(value) && (isArrayLike(value) || hasIterator(value) || isPlainObject(value))) {\n if (~stack.indexOf(value)) {\n throw new TypeError('Cannot convert circular structure to Immutable');\n }\n stack.push(value);\n keyPath && key !== '' && keyPath.push(key);\n var converted = converter.call(parentValue, key, Seq(value).map(function (v, k) {\n return fromJSWith(stack, converter, v, k, keyPath, value);\n }), keyPath && keyPath.slice());\n stack.pop();\n keyPath && keyPath.pop();\n return converted;\n }\n return value;\n}\nfunction defaultConverter(k, v) {\n // Effectively the opposite of \"Collection.toSeq()\"\n return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();\n}\nvar version = \"5.0.3\";\n\n// Note: Iterable is deprecated\nvar Iterable = Collection;\nexport { Collection, Iterable, List, Map, OrderedMap, OrderedSet, PairSorting, Range, Record, Repeat, Seq, Set, Stack, fromJS, get, getIn$1 as getIn, has, hasIn$1 as hasIn, hash, is, isAssociative, isCollection, isImmutable, isIndexed, isKeyed, isList, isMap, isOrdered, isOrderedMap, isOrderedSet, isPlainObject, isRecord, isSeq, isSet, isStack, isValueObject, merge, mergeDeep$1 as mergeDeep, mergeDeepWith$1 as mergeDeepWith, mergeWith, remove, removeIn, set, setIn$1 as setIn, update$1 as update, updateIn$1 as updateIn, version };","/**\n * This is a straight rip-off of the React.js ReactPropTypes.js proptype validators,\n * modified to make it possible to validate Immutable.js data.\n * ImmutableTypes.listOf is patterned after React.PropTypes.arrayOf, but for Immutable.List\n * ImmutableTypes.shape is based on React.PropTypes.shape, but for any Immutable.Iterable\n */\n\"use strict\";\n\nvar Immutable = require(\"immutable\");\nvar ANONYMOUS = \"<>\";\nvar ImmutablePropTypes;\nif (process.env.NODE_ENV !== \"production\") {\n ImmutablePropTypes = {\n listOf: createListOfTypeChecker,\n mapOf: createMapOfTypeChecker,\n orderedMapOf: createOrderedMapOfTypeChecker,\n setOf: createSetOfTypeChecker,\n orderedSetOf: createOrderedSetOfTypeChecker,\n stackOf: createStackOfTypeChecker,\n iterableOf: createIterableOfTypeChecker,\n recordOf: createRecordOfTypeChecker,\n shape: createShapeChecker,\n contains: createShapeChecker,\n mapContains: createMapContainsChecker,\n orderedMapContains: createOrderedMapContainsChecker,\n // Primitive Types\n list: createImmutableTypeChecker(\"List\", Immutable.List.isList),\n map: createImmutableTypeChecker(\"Map\", Immutable.Map.isMap),\n orderedMap: createImmutableTypeChecker(\"OrderedMap\", Immutable.OrderedMap.isOrderedMap),\n set: createImmutableTypeChecker(\"Set\", Immutable.Set.isSet),\n orderedSet: createImmutableTypeChecker(\"OrderedSet\", Immutable.OrderedSet.isOrderedSet),\n stack: createImmutableTypeChecker(\"Stack\", Immutable.Stack.isStack),\n seq: createImmutableTypeChecker(\"Seq\", Immutable.Seq.isSeq),\n record: createImmutableTypeChecker(\"Record\", function (isRecord) {\n return isRecord instanceof Immutable.Record;\n }),\n iterable: createImmutableTypeChecker(\"Iterable\", Immutable.Iterable.isIterable)\n };\n} else {\n var productionTypeChecker = function productionTypeChecker() {\n invariant(false, \"ImmutablePropTypes type checking code is stripped in production.\");\n };\n productionTypeChecker.isRequired = productionTypeChecker;\n var getProductionTypeChecker = function getProductionTypeChecker() {\n return productionTypeChecker;\n };\n ImmutablePropTypes = {\n listOf: getProductionTypeChecker,\n mapOf: getProductionTypeChecker,\n orderedMapOf: getProductionTypeChecker,\n setOf: getProductionTypeChecker,\n orderedSetOf: getProductionTypeChecker,\n stackOf: getProductionTypeChecker,\n iterableOf: getProductionTypeChecker,\n recordOf: getProductionTypeChecker,\n shape: getProductionTypeChecker,\n contains: getProductionTypeChecker,\n mapContains: getProductionTypeChecker,\n orderedMapContains: getProductionTypeChecker,\n // Primitive Types\n list: productionTypeChecker,\n map: productionTypeChecker,\n orderedMap: productionTypeChecker,\n set: productionTypeChecker,\n orderedSet: productionTypeChecker,\n stack: productionTypeChecker,\n seq: productionTypeChecker,\n record: productionTypeChecker,\n iterable: productionTypeChecker\n };\n}\nImmutablePropTypes.iterable.indexed = createIterableSubclassTypeChecker(\"Indexed\", Immutable.Iterable.isIndexed);\nImmutablePropTypes.iterable.keyed = createIterableSubclassTypeChecker(\"Keyed\", Immutable.Iterable.isKeyed);\nfunction getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return \"array\";\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return \"object\";\n }\n if (propValue instanceof Immutable.Iterable) {\n return \"Immutable.\" + propValue.toSource().split(\" \")[0];\n }\n return propType;\n}\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n rest[_key - 6] = arguments[_key];\n }\n propFullName = propFullName || propName;\n componentName = componentName || ANONYMOUS;\n if (props[propName] == null) {\n var locationName = location;\n if (isRequired) {\n return new Error(\"Required \" + locationName + \" `\" + propFullName + \"` was not specified in \" + (\"`\" + componentName + \"`.\"));\n }\n } else {\n return validate.apply(undefined, [props, propName, componentName, location, propFullName].concat(rest));\n }\n }\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n}\nfunction createImmutableTypeChecker(immutableClassName, immutableClassTypeValidator) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!immutableClassTypeValidator(propValue)) {\n var propType = getPropType(propValue);\n return new Error(\"Invalid \" + location + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected `\" + immutableClassName + \"`.\"));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n}\nfunction createIterableSubclassTypeChecker(subclassName, validator) {\n return createImmutableTypeChecker(\"Iterable.\" + subclassName, function (propValue) {\n return Immutable.Iterable.isIterable(propValue) && validator(propValue);\n });\n}\nfunction createIterableTypeChecker(typeChecker, immutableClassName, immutableClassTypeValidator) {\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n var propValue = props[propName];\n if (!immutableClassTypeValidator(propValue)) {\n var locationName = location;\n var propType = getPropType(propValue);\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type \" + (\"`\" + propType + \"` supplied to `\" + componentName + \"`, expected an Immutable.js \" + immutableClassName + \".\"));\n }\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Invalid typeChecker supplied to `\" + componentName + \"` \" + (\"for propType `\" + propFullName + \"`, expected a function.\"));\n }\n var propValues = propValue.valueSeq().toArray();\n for (var i = 0, len = propValues.length; i < len; i++) {\n var error = typeChecker.apply(undefined, [propValues, i, componentName, location, \"\" + propFullName + \"[\" + i + \"]\"].concat(rest));\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return createChainableTypeChecker(validate);\n}\nfunction createKeysTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n var propValue = props[propName];\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Invalid keysTypeChecker (optional second argument) supplied to `\" + componentName + \"` \" + (\"for propType `\" + propFullName + \"`, expected a function.\"));\n }\n var keys = propValue.keySeq().toArray();\n for (var i = 0, len = keys.length; i < len; i++) {\n var error = typeChecker.apply(undefined, [keys, i, componentName, location, \"\" + propFullName + \" -> key(\" + keys[i] + \")\"].concat(rest));\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return createChainableTypeChecker(validate);\n}\nfunction createListOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"List\", Immutable.List.isList);\n}\nfunction createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, immutableClassName, immutableClassTypeValidator) {\n function validate() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return createIterableTypeChecker(valuesTypeChecker, immutableClassName, immutableClassTypeValidator).apply(undefined, args) || keysTypeChecker && createKeysTypeChecker(keysTypeChecker).apply(undefined, args);\n }\n return createChainableTypeChecker(validate);\n}\nfunction createMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) {\n return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, \"Map\", Immutable.Map.isMap);\n}\nfunction createOrderedMapOfTypeChecker(valuesTypeChecker, keysTypeChecker) {\n return createMapOfTypeCheckerFactory(valuesTypeChecker, keysTypeChecker, \"OrderedMap\", Immutable.OrderedMap.isOrderedMap);\n}\nfunction createSetOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Set\", Immutable.Set.isSet);\n}\nfunction createOrderedSetOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"OrderedSet\", Immutable.OrderedSet.isOrderedSet);\n}\nfunction createStackOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Stack\", Immutable.Stack.isStack);\n}\nfunction createIterableOfTypeChecker(typeChecker) {\n return createIterableTypeChecker(typeChecker, \"Iterable\", Immutable.Iterable.isIterable);\n}\nfunction createRecordOfTypeChecker(recordKeys) {\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n var propValue = props[propName];\n if (!(propValue instanceof Immutable.Record)) {\n var propType = getPropType(propValue);\n var locationName = location;\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected an Immutable.js Record.\"));\n }\n for (var key in recordKeys) {\n var checker = recordKeys[key];\n if (!checker) {\n continue;\n }\n var mutablePropValue = propValue.toObject();\n var error = checker.apply(undefined, [mutablePropValue, key, componentName, location, \"\" + propFullName + \".\" + key].concat(rest));\n if (error) {\n return error;\n }\n }\n }\n return createChainableTypeChecker(validate);\n}\n\n// there is some irony in the fact that shapeTypes is a standard hash and not an immutable collection\nfunction createShapeTypeChecker(shapeTypes) {\n var immutableClassName = arguments[1] === undefined ? \"Iterable\" : arguments[1];\n var immutableClassTypeValidator = arguments[2] === undefined ? Immutable.Iterable.isIterable : arguments[2];\n function validate(props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n rest[_key - 5] = arguments[_key];\n }\n var propValue = props[propName];\n if (!immutableClassTypeValidator(propValue)) {\n var propType = getPropType(propValue);\n var locationName = location;\n return new Error(\"Invalid \" + locationName + \" `\" + propFullName + \"` of type `\" + propType + \"` \" + (\"supplied to `\" + componentName + \"`, expected an Immutable.js \" + immutableClassName + \".\"));\n }\n var mutablePropValue = propValue.toObject();\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker.apply(undefined, [mutablePropValue, key, componentName, location, \"\" + propFullName + \".\" + key].concat(rest));\n if (error) {\n return error;\n }\n }\n }\n return createChainableTypeChecker(validate);\n}\nfunction createShapeChecker(shapeTypes) {\n return createShapeTypeChecker(shapeTypes);\n}\nfunction createMapContainsChecker(shapeTypes) {\n return createShapeTypeChecker(shapeTypes, \"Map\", Immutable.Map.isMap);\n}\nfunction createOrderedMapContainsChecker(shapeTypes) {\n return createShapeTypeChecker(shapeTypes, \"OrderedMap\", Immutable.OrderedMap.isOrderedMap);\n}\nmodule.exports = ImmutablePropTypes;","/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection 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 or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function (value, index, collection) {\n accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n}\nmodule.exports = baseReduce;","var arrayReduce = require('./_arrayReduce'),\n baseEach = require('./_baseEach'),\n baseIteratee = require('./_baseIteratee'),\n baseReduce = require('./_baseReduce'),\n isArray = require('./isArray');\n\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\nfunction reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\nmodule.exports = reduce;","'use strict';\n\nvar check = function (it) {\n return it && it.Math === Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n// eslint-disable-next-line es/no-global-this -- safe\ncheck(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) ||\n// eslint-disable-next-line no-restricted-globals -- safe\ncheck(typeof self == 'object' && self) || check(typeof global == 'object' && global) || check(typeof this == 'object' && this) ||\n// eslint-disable-next-line no-new-func -- fallback\nfunction () {\n return this;\n}() || Function('return this')();","'use strict';\n\nmodule.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};","'use strict';\n\nvar fails = require('../internals/fails');\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-function-prototype-bind -- safe\n var test = function () {/* empty */}.bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});","'use strict';\n\nvar NATIVE_BIND = require('../internals/function-bind-native');\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n return call.apply(apply, arguments);\n});","'use strict';\n\nvar NATIVE_BIND = require('../internals/function-bind-native');\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\n// eslint-disable-next-line es/no-function-prototype-bind -- safe\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n return function () {\n return call.apply(fn, arguments);\n };\n};","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};","'use strict';\n\nvar classofRaw = require('../internals/classof-raw');\nvar uncurryThis = require('../internals/function-uncurry-this');\nmodule.exports = function (fn) {\n // Nashorn bug:\n // https://github.com/zloirock/core-js/issues/1128\n // https://github.com/zloirock/core-js/issues/1130\n if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};","'use strict';\n\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\nvar documentAll = typeof document == 'object' && document.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\n// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing\nmodule.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {\n return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n return typeof argument == 'function';\n};","'use strict';\n\nvar fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, {\n get: function () {\n return 7;\n }\n })[1] !== 7;\n});","'use strict';\n\nvar NATIVE_BIND = require('../internals/function-bind-native');\nvar call = Function.prototype.call;\n// eslint-disable-next-line es/no-function-prototype-bind -- safe\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};","'use strict';\n\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({\n 1: 2\n}, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;","'use strict';\n\nmodule.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) === 'String' ? split(it, '') : $Object(it);\n} : $Object;","'use strict';\n\n// we can't use just `it == null` since of `document.all` special case\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec\nmodule.exports = function (it) {\n return it === null || it === undefined;\n};","'use strict';\n\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (isNullOrUndefined(it)) throw new $TypeError(\"Can't call method on \" + it);\n return it;\n};","'use strict';\n\n// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};","'use strict';\n\nvar isCallable = require('../internals/is-callable');\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};","'use strict';\n\nmodule.exports = {};","'use strict';\n\nvar path = require('../internals/path');\nvar globalThis = require('../internals/global-this');\nvar isCallable = require('../internals/is-callable');\nvar aFunction = function (variable) {\n return isCallable(variable) ? variable : undefined;\n};\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(globalThis[namespace]) : path[namespace] && path[namespace][method] || globalThis[namespace] && globalThis[namespace][method];\n};","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nmodule.exports = uncurryThis({}.isPrototypeOf);","'use strict';\n\nvar globalThis = require('../internals/global-this');\nvar navigator = globalThis.navigator;\nvar userAgent = navigator && navigator.userAgent;\nmodule.exports = userAgent ? String(userAgent) : '';","'use strict';\n\nvar globalThis = require('../internals/global-this');\nvar userAgent = require('../internals/environment-user-agent');\nvar process = globalThis.process;\nvar Deno = globalThis.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\nmodule.exports = version;","'use strict';\n\n/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/environment-v8-version');\nvar fails = require('../internals/fails');\nvar globalThis = require('../internals/global-this');\nvar $String = globalThis.String;\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol('symbol detection');\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,\n // of course, fail.\n return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});","'use strict';\n\n/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nmodule.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol';","'use strict';\n\nvar getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\nvar $Object = Object;\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};","'use strict';\n\nvar $String = String;\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};","'use strict';\n\nvar isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw new $TypeError(tryToString(argument) + ' is not a function');\n};","'use strict';\n\nvar aCallable = require('../internals/a-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return isNullOrUndefined(func) ? undefined : aCallable(func);\n};","'use strict';\n\nvar call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw new $TypeError(\"Can't convert object to primitive value\");\n};","'use strict';\n\nmodule.exports = true;","'use strict';\n\nvar globalThis = require('../internals/global-this');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\nmodule.exports = function (key, value) {\n try {\n defineProperty(globalThis, key, {\n value: value,\n configurable: true,\n writable: true\n });\n } catch (error) {\n globalThis[key] = value;\n }\n return value;\n};","'use strict';\n\nvar IS_PURE = require('../internals/is-pure');\nvar globalThis = require('../internals/global-this');\nvar defineGlobalProperty = require('../internals/define-global-property');\nvar SHARED = '__core-js_shared__';\nvar store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});\n(store.versions || (store.versions = [])).push({\n version: '3.40.0',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});","'use strict';\n\nvar store = require('../internals/shared-store');\nmodule.exports = function (key, value) {\n return store[key] || (store[key] = value || {});\n};","'use strict';\n\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};","'use strict';\n\nvar globalThis = require('../internals/global-this');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\nvar Symbol = globalThis.Symbol;\nvar WellKnownSymbolsStore = shared('wks');\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name)) {\n WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name) ? Symbol[name] : createWellKnownSymbol('Symbol.' + name);\n }\n return WellKnownSymbolsStore[name];\n};","'use strict';\n\nvar call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw new $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};","'use strict';\n\nvar toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};","'use strict';\n\nvar globalThis = require('../internals/global-this');\nvar isObject = require('../internals/is-object');\nvar document = globalThis.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () {\n return 7;\n }\n }).a !== 7;\n});","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) {/* empty */}\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};","'use strict';\n\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar replacement = /#|\\.prototype\\./;\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;\n};\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\nmodule.exports = isForced;","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar aCallable = require('../internals/a-callable');\nvar NATIVE_BIND = require('../internals/function-bind-native');\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function /* ...args */\n () {\n return fn.apply(that, arguments);\n };\n};","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () {/* empty */}, 'prototype', {\n value: 42,\n writable: false\n }).prototype !== 42;\n});","'use strict';\n\nvar isObject = require('../internals/is-object');\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw new $TypeError($String(argument) + ' is not an object');\n};","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n }\n return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) {/* empty */}\n if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};","'use strict';\n\nvar globalThis = require('../internals/global-this');\nvar apply = require('../internals/function-apply');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar isCallable = require('../internals/is-callable');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar isForced = require('../internals/is-forced');\nvar path = require('../internals/path');\nvar bind = require('../internals/function-bind-context');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\n// add debugging info\nrequire('../internals/shared-store');\nvar wrapConstructor = function (NativeConstructor) {\n var Wrapper = function (a, b, c) {\n if (this instanceof Wrapper) {\n switch (arguments.length) {\n case 0:\n return new NativeConstructor();\n case 1:\n return new NativeConstructor(a);\n case 2:\n return new NativeConstructor(a, b);\n }\n return new NativeConstructor(a, b, c);\n }\n return apply(NativeConstructor, this, arguments);\n };\n Wrapper.prototype = NativeConstructor.prototype;\n return Wrapper;\n};\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var PROTO = options.proto;\n var nativeSource = GLOBAL ? globalThis : STATIC ? globalThis[TARGET] : globalThis[TARGET] && globalThis[TARGET].prototype;\n var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];\n var targetPrototype = target.prototype;\n var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n for (key in source) {\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contains in native\n USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);\n targetProperty = target[key];\n if (USE_NATIVE) if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(nativeSource, key);\n nativeProperty = descriptor && descriptor.value;\n } else nativeProperty = nativeSource[key];\n\n // export native or implementation\n sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];\n if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty) continue;\n\n // bind methods to global for calling from export context\n if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, globalThis);\n // wrap global constructors for prevent changes in this version\n else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);\n // make static versions for prototype methods\n else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);\n // default case\n else resultProperty = sourceProperty;\n\n // add a flag to not completely full polyfills\n if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {\n createNonEnumerableProperty(resultProperty, 'sham', true);\n }\n createNonEnumerableProperty(target, key, resultProperty);\n if (PROTO) {\n VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {\n createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n }\n // export virtual prototype methods\n createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);\n // export real prototype methods\n if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {\n createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n }\n }\n }\n};","'use strict';\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};","'use strict';\n\nvar trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};","'use strict';\n\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};","'use strict';\n\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n var len = toIntegerOrInfinity(argument);\n return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};","'use strict';\n\nvar toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};","'use strict';\n\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n if (length === 0) return !IS_INCLUDES && -1;\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el !== el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value !== value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (; length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n }\n return !IS_INCLUDES && -1;\n };\n};\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};","'use strict';\n\nmodule.exports = {};","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\nvar push = uncurryThis([].push);\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};","'use strict';\n\n// IE8- don't enum bug keys\nmodule.exports = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];","'use strict';\n\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};","'use strict';\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar call = require('../internals/function-call');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\nvar concat = uncurryThis([].concat);\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({\n b: 1\n }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), {\n b: 2\n })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol('assign detection');\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n // eslint-disable-next-line es/no-array-prototype-foreach -- safe\n alphabet.split('').forEach(function (chr) {\n B[chr] = chr;\n });\n return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;\n}) ? function assign(target, source) {\n // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];\n }\n }\n return T;\n} : $assign;","'use strict';\n\nvar $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({\n target: 'Object',\n stat: true,\n arity: 2,\n forced: Object.assign !== assign\n}, {\n assign: assign\n});","'use strict';\n\nrequire('../../modules/es.object.assign');\nvar path = require('../../internals/path');\nmodule.exports = path.Object.assign;","'use strict';\n\nvar parent = require('../../es/object/assign');\nmodule.exports = parent;","'use strict';\n\nvar parent = require('../../stable/object/assign');\nmodule.exports = parent;","'use strict';\n\nvar parent = require('../../actual/object/assign');\nmodule.exports = parent;","'use strict';\n\nmodule.exports = require('../../full/object/assign');","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nmodule.exports = uncurryThis([].slice);","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar isObject = require('../internals/is-object');\nvar hasOwn = require('../internals/has-own-property');\nvar arraySlice = require('../internals/array-slice');\nvar NATIVE_BIND = require('../internals/function-bind-native');\nvar $Function = Function;\nvar concat = uncurryThis([].concat);\nvar join = uncurryThis([].join);\nvar factories = {};\nvar construct = function (C, argsLength, args) {\n if (!hasOwn(factories, argsLength)) {\n var list = [];\n var i = 0;\n for (; i < argsLength; i++) list[i] = 'a[' + i + ']';\n factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')');\n }\n return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\n// eslint-disable-next-line es/no-function-prototype-bind -- detection\nmodule.exports = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) {\n var F = aCallable(this);\n var Prototype = F.prototype;\n var partArgs = arraySlice(arguments, 1);\n var boundFunction = function bound(/* args... */\n ) {\n var args = concat(partArgs, arraySlice(arguments));\n return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);\n };\n if (isObject(Prototype)) boundFunction.prototype = Prototype;\n return boundFunction;\n};","'use strict';\n\n// TODO: Remove from `core-js@4`\nvar $ = require('../internals/export');\nvar bind = require('../internals/function-bind');\n\n// `Function.prototype.bind` method\n// https://tc39.es/ecma262/#sec-function.prototype.bind\n// eslint-disable-next-line es/no-function-prototype-bind -- detection\n$({\n target: 'Function',\n proto: true,\n forced: Function.bind !== bind\n}, {\n bind: bind\n});","'use strict';\n\nvar globalThis = require('../internals/global-this');\nvar path = require('../internals/path');\nmodule.exports = function (CONSTRUCTOR, METHOD) {\n var Namespace = path[CONSTRUCTOR + 'Prototype'];\n var pureMethod = Namespace && Namespace[METHOD];\n if (pureMethod) return pureMethod;\n var NativeConstructor = globalThis[CONSTRUCTOR];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n return NativePrototype && NativePrototype[METHOD];\n};","'use strict';\n\nrequire('../../../modules/es.function.bind');\nvar getBuiltInPrototypeMethod = require('../../../internals/get-built-in-prototype-method');\nmodule.exports = getBuiltInPrototypeMethod('Function', 'bind');","'use strict';\n\nvar isPrototypeOf = require('../../internals/object-is-prototype-of');\nvar method = require('../function/virtual/bind');\nvar FunctionPrototype = Function.prototype;\nmodule.exports = function (it) {\n var own = it.bind;\n return it === FunctionPrototype || isPrototypeOf(FunctionPrototype, it) && own === FunctionPrototype.bind ? method : own;\n};","'use strict';\n\nvar parent = require('../../es/instance/bind');\nmodule.exports = parent;","'use strict';\n\nvar parent = require('../../stable/instance/bind');\nmodule.exports = parent;","'use strict';\n\nvar parent = require('../../actual/instance/bind');\nmodule.exports = parent;","'use strict';\n\nmodule.exports = require('../../full/instance/bind');","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n 'use strict';\n\n var hasOwn = {}.hasOwnProperty;\n function classNames() {\n var classes = '';\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n if (arg) {\n classes = appendClass(classes, parseValue(arg));\n }\n }\n return classes;\n }\n function parseValue(arg) {\n if (typeof arg === 'string' || typeof arg === 'number') {\n return arg;\n }\n if (typeof arg !== 'object') {\n return '';\n }\n if (Array.isArray(arg)) {\n return classNames.apply(null, arg);\n }\n if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n return arg.toString();\n }\n var classes = '';\n for (var key in arg) {\n if (hasOwn.call(arg, key) && arg[key]) {\n classes = appendClass(classes, key);\n }\n }\n return classes;\n }\n function appendClass(value, newClass) {\n if (!newClass) {\n return value;\n }\n if (value) {\n return value + ' ' + newClass;\n }\n return value + newClass;\n }\n if (typeof module !== 'undefined' && module.exports) {\n classNames.default = classNames;\n module.exports = classNames;\n } else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n // register as 'classnames', consistent with npm package name\n define('classnames', [], function () {\n return classNames;\n });\n } else {\n window.classNames = classNames;\n }\n})();","module.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n switch (active.tagName.toUpperCase()) {\n // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n default:\n active = null;\n break;\n }\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' && selection.removeAllRanges();\n if (!selection.rangeCount) {\n ranges.forEach(function (range) {\n selection.addRange(range);\n });\n }\n active && active.focus();\n };\n};","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n};\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n range = document.createRange();\n selection = document.getSelection();\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\";\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function (e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") {\n // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"];\n window.clipboardData.setData(format, text);\n } else {\n // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n document.body.appendChild(mark);\n range.selectNodeContents(mark);\n selection.addRange(range);\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n return success;\n}\nmodule.exports = copy;","\"use strict\";\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CopyToClipboard = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _copyToClipboard = _interopRequireDefault(require(\"copy-to-clipboard\"));\nvar _excluded = [\"text\", \"onCopy\", \"options\", \"children\"];\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return _assertThisInitialized(self);\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nvar CopyToClipboard = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(CopyToClipboard, _React$PureComponent);\n var _super = _createSuper(CopyToClipboard);\n function CopyToClipboard() {\n var _this;\n _classCallCheck(this, CopyToClipboard);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n var _this$props = _this.props,\n text = _this$props.text,\n onCopy = _this$props.onCopy,\n children = _this$props.children,\n options = _this$props.options;\n var elem = _react[\"default\"].Children.only(children);\n var result = (0, _copyToClipboard[\"default\"])(text, options);\n if (onCopy) {\n onCopy(text, result);\n } // Bypass onClick if it was present\n\n if (elem && elem.props && typeof elem.props.onClick === 'function') {\n elem.props.onClick(event);\n }\n });\n return _this;\n }\n _createClass(CopyToClipboard, [{\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n _text = _this$props2.text,\n _onCopy = _this$props2.onCopy,\n _options = _this$props2.options,\n children = _this$props2.children,\n props = _objectWithoutProperties(_this$props2, _excluded);\n var elem = _react[\"default\"].Children.only(children);\n return /*#__PURE__*/_react[\"default\"].cloneElement(elem, _objectSpread(_objectSpread({}, props), {}, {\n onClick: this.onClick\n }));\n }\n }]);\n return CopyToClipboard;\n}(_react[\"default\"].PureComponent);\nexports.CopyToClipboard = CopyToClipboard;\n_defineProperty(CopyToClipboard, \"defaultProps\", {\n onCopy: undefined,\n options: undefined\n});","\"use strict\";\n\nvar _require = require('./Component'),\n CopyToClipboard = _require.CopyToClipboard;\nCopyToClipboard.CopyToClipboard = CopyToClipboard;\nmodule.exports = CopyToClipboard;","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\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\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 objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function () {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;\n }\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\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 && (type == 'object' || type == 'function');\n}\n\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 && typeof value == 'object';\n}\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' || isObjectLike(value) && objectToString.call(value) == symbolTag;\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? other + '' : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;\n}\nmodule.exports = debounce;","\"use strict\";\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DebounceInput = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nvar _lodash = _interopRequireDefault(require(\"lodash.debounce\"));\nvar _excluded = [\"element\", \"onChange\", \"value\", \"minLength\", \"debounceTimeout\", \"forceNotifyByEnter\", \"forceNotifyOnBlur\", \"onKeyDown\", \"onBlur\", \"inputRef\"];\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return _assertThisInitialized(self);\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nvar DebounceInput = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(DebounceInput, _React$PureComponent);\n var _super = _createSuper(DebounceInput);\n function DebounceInput(props) {\n var _this;\n _classCallCheck(this, DebounceInput);\n _this = _super.call(this, props);\n _defineProperty(_assertThisInitialized(_this), \"onChange\", function (event) {\n event.persist();\n var oldValue = _this.state.value;\n var minLength = _this.props.minLength;\n _this.setState({\n value: event.target.value\n }, function () {\n var value = _this.state.value;\n if (value.length >= minLength) {\n _this.notify(event);\n return;\n } // If user hits backspace and goes below minLength consider it cleaning the value\n\n if (oldValue.length > value.length) {\n _this.notify(_objectSpread(_objectSpread({}, event), {}, {\n target: _objectSpread(_objectSpread({}, event.target), {}, {\n value: ''\n })\n }));\n }\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"onKeyDown\", function (event) {\n if (event.key === 'Enter') {\n _this.forceNotify(event);\n } // Invoke original onKeyDown if present\n\n var onKeyDown = _this.props.onKeyDown;\n if (onKeyDown) {\n event.persist();\n onKeyDown(event);\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onBlur\", function (event) {\n _this.forceNotify(event); // Invoke original onBlur if present\n\n var onBlur = _this.props.onBlur;\n if (onBlur) {\n event.persist();\n onBlur(event);\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"createNotifier\", function (debounceTimeout) {\n if (debounceTimeout < 0) {\n _this.notify = function () {\n return null;\n };\n } else if (debounceTimeout === 0) {\n _this.notify = _this.doNotify;\n } else {\n var debouncedChangeFunc = (0, _lodash[\"default\"])(function (event) {\n _this.isDebouncing = false;\n _this.doNotify(event);\n }, debounceTimeout);\n _this.notify = function (event) {\n _this.isDebouncing = true;\n debouncedChangeFunc(event);\n };\n _this.flush = function () {\n return debouncedChangeFunc.flush();\n };\n _this.cancel = function () {\n _this.isDebouncing = false;\n debouncedChangeFunc.cancel();\n };\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"doNotify\", function () {\n var onChange = _this.props.onChange;\n onChange.apply(void 0, arguments);\n });\n _defineProperty(_assertThisInitialized(_this), \"forceNotify\", function (event) {\n var debounceTimeout = _this.props.debounceTimeout;\n if (!_this.isDebouncing && debounceTimeout > 0) {\n return;\n }\n if (_this.cancel) {\n _this.cancel();\n }\n var value = _this.state.value;\n var minLength = _this.props.minLength;\n if (value.length >= minLength) {\n _this.doNotify(event);\n } else {\n _this.doNotify(_objectSpread(_objectSpread({}, event), {}, {\n target: _objectSpread(_objectSpread({}, event.target), {}, {\n value: value\n })\n }));\n }\n });\n _this.isDebouncing = false;\n _this.state = {\n value: typeof props.value === 'undefined' || props.value === null ? '' : props.value\n };\n var _debounceTimeout2 = _this.props.debounceTimeout;\n _this.createNotifier(_debounceTimeout2);\n return _this;\n }\n _createClass(DebounceInput, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.isDebouncing) {\n return;\n }\n var _this$props = this.props,\n value = _this$props.value,\n debounceTimeout = _this$props.debounceTimeout;\n var oldTimeout = prevProps.debounceTimeout,\n oldValue = prevProps.value;\n var stateValue = this.state.value;\n if (typeof value !== 'undefined' && oldValue !== value && stateValue !== value) {\n // Update state.value if new value passed via props, yep re-render should happen\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({\n value: value\n });\n }\n if (debounceTimeout !== oldTimeout) {\n this.createNotifier(debounceTimeout);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.flush) {\n this.flush();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n element = _this$props2.element,\n _onChange = _this$props2.onChange,\n _value = _this$props2.value,\n _minLength = _this$props2.minLength,\n _debounceTimeout = _this$props2.debounceTimeout,\n forceNotifyByEnter = _this$props2.forceNotifyByEnter,\n forceNotifyOnBlur = _this$props2.forceNotifyOnBlur,\n onKeyDown = _this$props2.onKeyDown,\n onBlur = _this$props2.onBlur,\n inputRef = _this$props2.inputRef,\n props = _objectWithoutProperties(_this$props2, _excluded);\n var value = this.state.value;\n var maybeOnKeyDown;\n if (forceNotifyByEnter) {\n maybeOnKeyDown = {\n onKeyDown: this.onKeyDown\n };\n } else if (onKeyDown) {\n maybeOnKeyDown = {\n onKeyDown: onKeyDown\n };\n } else {\n maybeOnKeyDown = {};\n }\n var maybeOnBlur;\n if (forceNotifyOnBlur) {\n maybeOnBlur = {\n onBlur: this.onBlur\n };\n } else if (onBlur) {\n maybeOnBlur = {\n onBlur: onBlur\n };\n } else {\n maybeOnBlur = {};\n }\n var maybeRef = inputRef ? {\n ref: inputRef\n } : {};\n return /*#__PURE__*/_react[\"default\"].createElement(element, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, props), {}, {\n onChange: this.onChange,\n value: value\n }, maybeOnKeyDown), maybeOnBlur), maybeRef));\n }\n }]);\n return DebounceInput;\n}(_react[\"default\"].PureComponent);\nexports.DebounceInput = DebounceInput;\n_defineProperty(DebounceInput, \"defaultProps\", {\n element: 'input',\n type: 'text',\n onKeyDown: undefined,\n onBlur: undefined,\n value: undefined,\n minLength: 0,\n debounceTimeout: 100,\n forceNotifyByEnter: true,\n forceNotifyOnBlur: true,\n inputRef: undefined\n});","\"use strict\";\n\nvar _require = require('./Component'),\n DebounceInput = _require.DebounceInput;\nDebounceInput.DebounceInput = DebounceInput;\nmodule.exports = DebounceInput;","module.exports = {\n ROOT: 0,\n GROUP: 1,\n POSITION: 2,\n SET: 3,\n RANGE: 4,\n REPETITION: 5,\n REFERENCE: 6,\n CHAR: 7\n};","const types = require('./types');\nconst INTS = () => [{\n type: types.RANGE,\n from: 48,\n to: 57\n}];\nconst WORDS = () => {\n return [{\n type: types.CHAR,\n value: 95\n }, {\n type: types.RANGE,\n from: 97,\n to: 122\n }, {\n type: types.RANGE,\n from: 65,\n to: 90\n }].concat(INTS());\n};\nconst WHITESPACE = () => {\n return [{\n type: types.CHAR,\n value: 9\n }, {\n type: types.CHAR,\n value: 10\n }, {\n type: types.CHAR,\n value: 11\n }, {\n type: types.CHAR,\n value: 12\n }, {\n type: types.CHAR,\n value: 13\n }, {\n type: types.CHAR,\n value: 32\n }, {\n type: types.CHAR,\n value: 160\n }, {\n type: types.CHAR,\n value: 5760\n }, {\n type: types.RANGE,\n from: 8192,\n to: 8202\n }, {\n type: types.CHAR,\n value: 8232\n }, {\n type: types.CHAR,\n value: 8233\n }, {\n type: types.CHAR,\n value: 8239\n }, {\n type: types.CHAR,\n value: 8287\n }, {\n type: types.CHAR,\n value: 12288\n }, {\n type: types.CHAR,\n value: 65279\n }];\n};\nconst NOTANYCHAR = () => {\n return [{\n type: types.CHAR,\n value: 10\n }, {\n type: types.CHAR,\n value: 13\n }, {\n type: types.CHAR,\n value: 8232\n }, {\n type: types.CHAR,\n value: 8233\n }];\n};\n\n// Predefined class objects.\nexports.words = () => ({\n type: types.SET,\n set: WORDS(),\n not: false\n});\nexports.notWords = () => ({\n type: types.SET,\n set: WORDS(),\n not: true\n});\nexports.ints = () => ({\n type: types.SET,\n set: INTS(),\n not: false\n});\nexports.notInts = () => ({\n type: types.SET,\n set: INTS(),\n not: true\n});\nexports.whitespace = () => ({\n type: types.SET,\n set: WHITESPACE(),\n not: false\n});\nexports.notWhitespace = () => ({\n type: types.SET,\n set: WHITESPACE(),\n not: true\n});\nexports.anyChar = () => ({\n type: types.SET,\n set: NOTANYCHAR(),\n not: true\n});","const types = require('./types');\nconst sets = require('./sets');\nconst CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^ ?';\nconst SLSH = {\n '0': 0,\n 't': 9,\n 'n': 10,\n 'v': 11,\n 'f': 12,\n 'r': 13\n};\n\n/**\n * Finds character representations in str and convert all to\n * their respective characters\n *\n * @param {String} str\n * @return {String}\n */\nexports.strToChars = function (str) {\n /* jshint maxlen: false */\n var chars_regex = /(\\[\\\\b\\])|(\\\\)?\\\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\\\\]^?])|([0tnvfr]))/g;\n str = str.replace(chars_regex, function (s, b, lbs, a16, b16, c8, dctrl, eslsh) {\n if (lbs) {\n return s;\n }\n var code = b ? 8 : a16 ? parseInt(a16, 16) : b16 ? parseInt(b16, 16) : c8 ? parseInt(c8, 8) : dctrl ? CTRL.indexOf(dctrl) : SLSH[eslsh];\n var c = String.fromCharCode(code);\n\n // Escape special regex characters.\n if (/[[\\]{}^$.|?*+()]/.test(c)) {\n c = '\\\\' + c;\n }\n return c;\n });\n return str;\n};\n\n/**\n * turns class into tokens\n * reads str until it encounters a ] not preceeded by a \\\n *\n * @param {String} str\n * @param {String} regexpStr\n * @return {Array., Number>}\n */\nexports.tokenizeClass = (str, regexpStr) => {\n /* jshint maxlen: false */\n var tokens = [];\n var regexp = /\\\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\\\)(.)|([^\\]\\\\]))-(?:\\\\)?([^\\]]))|(\\])|(?:\\\\)?([^])/g;\n var rs, c;\n while ((rs = regexp.exec(str)) != null) {\n if (rs[1]) {\n tokens.push(sets.words());\n } else if (rs[2]) {\n tokens.push(sets.ints());\n } else if (rs[3]) {\n tokens.push(sets.whitespace());\n } else if (rs[4]) {\n tokens.push(sets.notWords());\n } else if (rs[5]) {\n tokens.push(sets.notInts());\n } else if (rs[6]) {\n tokens.push(sets.notWhitespace());\n } else if (rs[7]) {\n tokens.push({\n type: types.RANGE,\n from: (rs[8] || rs[9]).charCodeAt(0),\n to: rs[10].charCodeAt(0)\n });\n } else if (c = rs[12]) {\n tokens.push({\n type: types.CHAR,\n value: c.charCodeAt(0)\n });\n } else {\n return [tokens, regexp.lastIndex];\n }\n }\n exports.error(regexpStr, 'Unterminated character class');\n};\n\n/**\n * Shortcut to throw errors.\n *\n * @param {String} regexp\n * @param {String} msg\n */\nexports.error = (regexp, msg) => {\n throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg);\n};","const types = require('./types');\nexports.wordBoundary = () => ({\n type: types.POSITION,\n value: 'b'\n});\nexports.nonWordBoundary = () => ({\n type: types.POSITION,\n value: 'B'\n});\nexports.begin = () => ({\n type: types.POSITION,\n value: '^'\n});\nexports.end = () => ({\n type: types.POSITION,\n value: '$'\n});","const util = require('./util');\nconst types = require('./types');\nconst sets = require('./sets');\nconst positions = require('./positions');\nmodule.exports = regexpStr => {\n var i = 0,\n l,\n c,\n start = {\n type: types.ROOT,\n stack: []\n },\n // Keep track of last clause/group and stack.\n lastGroup = start,\n last = start.stack,\n groupStack = [];\n var repeatErr = i => {\n util.error(regexpStr, `Nothing to repeat at column ${i - 1}`);\n };\n\n // Decode a few escaped characters.\n var str = util.strToChars(regexpStr);\n l = str.length;\n\n // Iterate through each character in string.\n while (i < l) {\n c = str[i++];\n switch (c) {\n // Handle escaped characters, inclues a few sets.\n case '\\\\':\n c = str[i++];\n switch (c) {\n case 'b':\n last.push(positions.wordBoundary());\n break;\n case 'B':\n last.push(positions.nonWordBoundary());\n break;\n case 'w':\n last.push(sets.words());\n break;\n case 'W':\n last.push(sets.notWords());\n break;\n case 'd':\n last.push(sets.ints());\n break;\n case 'D':\n last.push(sets.notInts());\n break;\n case 's':\n last.push(sets.whitespace());\n break;\n case 'S':\n last.push(sets.notWhitespace());\n break;\n default:\n // Check if c is integer.\n // In which case it's a reference.\n if (/\\d/.test(c)) {\n last.push({\n type: types.REFERENCE,\n value: parseInt(c, 10)\n });\n\n // Escaped character.\n } else {\n last.push({\n type: types.CHAR,\n value: c.charCodeAt(0)\n });\n }\n }\n break;\n\n // Positionals.\n case '^':\n last.push(positions.begin());\n break;\n case '$':\n last.push(positions.end());\n break;\n\n // Handle custom sets.\n case '[':\n // Check if this class is 'anti' i.e. [^abc].\n var not;\n if (str[i] === '^') {\n not = true;\n i++;\n } else {\n not = false;\n }\n\n // Get all the characters in class.\n var classTokens = util.tokenizeClass(str.slice(i), regexpStr);\n\n // Increase index by length of class.\n i += classTokens[1];\n last.push({\n type: types.SET,\n set: classTokens[0],\n not\n });\n break;\n\n // Class of any character except \\n.\n case '.':\n last.push(sets.anyChar());\n break;\n\n // Push group onto stack.\n case '(':\n // Create group.\n var group = {\n type: types.GROUP,\n stack: [],\n remember: true\n };\n c = str[i];\n\n // If if this is a special kind of group.\n if (c === '?') {\n c = str[i + 1];\n i += 2;\n\n // Match if followed by.\n if (c === '=') {\n group.followedBy = true;\n\n // Match if not followed by.\n } else if (c === '!') {\n group.notFollowedBy = true;\n } else if (c !== ':') {\n util.error(regexpStr, `Invalid group, character '${c}'` + ` after '?' at column ${i - 1}`);\n }\n group.remember = false;\n }\n\n // Insert subgroup into current group stack.\n last.push(group);\n\n // Remember the current group for when the group closes.\n groupStack.push(lastGroup);\n\n // Make this new group the current group.\n lastGroup = group;\n last = group.stack;\n break;\n\n // Pop group out of stack.\n case ')':\n if (groupStack.length === 0) {\n util.error(regexpStr, `Unmatched ) at column ${i - 1}`);\n }\n lastGroup = groupStack.pop();\n\n // Check if this group has a PIPE.\n // To get back the correct last stack.\n last = lastGroup.options ? lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack;\n break;\n\n // Use pipe character to give more choices.\n case '|':\n // Create array where options are if this is the first PIPE\n // in this clause.\n if (!lastGroup.options) {\n lastGroup.options = [lastGroup.stack];\n delete lastGroup.stack;\n }\n\n // Create a new stack and add to options for rest of clause.\n var stack = [];\n lastGroup.options.push(stack);\n last = stack;\n break;\n\n // Repetition.\n // For every repetition, remove last element from last stack\n // then insert back a RANGE object.\n // This design is chosen because there could be more than\n // one repetition symbols in a regex i.e. `a?+{2,3}`.\n case '{':\n var rs = /^(\\d+)(,(\\d+)?)?\\}/.exec(str.slice(i)),\n min,\n max;\n if (rs !== null) {\n if (last.length === 0) {\n repeatErr(i);\n }\n min = parseInt(rs[1], 10);\n max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min;\n i += rs[0].length;\n last.push({\n type: types.REPETITION,\n min,\n max,\n value: last.pop()\n });\n } else {\n last.push({\n type: types.CHAR,\n value: 123\n });\n }\n break;\n case '?':\n if (last.length === 0) {\n repeatErr(i);\n }\n last.push({\n type: types.REPETITION,\n min: 0,\n max: 1,\n value: last.pop()\n });\n break;\n case '+':\n if (last.length === 0) {\n repeatErr(i);\n }\n last.push({\n type: types.REPETITION,\n min: 1,\n max: Infinity,\n value: last.pop()\n });\n break;\n case '*':\n if (last.length === 0) {\n repeatErr(i);\n }\n last.push({\n type: types.REPETITION,\n min: 0,\n max: Infinity,\n value: last.pop()\n });\n break;\n\n // Default is a character that is not `\\[](){}?+*^$`.\n default:\n last.push({\n type: types.CHAR,\n value: c.charCodeAt(0)\n });\n }\n }\n\n // Check if any groups have not been closed.\n if (groupStack.length !== 0) {\n util.error(regexpStr, 'Unterminated group');\n }\n return start;\n};\nmodule.exports.types = types;","'use strict';\n\n/* eslint indent: 4 */\n\n// Private helper class\nclass SubRange {\n constructor(low, high) {\n this.low = low;\n this.high = high;\n this.length = 1 + high - low;\n }\n overlaps(range) {\n return !(this.high < range.low || this.low > range.high);\n }\n touches(range) {\n return !(this.high + 1 < range.low || this.low - 1 > range.high);\n }\n\n // Returns inclusive combination of SubRanges as a SubRange.\n add(range) {\n return new SubRange(Math.min(this.low, range.low), Math.max(this.high, range.high));\n }\n\n // Returns subtraction of SubRanges as an array of SubRanges.\n // (There's a case where subtraction divides it in 2)\n subtract(range) {\n if (range.low <= this.low && range.high >= this.high) {\n return [];\n } else if (range.low > this.low && range.high < this.high) {\n return [new SubRange(this.low, range.low - 1), new SubRange(range.high + 1, this.high)];\n } else if (range.low <= this.low) {\n return [new SubRange(range.high + 1, this.high)];\n } else {\n return [new SubRange(this.low, range.low - 1)];\n }\n }\n toString() {\n return this.low == this.high ? this.low.toString() : this.low + '-' + this.high;\n }\n}\nclass DRange {\n constructor(a, b) {\n this.ranges = [];\n this.length = 0;\n if (a != null) this.add(a, b);\n }\n _update_length() {\n this.length = this.ranges.reduce((previous, range) => {\n return previous + range.length;\n }, 0);\n }\n add(a, b) {\n var _add = subrange => {\n var i = 0;\n while (i < this.ranges.length && !subrange.touches(this.ranges[i])) {\n i++;\n }\n var newRanges = this.ranges.slice(0, i);\n while (i < this.ranges.length && subrange.touches(this.ranges[i])) {\n subrange = subrange.add(this.ranges[i]);\n i++;\n }\n newRanges.push(subrange);\n this.ranges = newRanges.concat(this.ranges.slice(i));\n this._update_length();\n };\n if (a instanceof DRange) {\n a.ranges.forEach(_add);\n } else {\n if (b == null) b = a;\n _add(new SubRange(a, b));\n }\n return this;\n }\n subtract(a, b) {\n var _subtract = subrange => {\n var i = 0;\n while (i < this.ranges.length && !subrange.overlaps(this.ranges[i])) {\n i++;\n }\n var newRanges = this.ranges.slice(0, i);\n while (i < this.ranges.length && subrange.overlaps(this.ranges[i])) {\n newRanges = newRanges.concat(this.ranges[i].subtract(subrange));\n i++;\n }\n this.ranges = newRanges.concat(this.ranges.slice(i));\n this._update_length();\n };\n if (a instanceof DRange) {\n a.ranges.forEach(_subtract);\n } else {\n if (b == null) b = a;\n _subtract(new SubRange(a, b));\n }\n return this;\n }\n intersect(a, b) {\n var newRanges = [];\n var _intersect = subrange => {\n var i = 0;\n while (i < this.ranges.length && !subrange.overlaps(this.ranges[i])) {\n i++;\n }\n while (i < this.ranges.length && subrange.overlaps(this.ranges[i])) {\n var low = Math.max(this.ranges[i].low, subrange.low);\n var high = Math.min(this.ranges[i].high, subrange.high);\n newRanges.push(new SubRange(low, high));\n i++;\n }\n };\n if (a instanceof DRange) {\n a.ranges.forEach(_intersect);\n } else {\n if (b == null) b = a;\n _intersect(new SubRange(a, b));\n }\n this.ranges = newRanges;\n this._update_length();\n return this;\n }\n index(index) {\n var i = 0;\n while (i < this.ranges.length && this.ranges[i].length <= index) {\n index -= this.ranges[i].length;\n i++;\n }\n return this.ranges[i].low + index;\n }\n toString() {\n return '[ ' + this.ranges.join(', ') + ' ]';\n }\n clone() {\n return new DRange(this);\n }\n numbers() {\n return this.ranges.reduce((result, subrange) => {\n var i = subrange.low;\n while (i <= subrange.high) {\n result.push(i);\n i++;\n }\n return result;\n }, []);\n }\n subranges() {\n return this.ranges.map(subrange => ({\n low: subrange.low,\n high: subrange.high,\n length: 1 + subrange.high - subrange.low\n }));\n }\n}\nmodule.exports = DRange;","const ret = require('ret');\nconst DRange = require('drange');\nconst types = ret.types;\nmodule.exports = class RandExp {\n /**\n * @constructor\n * @param {RegExp|String} regexp\n * @param {String} m\n */\n constructor(regexp, m) {\n this._setDefaults(regexp);\n if (regexp instanceof RegExp) {\n this.ignoreCase = regexp.ignoreCase;\n this.multiline = regexp.multiline;\n regexp = regexp.source;\n } else if (typeof regexp === 'string') {\n this.ignoreCase = m && m.indexOf('i') !== -1;\n this.multiline = m && m.indexOf('m') !== -1;\n } else {\n throw new Error('Expected a regexp or string');\n }\n this.tokens = ret(regexp);\n }\n\n /**\n * Checks if some custom properties have been set for this regexp.\n *\n * @param {RandExp} randexp\n * @param {RegExp} regexp\n */\n _setDefaults(regexp) {\n // When a repetitional token has its max set to Infinite,\n // randexp won't actually generate a random amount between min and Infinite\n // instead it will see Infinite as min + 100.\n this.max = regexp.max != null ? regexp.max : RandExp.prototype.max != null ? RandExp.prototype.max : 100;\n\n // This allows expanding to include additional characters\n // for instance: RandExp.defaultRange.add(0, 65535);\n this.defaultRange = regexp.defaultRange ? regexp.defaultRange : this.defaultRange.clone();\n if (regexp.randInt) {\n this.randInt = regexp.randInt;\n }\n }\n\n /**\n * Generates the random string.\n *\n * @return {String}\n */\n gen() {\n return this._gen(this.tokens, []);\n }\n\n /**\n * Generate random string modeled after given tokens.\n *\n * @param {Object} token\n * @param {Array.} groups\n * @return {String}\n */\n _gen(token, groups) {\n var stack, str, n, i, l;\n switch (token.type) {\n case types.ROOT:\n case types.GROUP:\n // Ignore lookaheads for now.\n if (token.followedBy || token.notFollowedBy) {\n return '';\n }\n\n // Insert placeholder until group string is generated.\n if (token.remember && token.groupNumber === undefined) {\n token.groupNumber = groups.push(null) - 1;\n }\n stack = token.options ? this._randSelect(token.options) : token.stack;\n str = '';\n for (i = 0, l = stack.length; i < l; i++) {\n str += this._gen(stack[i], groups);\n }\n if (token.remember) {\n groups[token.groupNumber] = str;\n }\n return str;\n case types.POSITION:\n // Do nothing for now.\n return '';\n case types.SET:\n var expandedSet = this._expand(token);\n if (!expandedSet.length) {\n return '';\n }\n return String.fromCharCode(this._randSelect(expandedSet));\n case types.REPETITION:\n // Randomly generate number between min and max.\n n = this.randInt(token.min, token.max === Infinity ? token.min + this.max : token.max);\n str = '';\n for (i = 0; i < n; i++) {\n str += this._gen(token.value, groups);\n }\n return str;\n case types.REFERENCE:\n return groups[token.value - 1] || '';\n case types.CHAR:\n var code = this.ignoreCase && this._randBool() ? this._toOtherCase(token.value) : token.value;\n return String.fromCharCode(code);\n }\n }\n\n /**\n * If code is alphabetic, converts to other case.\n * If not alphabetic, returns back code.\n *\n * @param {Number} code\n * @return {Number}\n */\n _toOtherCase(code) {\n return code + (97 <= code && code <= 122 ? -32 : 65 <= code && code <= 90 ? 32 : 0);\n }\n\n /**\n * Randomly returns a true or false value.\n *\n * @return {Boolean}\n */\n _randBool() {\n return !this.randInt(0, 1);\n }\n\n /**\n * Randomly selects and returns a value from the array.\n *\n * @param {Array.} arr\n * @return {Object}\n */\n _randSelect(arr) {\n if (arr instanceof DRange) {\n return arr.index(this.randInt(0, arr.length - 1));\n }\n return arr[this.randInt(0, arr.length - 1)];\n }\n\n /**\n * expands a token to a DiscontinuousRange of characters which has a\n * length and an index function (for random selecting)\n *\n * @param {Object} token\n * @return {DiscontinuousRange}\n */\n _expand(token) {\n if (token.type === ret.types.CHAR) {\n return new DRange(token.value);\n } else if (token.type === ret.types.RANGE) {\n return new DRange(token.from, token.to);\n } else {\n let drange = new DRange();\n for (let i = 0; i < token.set.length; i++) {\n let subrange = this._expand(token.set[i]);\n drange.add(subrange);\n if (this.ignoreCase) {\n for (let j = 0; j < subrange.length; j++) {\n let code = subrange.index(j);\n let otherCaseCode = this._toOtherCase(code);\n if (code !== otherCaseCode) {\n drange.add(otherCaseCode);\n }\n }\n }\n }\n if (token.not) {\n return this.defaultRange.clone().subtract(drange);\n } else {\n return this.defaultRange.clone().intersect(drange);\n }\n }\n }\n\n /**\n * Randomly generates and returns a number between a and b (inclusive).\n *\n * @param {Number} a\n * @param {Number} b\n * @return {Number}\n */\n randInt(a, b) {\n return a + Math.floor(Math.random() * (1 + b - a));\n }\n\n /**\n * Default range of characters to generate from.\n */\n get defaultRange() {\n return this._range = this._range || new DRange(32, 126);\n }\n set defaultRange(range) {\n this._range = range;\n }\n\n /**\n *\n * Enables use of randexp with a shorter call.\n *\n * @param {RegExp|String| regexp}\n * @param {String} m\n * @return {String}\n */\n static randexp(regexp, m) {\n var randexp;\n if (typeof regexp === 'string') {\n regexp = new RegExp(regexp, m);\n }\n if (regexp._randexp === undefined) {\n randexp = new RandExp(regexp, m);\n regexp._randexp = randexp;\n } else {\n randexp = regexp._randexp;\n randexp._setDefaults(regexp);\n }\n return randexp.gen();\n }\n\n /**\n * Enables sugary /regexp/.gen syntax.\n */\n static sugar() {\n /* eshint freeze:false */\n RegExp.prototype.gen = function () {\n return RandExp.randexp(this);\n };\n }\n};","var baseKeys = require('./_baseKeys'),\n getTag = require('./_getTag'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLike = require('./isArrayLike'),\n isBuffer = require('./isBuffer'),\n isPrototype = require('./_isPrototype'),\n isTypedArray = require('./isTypedArray');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\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 `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\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 empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\nmodule.exports = isEmpty;","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;\n}\nmodule.exports = isString;","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function () {\n return root.Date.now();\n};\nmodule.exports = now;","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;\n }\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;\n }\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\nmodule.exports = debounce;","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\nmodule.exports = baseSet;","var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\nmodule.exports = set;","/** Used to map aliases to their real names. */\nexports.aliasToReal = {\n // Lodash aliases.\n 'each': 'forEach',\n 'eachRight': 'forEachRight',\n 'entries': 'toPairs',\n 'entriesIn': 'toPairsIn',\n 'extend': 'assignIn',\n 'extendAll': 'assignInAll',\n 'extendAllWith': 'assignInAllWith',\n 'extendWith': 'assignInWith',\n 'first': 'head',\n // Methods that are curried variants of others.\n 'conforms': 'conformsTo',\n 'matches': 'isMatch',\n 'property': 'get',\n // Ramda aliases.\n '__': 'placeholder',\n 'F': 'stubFalse',\n 'T': 'stubTrue',\n 'all': 'every',\n 'allPass': 'overEvery',\n 'always': 'constant',\n 'any': 'some',\n 'anyPass': 'overSome',\n 'apply': 'spread',\n 'assoc': 'set',\n 'assocPath': 'set',\n 'complement': 'negate',\n 'compose': 'flowRight',\n 'contains': 'includes',\n 'dissoc': 'unset',\n 'dissocPath': 'unset',\n 'dropLast': 'dropRight',\n 'dropLastWhile': 'dropRightWhile',\n 'equals': 'isEqual',\n 'identical': 'eq',\n 'indexBy': 'keyBy',\n 'init': 'initial',\n 'invertObj': 'invert',\n 'juxt': 'over',\n 'omitAll': 'omit',\n 'nAry': 'ary',\n 'path': 'get',\n 'pathEq': 'matchesProperty',\n 'pathOr': 'getOr',\n 'paths': 'at',\n 'pickAll': 'pick',\n 'pipe': 'flow',\n 'pluck': 'map',\n 'prop': 'get',\n 'propEq': 'matchesProperty',\n 'propOr': 'getOr',\n 'props': 'at',\n 'symmetricDifference': 'xor',\n 'symmetricDifferenceBy': 'xorBy',\n 'symmetricDifferenceWith': 'xorWith',\n 'takeLast': 'takeRight',\n 'takeLastWhile': 'takeRightWhile',\n 'unapply': 'rest',\n 'unnest': 'flatten',\n 'useWith': 'overArgs',\n 'where': 'conformsTo',\n 'whereEq': 'isMatch',\n 'zipObj': 'zipObject'\n};\n\n/** Used to map ary to method names. */\nexports.aryMethod = {\n '1': ['assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words', 'zipAll'],\n '2': ['add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep'],\n '3': ['assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'],\n '4': ['fill', 'setWith', 'updateWith']\n};\n\n/** Used to map ary to rearg configs. */\nexports.aryRearg = {\n '2': [1, 0],\n '3': [2, 0, 1],\n '4': [3, 2, 0, 1]\n};\n\n/** Used to map method names to their iteratee ary. */\nexports.iterateeAry = {\n 'dropRightWhile': 1,\n 'dropWhile': 1,\n 'every': 1,\n 'filter': 1,\n 'find': 1,\n 'findFrom': 1,\n 'findIndex': 1,\n 'findIndexFrom': 1,\n 'findKey': 1,\n 'findLast': 1,\n 'findLastFrom': 1,\n 'findLastIndex': 1,\n 'findLastIndexFrom': 1,\n 'findLastKey': 1,\n 'flatMap': 1,\n 'flatMapDeep': 1,\n 'flatMapDepth': 1,\n 'forEach': 1,\n 'forEachRight': 1,\n 'forIn': 1,\n 'forInRight': 1,\n 'forOwn': 1,\n 'forOwnRight': 1,\n 'map': 1,\n 'mapKeys': 1,\n 'mapValues': 1,\n 'partition': 1,\n 'reduce': 2,\n 'reduceRight': 2,\n 'reject': 1,\n 'remove': 1,\n 'some': 1,\n 'takeRightWhile': 1,\n 'takeWhile': 1,\n 'times': 1,\n 'transform': 2\n};\n\n/** Used to map method names to iteratee rearg configs. */\nexports.iterateeRearg = {\n 'mapKeys': [1],\n 'reduceRight': [1, 0]\n};\n\n/** Used to map method names to rearg configs. */\nexports.methodRearg = {\n 'assignInAllWith': [1, 0],\n 'assignInWith': [1, 2, 0],\n 'assignAllWith': [1, 0],\n 'assignWith': [1, 2, 0],\n 'differenceBy': [1, 2, 0],\n 'differenceWith': [1, 2, 0],\n 'getOr': [2, 1, 0],\n 'intersectionBy': [1, 2, 0],\n 'intersectionWith': [1, 2, 0],\n 'isEqualWith': [1, 2, 0],\n 'isMatchWith': [2, 1, 0],\n 'mergeAllWith': [1, 0],\n 'mergeWith': [1, 2, 0],\n 'padChars': [2, 1, 0],\n 'padCharsEnd': [2, 1, 0],\n 'padCharsStart': [2, 1, 0],\n 'pullAllBy': [2, 1, 0],\n 'pullAllWith': [2, 1, 0],\n 'rangeStep': [1, 2, 0],\n 'rangeStepRight': [1, 2, 0],\n 'setWith': [3, 1, 2, 0],\n 'sortedIndexBy': [2, 1, 0],\n 'sortedLastIndexBy': [2, 1, 0],\n 'unionBy': [1, 2, 0],\n 'unionWith': [1, 2, 0],\n 'updateWith': [3, 1, 2, 0],\n 'xorBy': [1, 2, 0],\n 'xorWith': [1, 2, 0],\n 'zipWith': [1, 2, 0]\n};\n\n/** Used to map method names to spread configs. */\nexports.methodSpread = {\n 'assignAll': {\n 'start': 0\n },\n 'assignAllWith': {\n 'start': 0\n },\n 'assignInAll': {\n 'start': 0\n },\n 'assignInAllWith': {\n 'start': 0\n },\n 'defaultsAll': {\n 'start': 0\n },\n 'defaultsDeepAll': {\n 'start': 0\n },\n 'invokeArgs': {\n 'start': 2\n },\n 'invokeArgsMap': {\n 'start': 2\n },\n 'mergeAll': {\n 'start': 0\n },\n 'mergeAllWith': {\n 'start': 0\n },\n 'partial': {\n 'start': 1\n },\n 'partialRight': {\n 'start': 1\n },\n 'without': {\n 'start': 1\n },\n 'zipAll': {\n 'start': 0\n }\n};\n\n/** Used to identify methods which mutate arrays or objects. */\nexports.mutate = {\n 'array': {\n 'fill': true,\n 'pull': true,\n 'pullAll': true,\n 'pullAllBy': true,\n 'pullAllWith': true,\n 'pullAt': true,\n 'remove': true,\n 'reverse': true\n },\n 'object': {\n 'assign': true,\n 'assignAll': true,\n 'assignAllWith': true,\n 'assignIn': true,\n 'assignInAll': true,\n 'assignInAllWith': true,\n 'assignInWith': true,\n 'assignWith': true,\n 'defaults': true,\n 'defaultsAll': true,\n 'defaultsDeep': true,\n 'defaultsDeepAll': true,\n 'merge': true,\n 'mergeAll': true,\n 'mergeAllWith': true,\n 'mergeWith': true\n },\n 'set': {\n 'set': true,\n 'setWith': true,\n 'unset': true,\n 'update': true,\n 'updateWith': true\n }\n};\n\n/** Used to map real names to their aliases. */\nexports.realToAlias = function () {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n object = exports.aliasToReal,\n result = {};\n for (var key in object) {\n var value = object[key];\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }\n return result;\n}();\n\n/** Used to map method names to other names. */\nexports.remap = {\n 'assignAll': 'assign',\n 'assignAllWith': 'assignWith',\n 'assignInAll': 'assignIn',\n 'assignInAllWith': 'assignInWith',\n 'curryN': 'curry',\n 'curryRightN': 'curryRight',\n 'defaultsAll': 'defaults',\n 'defaultsDeepAll': 'defaultsDeep',\n 'findFrom': 'find',\n 'findIndexFrom': 'findIndex',\n 'findLastFrom': 'findLast',\n 'findLastIndexFrom': 'findLastIndex',\n 'getOr': 'get',\n 'includesFrom': 'includes',\n 'indexOfFrom': 'indexOf',\n 'invokeArgs': 'invoke',\n 'invokeArgsMap': 'invokeMap',\n 'lastIndexOfFrom': 'lastIndexOf',\n 'mergeAll': 'merge',\n 'mergeAllWith': 'mergeWith',\n 'padChars': 'pad',\n 'padCharsEnd': 'padEnd',\n 'padCharsStart': 'padStart',\n 'propertyOf': 'get',\n 'rangeStep': 'range',\n 'rangeStepRight': 'rangeRight',\n 'restFrom': 'rest',\n 'spreadFrom': 'spread',\n 'trimChars': 'trim',\n 'trimCharsEnd': 'trimEnd',\n 'trimCharsStart': 'trimStart',\n 'zipAll': 'zip'\n};\n\n/** Used to track methods that skip fixing their arity. */\nexports.skipFixed = {\n 'castArray': true,\n 'flow': true,\n 'flowRight': true,\n 'iteratee': true,\n 'mixin': true,\n 'rearg': true,\n 'runInContext': true\n};\n\n/** Used to track methods that skip rearranging arguments. */\nexports.skipRearg = {\n 'add': true,\n 'assign': true,\n 'assignIn': true,\n 'bind': true,\n 'bindKey': true,\n 'concat': true,\n 'difference': true,\n 'divide': true,\n 'eq': true,\n 'gt': true,\n 'gte': true,\n 'isEqual': true,\n 'lt': true,\n 'lte': true,\n 'matchesProperty': true,\n 'merge': true,\n 'multiply': true,\n 'overArgs': true,\n 'partial': true,\n 'partialRight': true,\n 'propertyOf': true,\n 'random': true,\n 'range': true,\n 'rangeRight': true,\n 'subtract': true,\n 'zip': true,\n 'zipObject': true,\n 'zipObjectDeep': true\n};","/**\n * The default argument placeholder value for methods.\n *\n * @type {Object}\n */\nmodule.exports = {};","var mapping = require('./_mapping'),\n fallbackHolder = require('./placeholder');\n\n/** Built-in value reference. */\nvar push = Array.prototype.push;\n\n/**\n * Creates a function, with an arity of `n`, that invokes `func` with the\n * arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} n The arity of the new function.\n * @returns {Function} Returns the new function.\n */\nfunction baseArity(func, n) {\n return n == 2 ? function (a, b) {\n return func.apply(undefined, arguments);\n } : function (a) {\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments, ignoring\n * any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\nfunction baseAry(func, n) {\n return n == 2 ? function (a, b) {\n return func(a, b);\n } : function (a) {\n return func(a);\n };\n}\n\n/**\n * Creates a clone of `array`.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the cloned array.\n */\nfunction cloneArray(array) {\n var length = array ? array.length : 0,\n result = Array(length);\n while (length--) {\n result[length] = array[length];\n }\n return result;\n}\n\n/**\n * Creates a function that clones a given object using the assignment `func`.\n *\n * @private\n * @param {Function} func The assignment function.\n * @returns {Function} Returns the new cloner function.\n */\nfunction createCloner(func) {\n return function (object) {\n return func({}, object);\n };\n}\n\n/**\n * A specialized version of `_.spread` which flattens the spread array into\n * the arguments of the invoked `func`.\n *\n * @private\n * @param {Function} func The function to spread arguments over.\n * @param {number} start The start position of the spread.\n * @returns {Function} Returns the new function.\n */\nfunction flatSpread(func, start) {\n return function () {\n var length = arguments.length,\n lastIndex = length - 1,\n args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var array = args[start],\n otherArgs = args.slice(0, start);\n if (array) {\n push.apply(otherArgs, array);\n }\n if (start != lastIndex) {\n push.apply(otherArgs, args.slice(start + 1));\n }\n return func.apply(this, otherArgs);\n };\n}\n\n/**\n * Creates a function that wraps `func` and uses `cloner` to clone the first\n * argument it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} cloner The function to clone arguments.\n * @returns {Function} Returns the new immutable function.\n */\nfunction wrapImmutable(func, cloner) {\n return function () {\n var length = arguments.length;\n if (!length) {\n return;\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var result = args[0] = cloner.apply(undefined, args);\n func.apply(undefined, args);\n return result;\n };\n}\n\n/**\n * The base implementation of `convert` which accepts a `util` object of methods\n * required to perform conversions.\n *\n * @param {Object} util The util object.\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.cap=true] Specify capping iteratee arguments.\n * @param {boolean} [options.curry=true] Specify currying.\n * @param {boolean} [options.fixed=true] Specify fixed arity.\n * @param {boolean} [options.immutable=true] Specify immutable operations.\n * @param {boolean} [options.rearg=true] Specify rearranging arguments.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction baseConvert(util, name, func, options) {\n var isLib = typeof name == 'function',\n isObj = name === Object(name);\n if (isObj) {\n options = func;\n func = name;\n name = undefined;\n }\n if (func == null) {\n throw new TypeError();\n }\n options || (options = {});\n var config = {\n 'cap': 'cap' in options ? options.cap : true,\n 'curry': 'curry' in options ? options.curry : true,\n 'fixed': 'fixed' in options ? options.fixed : true,\n 'immutable': 'immutable' in options ? options.immutable : true,\n 'rearg': 'rearg' in options ? options.rearg : true\n };\n var defaultHolder = isLib ? func : fallbackHolder,\n forceCurry = 'curry' in options && options.curry,\n forceFixed = 'fixed' in options && options.fixed,\n forceRearg = 'rearg' in options && options.rearg,\n pristine = isLib ? func.runInContext() : undefined;\n var helpers = isLib ? func : {\n 'ary': util.ary,\n 'assign': util.assign,\n 'clone': util.clone,\n 'curry': util.curry,\n 'forEach': util.forEach,\n 'isArray': util.isArray,\n 'isError': util.isError,\n 'isFunction': util.isFunction,\n 'isWeakMap': util.isWeakMap,\n 'iteratee': util.iteratee,\n 'keys': util.keys,\n 'rearg': util.rearg,\n 'toInteger': util.toInteger,\n 'toPath': util.toPath\n };\n var ary = helpers.ary,\n assign = helpers.assign,\n clone = helpers.clone,\n curry = helpers.curry,\n each = helpers.forEach,\n isArray = helpers.isArray,\n isError = helpers.isError,\n isFunction = helpers.isFunction,\n isWeakMap = helpers.isWeakMap,\n keys = helpers.keys,\n rearg = helpers.rearg,\n toInteger = helpers.toInteger,\n toPath = helpers.toPath;\n var aryMethodKeys = keys(mapping.aryMethod);\n var wrappers = {\n 'castArray': function (castArray) {\n return function () {\n var value = arguments[0];\n return isArray(value) ? castArray(cloneArray(value)) : castArray.apply(undefined, arguments);\n };\n },\n 'iteratee': function (iteratee) {\n return function () {\n var func = arguments[0],\n arity = arguments[1],\n result = iteratee(func, arity),\n length = result.length;\n if (config.cap && typeof arity == 'number') {\n arity = arity > 2 ? arity - 2 : 1;\n return length && length <= arity ? result : baseAry(result, arity);\n }\n return result;\n };\n },\n 'mixin': function (mixin) {\n return function (source) {\n var func = this;\n if (!isFunction(func)) {\n return mixin(func, Object(source));\n }\n var pairs = [];\n each(keys(source), function (key) {\n if (isFunction(source[key])) {\n pairs.push([key, func.prototype[key]]);\n }\n });\n mixin(func, Object(source));\n each(pairs, function (pair) {\n var value = pair[1];\n if (isFunction(value)) {\n func.prototype[pair[0]] = value;\n } else {\n delete func.prototype[pair[0]];\n }\n });\n return func;\n };\n },\n 'nthArg': function (nthArg) {\n return function (n) {\n var arity = n < 0 ? 1 : toInteger(n) + 1;\n return curry(nthArg(n), arity);\n };\n },\n 'rearg': function (rearg) {\n return function (func, indexes) {\n var arity = indexes ? indexes.length : 0;\n return curry(rearg(func, indexes), arity);\n };\n },\n 'runInContext': function (runInContext) {\n return function (context) {\n return baseConvert(util, runInContext(context), options);\n };\n }\n };\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Casts `func` to a function with an arity capped iteratee if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @returns {Function} Returns the cast function.\n */\n function castCap(name, func) {\n if (config.cap) {\n var indexes = mapping.iterateeRearg[name];\n if (indexes) {\n return iterateeRearg(func, indexes);\n }\n var n = !isLib && mapping.iterateeAry[name];\n if (n) {\n return iterateeAry(func, n);\n }\n }\n return func;\n }\n\n /**\n * Casts `func` to a curried function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castCurry(name, func, n) {\n return forceCurry || config.curry && n > 1 ? curry(func, n) : func;\n }\n\n /**\n * Casts `func` to a fixed arity function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the cast function.\n */\n function castFixed(name, func, n) {\n if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {\n var data = mapping.methodSpread[name],\n start = data && data.start;\n return start === undefined ? ary(func, n) : flatSpread(func, start);\n }\n return func;\n }\n\n /**\n * Casts `func` to an rearged function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castRearg(name, func, n) {\n return config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]) ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) : func;\n }\n\n /**\n * Creates a clone of `object` by `path`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {Array|string} path The path to clone by.\n * @returns {Object} Returns the cloned object.\n */\n function cloneByPath(object, path) {\n path = toPath(path);\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n result = clone(Object(object)),\n nested = result;\n while (nested != null && ++index < length) {\n var key = path[index],\n value = nested[key];\n if (value != null && !(isFunction(value) || isError(value) || isWeakMap(value))) {\n nested[key] = clone(index == lastIndex ? value : Object(value));\n }\n nested = nested[key];\n }\n return result;\n }\n\n /**\n * Converts `lodash` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied.\n *\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function} Returns the converted `lodash`.\n */\n function convertLib(options) {\n return _.runInContext.convert(options)(undefined);\n }\n\n /**\n * Create a converter function for `func` of `name`.\n *\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @returns {Function} Returns the new converter function.\n */\n function createConverter(name, func) {\n var realName = mapping.aliasToReal[name] || name,\n methodName = mapping.remap[realName] || realName,\n oldOptions = options;\n return function (options) {\n var newUtil = isLib ? pristine : helpers,\n newFunc = isLib ? pristine[methodName] : func,\n newOptions = assign(assign({}, oldOptions), options);\n return baseConvert(newUtil, realName, newFunc, newOptions);\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee, with up to `n`\n * arguments, ignoring any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap iteratee arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\n function iterateeAry(func, n) {\n return overArg(func, function (func) {\n return typeof func == 'function' ? baseAry(func, n) : func;\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee with arguments\n * arranged according to the specified `indexes` where the argument value at\n * the first index is provided as the first argument, the argument value at\n * the second index is provided as the second argument, and so on.\n *\n * @private\n * @param {Function} func The function to rearrange iteratee arguments for.\n * @param {number[]} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n */\n function iterateeRearg(func, indexes) {\n return overArg(func, function (func) {\n var n = indexes.length;\n return baseArity(rearg(baseAry(func, n), indexes), n);\n });\n }\n\n /**\n * Creates a function that invokes `func` with its first 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 */\n function overArg(func, transform) {\n return function () {\n var length = arguments.length;\n if (!length) {\n return func();\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var index = config.rearg ? 0 : length - 1;\n args[index] = transform(args[index]);\n return func.apply(undefined, args);\n };\n }\n\n /**\n * Creates a function that wraps `func` and applys the conversions\n * rules by `name`.\n *\n * @private\n * @param {string} name The name of the function to wrap.\n * @param {Function} func The function to wrap.\n * @returns {Function} Returns the converted function.\n */\n function wrap(name, func, placeholder) {\n var result,\n realName = mapping.aliasToReal[name] || name,\n wrapped = func,\n wrapper = wrappers[realName];\n if (wrapper) {\n wrapped = wrapper(func);\n } else if (config.immutable) {\n if (mapping.mutate.array[realName]) {\n wrapped = wrapImmutable(func, cloneArray);\n } else if (mapping.mutate.object[realName]) {\n wrapped = wrapImmutable(func, createCloner(func));\n } else if (mapping.mutate.set[realName]) {\n wrapped = wrapImmutable(func, cloneByPath);\n }\n }\n each(aryMethodKeys, function (aryKey) {\n each(mapping.aryMethod[aryKey], function (otherName) {\n if (realName == otherName) {\n var data = mapping.methodSpread[realName],\n afterRearg = data && data.afterRearg;\n result = afterRearg ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);\n result = castCap(realName, result);\n result = castCurry(realName, result, aryKey);\n return false;\n }\n });\n return !result;\n });\n result || (result = wrapped);\n if (result == func) {\n result = forceCurry ? curry(result, 1) : function () {\n return func.apply(this, arguments);\n };\n }\n result.convert = createConverter(realName, func);\n result.placeholder = func.placeholder = placeholder;\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n if (!isObj) {\n return wrap(name, func, defaultHolder);\n }\n var _ = func;\n\n // Convert methods by ary cap.\n var pairs = [];\n each(aryMethodKeys, function (aryKey) {\n each(mapping.aryMethod[aryKey], function (key) {\n var func = _[mapping.remap[key] || key];\n if (func) {\n pairs.push([key, wrap(key, func, _)]);\n }\n });\n });\n\n // Convert remaining methods.\n each(keys(_), function (key) {\n var func = _[key];\n if (typeof func == 'function') {\n var length = pairs.length;\n while (length--) {\n if (pairs[length][0] == key) {\n return;\n }\n }\n func.convert = createConverter(key, func);\n pairs.push([key, func]);\n }\n });\n\n // Assign to `_` leaving `_.prototype` unchanged to allow chaining.\n each(pairs, function (pair) {\n _[pair[0]] = pair[1];\n });\n _.convert = convertLib;\n _.placeholder = _;\n\n // Assign aliases.\n each(keys(_), function (key) {\n each(mapping.realToAlias[key] || [], function (alias) {\n _[alias] = _[key];\n });\n });\n return _;\n}\nmodule.exports = baseConvert;","var WeakMap = require('./_WeakMap');\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap();\nmodule.exports = metaMap;","var identity = require('./identity'),\n metaMap = require('./_metaMap');\n\n/**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function (func, data) {\n metaMap.set(func, data);\n return func;\n};\nmodule.exports = baseSetData;","var baseCreate = require('./_baseCreate'),\n isObject = require('./isObject');\n\n/**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCtor(Ctor) {\n return function () {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0:\n return new Ctor();\n case 1:\n return new Ctor(args[0]);\n case 2:\n return new Ctor(args[0], args[1]);\n case 3:\n return new Ctor(args[0], args[1], args[2]);\n case 4:\n return new Ctor(args[0], args[1], args[2], args[3]);\n case 5:\n return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6:\n return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7:\n return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n}\nmodule.exports = createCtor;","var createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n function wrapper() {\n var fn = this && this !== root && this instanceof wrapper ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n}\nmodule.exports = createBind;","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n}\nmodule.exports = composeArgs;","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n}\nmodule.exports = composeArgsRight;","/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n}\nmodule.exports = countHolders;","/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n // No operation performed.\n}\nmodule.exports = baseLodash;","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\nfunction LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n}\n\n// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\nmodule.exports = LazyWrapper;","/**\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}\nmodule.exports = noop;","var metaMap = require('./_metaMap'),\n noop = require('./noop');\n\n/**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\nvar getData = !metaMap ? noop : function (func) {\n return metaMap.get(func);\n};\nmodule.exports = getData;","/** Used to lookup unminified function names. */\nvar realNames = {};\nmodule.exports = realNames;","var realNames = require('./_realNames');\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 name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\nfunction getFuncName(func) {\n var result = func.name + '',\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n}\nmodule.exports = getFuncName;","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\n\n/**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\nfunction LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n}\nLodashWrapper.prototype = baseCreate(baseLodash.prototype);\nLodashWrapper.prototype.constructor = LodashWrapper;\nmodule.exports = LodashWrapper;","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n copyArray = require('./_copyArray');\n\n/**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\nfunction wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n}\nmodule.exports = wrapperClone;","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n baseLodash = require('./_baseLodash'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike'),\n wrapperClone = require('./_wrapperClone');\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 a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\nfunction lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n}\n\n// Ensure wrappers are instances of `baseLodash`.\nlodash.prototype = baseLodash.prototype;\nlodash.prototype.constructor = lodash;\nmodule.exports = lodash;","var LazyWrapper = require('./_LazyWrapper'),\n getData = require('./_getData'),\n getFuncName = require('./_getFuncName'),\n lodash = require('./wrapperLodash');\n\n/**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\nfunction isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n}\nmodule.exports = isLaziable;","var baseSetData = require('./_baseSetData'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar setData = shortOut(baseSetData);\nmodule.exports = setData;","/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n/**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\nfunction getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n}\nmodule.exports = getWrapDetails;","/** Used to match wrap detail comments. */\nvar reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;\n\n/**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\nfunction insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n}\nmodule.exports = insertWrapDetails;","/**\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}\nmodule.exports = baseIsNaN;","/**\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 while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\nmodule.exports = strictIndexOf;","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\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 ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);\n}\nmodule.exports = baseIndexOf;","var baseIndexOf = require('./_baseIndexOf');\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}\nmodule.exports = arrayIncludes;","var arrayEach = require('./_arrayEach'),\n arrayIncludes = require('./_arrayIncludes');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n/** Used to associate wrap methods with their bit flags. */\nvar wrapFlags = [['ary', WRAP_ARY_FLAG], ['bind', WRAP_BIND_FLAG], ['bindKey', WRAP_BIND_KEY_FLAG], ['curry', WRAP_CURRY_FLAG], ['curryRight', WRAP_CURRY_RIGHT_FLAG], ['flip', WRAP_FLIP_FLAG], ['partial', WRAP_PARTIAL_FLAG], ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], ['rearg', WRAP_REARG_FLAG]];\n\n/**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\nfunction updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function (pair) {\n var value = '_.' + pair[0];\n if (bitmask & pair[1] && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n}\nmodule.exports = updateWrapDetails;","var getWrapDetails = require('./_getWrapDetails'),\n insertWrapDetails = require('./_insertWrapDetails'),\n setToString = require('./_setToString'),\n updateWrapDetails = require('./_updateWrapDetails');\n\n/**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\nfunction setWrapToString(wrapper, reference, bitmask) {\n var source = reference + '';\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\nmodule.exports = setWrapToString;","var isLaziable = require('./_isLaziable'),\n setData = require('./_setData'),\n setWrapToString = require('./_setWrapToString');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity];\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n}\nmodule.exports = createRecurry;","/**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\nfunction getHolder(func) {\n var object = func;\n return object.placeholder;\n}\nmodule.exports = getHolder;","var copyArray = require('./_copyArray'),\n isIndex = require('./_isIndex');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n}\nmodule.exports = reorder;","/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\nfunction replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n}\nmodule.exports = replaceHolders;","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n countHolders = require('./_countHolders'),\n createCtor = require('./_createCtor'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n reorder = require('./_reorder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length);\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n}\nmodule.exports = createHybrid;","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n createHybrid = require('./_createHybrid'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);\n length -= holders.length;\n if (length < arity) {\n return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length);\n }\n var fn = this && this !== root && this instanceof wrapper ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n}\nmodule.exports = createCurry;","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = this && this !== root && this instanceof wrapper ? Ctor : func;\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n}\nmodule.exports = createPartial;","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n replaceHolders = require('./_replaceHolders');\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\nfunction mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n return data;\n}\nmodule.exports = mergeData;","var baseSetData = require('./_baseSetData'),\n createBind = require('./_createBind'),\n createCurry = require('./_createCurry'),\n createHybrid = require('./_createHybrid'),\n createPartial = require('./_createPartial'),\n getData = require('./_getData'),\n mergeData = require('./_mergeData'),\n setData = require('./_setData'),\n setWrapToString = require('./_setWrapToString'),\n toInteger = require('./toInteger');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n var newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n}\nmodule.exports = createWrap;","var createWrap = require('./_createWrap');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_ARY_FLAG = 128;\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\nfunction ary(func, n, guard) {\n n = guard ? undefined : n;\n n = func && n == null ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n}\nmodule.exports = ary;","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\nmodule.exports = clone;","var createWrap = require('./_createWrap');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_CURRY_FLAG = 8;\n\n/**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\nfunction curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n}\n\n// Assign default placeholders.\ncurry.placeholder = {};\nmodule.exports = curry;","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike'),\n isPlainObject = require('./isPlainObject');\n\n/** `Object#toString` result references. */\nvar domExcTag = '[object DOMException]',\n errorTag = '[object Error]';\n\n/**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\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 an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\nfunction isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag || typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value);\n}\nmodule.exports = isError;","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar weakMapTag = '[object WeakMap]';\n\n/**\n * Checks if `value` is classified as a `WeakMap` object.\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 weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\nfunction isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n}\nmodule.exports = isWeakMap;","var baseClone = require('./_baseClone'),\n baseIteratee = require('./_baseIteratee');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1;\n\n/**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\nfunction iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n}\nmodule.exports = iteratee;","var createWrap = require('./_createWrap'),\n flatRest = require('./_flatRest');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_REARG_FLAG = 256;\n\n/**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\nvar rearg = flatRest(function (func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n});\nmodule.exports = rearg;","var arrayMap = require('./_arrayMap'),\n copyArray = require('./_copyArray'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol'),\n stringToPath = require('./_stringToPath'),\n toKey = require('./_toKey'),\n toString = require('./toString');\n\n/**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\nfunction toPath(value) {\n if (isArray(value)) {\n return arrayMap(value, toKey);\n }\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n}\nmodule.exports = toPath;","module.exports = {\n 'ary': require('../ary'),\n 'assign': require('../_baseAssign'),\n 'clone': require('../clone'),\n 'curry': require('../curry'),\n 'forEach': require('../_arrayEach'),\n 'isArray': require('../isArray'),\n 'isError': require('../isError'),\n 'isFunction': require('../isFunction'),\n 'isWeakMap': require('../isWeakMap'),\n 'iteratee': require('../iteratee'),\n 'keys': require('../_baseKeys'),\n 'rearg': require('../rearg'),\n 'toInteger': require('../toInteger'),\n 'toPath': require('../toPath')\n};","var baseConvert = require('./_baseConvert'),\n util = require('./_util');\n\n/**\n * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied. If `name` is an object its methods\n * will be converted.\n *\n * @param {string} name The name of the function to wrap.\n * @param {Function} [func] The function to wrap.\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction convert(name, func, options) {\n return baseConvert(util, name, func, options);\n}\nmodule.exports = convert;","var convert = require('./convert'),\n func = convert('set', require('../set'));\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;","module.exports = require('./set');","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n return isNonNullObject(value) && !isSpecial(value);\n};\nfunction isNonNullObject(value) {\n return !!value && typeof value === 'object';\n}\nfunction isSpecial(value) {\n var stringValue = Object.prototype.toString.call(value);\n return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value);\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\nfunction isReactElement(value) {\n return value.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction emptyTarget(val) {\n return Array.isArray(val) ? [] : {};\n}\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;\n}\nfunction defaultArrayMerge(target, source, options) {\n return target.concat(source).map(function (element) {\n return cloneUnlessOtherwiseSpecified(element, options);\n });\n}\nfunction getMergeFunction(key, options) {\n if (!options.customMerge) {\n return deepmerge;\n }\n var customMerge = options.customMerge(key);\n return typeof customMerge === 'function' ? customMerge : deepmerge;\n}\nfunction getEnumerableOwnPropertySymbols(target) {\n return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function (symbol) {\n return Object.propertyIsEnumerable.call(target, symbol);\n }) : [];\n}\nfunction getKeys(target) {\n return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));\n}\nfunction propertyIsOnObject(object, property) {\n try {\n return property in object;\n } catch (_) {\n return false;\n }\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n && Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.\n}\nfunction mergeObject(target, source, options) {\n var destination = {};\n if (options.isMergeableObject(target)) {\n getKeys(target).forEach(function (key) {\n destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n });\n }\n getKeys(source).forEach(function (key) {\n if (propertyIsUnsafe(target, key)) {\n return;\n }\n if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n destination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n } else {\n destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n }\n });\n return destination;\n}\nfunction deepmerge(target, source, options) {\n options = options || {};\n options.arrayMerge = options.arrayMerge || defaultArrayMerge;\n options.isMergeableObject = options.isMergeableObject || isMergeableObject;\n // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n // implementations can use it. The caller may not replace it.\n options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n var sourceIsArray = Array.isArray(source);\n var targetIsArray = Array.isArray(target);\n var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n if (!sourceAndTargetTypesMatch) {\n return cloneUnlessOtherwiseSpecified(source, options);\n } else if (sourceIsArray) {\n return options.arrayMerge(target, source, options);\n } else {\n return mergeObject(target, source, options);\n }\n}\ndeepmerge.all = function deepmergeAll(array, options) {\n if (!Array.isArray(array)) {\n throw new Error('first argument should be an array');\n }\n return array.reduce(function (prev, next) {\n return deepmerge(prev, next, options);\n }, {});\n};\nvar deepmerge_1 = deepmerge;\nmodule.exports = deepmerge_1;","'use strict';\n\nvar shared = require('../internals/shared');\nvar uid = require('../internals/uid');\nvar keys = shared('keys');\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};","'use strict';\n\nvar fails = require('../internals/fails');\nmodule.exports = !fails(function () {\n function F() {/* empty */}\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});","'use strict';\n\nvar hasOwn = require('../internals/has-own-property');\nvar isCallable = require('../internals/is-callable');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n }\n return object instanceof $Object ? ObjectPrototype : null;\n};","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nmodule.exports = function (object, key, method) {\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));\n } catch (error) {/* empty */}\n};","'use strict';\n\nvar isObject = require('../internals/is-object');\nmodule.exports = function (argument) {\n return isObject(argument) || argument === null;\n};","'use strict';\n\nvar isPossiblePrototype = require('../internals/is-possible-prototype');\nvar $String = String;\nvar $TypeError = TypeError;\nmodule.exports = function (argument) {\n if (isPossiblePrototype(argument)) return argument;\n throw new $TypeError(\"Can't set \" + $String(argument) + ' as a prototype');\n};","'use strict';\n\n/* eslint-disable no-proto -- safe */\nvar uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');\nvar isObject = require('../internals/is-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) {/* empty */}\n return function setPrototypeOf(O, proto) {\n requireObjectCoercible(O);\n aPossiblePrototype(proto);\n if (!isObject(O)) return O;\n if (CORRECT_SETTER) setter(O, proto);else O.__proto__ = proto;\n return O;\n };\n}() : undefined);","'use strict';\n\nvar internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};","'use strict';\n\nvar getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};","'use strict';\n\nvar hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};","'use strict';\n\nvar getBuiltIn = require('../internals/get-built-in');\nmodule.exports = getBuiltIn('document', 'documentElement');","'use strict';\n\n/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar EmptyConstructor = function () {/* empty */};\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n // eslint-disable-next-line no-useless-assignment -- avoid memory leak\n activeXDocument = null;\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) {/* ignore */}\n NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};","'use strict';\n\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\n// `InstallErrorCause` abstract operation\n// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause\nmodule.exports = function (O, options) {\n if (isObject(options) && 'cause' in options) {\n createNonEnumerableProperty(O, 'cause', options.cause);\n }\n};","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar $Error = Error;\nvar replace = uncurryThis(''.replace);\nvar TEST = function (arg) {\n return String(new $Error(arg).stack);\n}('zxcasd');\n// eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe\nvar V8_OR_CHAKRA_STACK_ENTRY = /\\n\\s*at [^:]*:[^\\n]*/;\nvar IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);\nmodule.exports = function (stack, dropEntries) {\n if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {\n while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');\n }\n return stack;\n};","'use strict';\n\nvar fails = require('../internals/fails');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nmodule.exports = !fails(function () {\n var error = new Error('a');\n if (!('stack' in error)) return true;\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));\n return error.stack !== 7;\n});","'use strict';\n\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar clearErrorStack = require('../internals/error-stack-clear');\nvar ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');\n\n// non-standard V8\nvar captureStackTrace = Error.captureStackTrace;\nmodule.exports = function (error, C, stack, dropEntries) {\n if (ERROR_STACK_INSTALLABLE) {\n if (captureStackTrace) captureStackTrace(error, C);else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries));\n }\n};","'use strict';\n\nmodule.exports = {};","'use strict';\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};","'use strict';\n\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\ntest[TO_STRING_TAG] = 'z';\nmodule.exports = String(test) === '[object z]';","'use strict';\n\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () {\n return arguments;\n}()) === 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) {/* empty */}\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};","'use strict';\n\nvar classof = require('../internals/classof');\nvar getMethod = require('../internals/get-method');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar ITERATOR = wellKnownSymbol('iterator');\nmodule.exports = function (it) {\n if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR) || getMethod(it, '@@iterator') || Iterators[classof(it)];\n};","'use strict';\n\nvar call = require('../internals/function-call');\nvar aCallable = require('../internals/a-callable');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar $TypeError = TypeError;\nmodule.exports = function (argument, usingIterator) {\n var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;\n if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));\n throw new $TypeError(tryToString(argument) + ' is not iterable');\n};","'use strict';\n\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar getMethod = require('../internals/get-method');\nmodule.exports = function (iterator, kind, value) {\n var innerResult, innerError;\n anObject(iterator);\n try {\n innerResult = getMethod(iterator, 'return');\n if (!innerResult) {\n if (kind === 'throw') throw value;\n return value;\n }\n innerResult = call(innerResult, iterator);\n } catch (error) {\n innerError = true;\n innerResult = error;\n }\n if (kind === 'throw') throw value;\n if (innerError) throw innerResult;\n anObject(innerResult);\n return value;\n};","'use strict';\n\nvar bind = require('../internals/function-bind-context');\nvar call = require('../internals/function-call');\nvar anObject = require('../internals/an-object');\nvar tryToString = require('../internals/try-to-string');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\nvar $TypeError = TypeError;\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\nvar ResultPrototype = Result.prototype;\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_RECORD = !!(options && options.IS_RECORD);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that);\n var iterator, iterFn, index, length, result, next, step;\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator, 'normal', condition);\n return new Result(true, condition);\n };\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n }\n return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n if (IS_RECORD) {\n iterator = iterable.iterator;\n } else if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && isPrototypeOf(ResultPrototype, result)) return result;\n }\n return new Result(false);\n }\n iterator = getIterator(iterable, iterFn);\n }\n next = IS_RECORD ? iterable.next : iterator.next;\n while (!(step = call(next, iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator, 'throw', error);\n }\n if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;\n }\n return new Result(false);\n};","'use strict';\n\nvar classof = require('../internals/classof');\nvar $String = String;\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');\n return $String(argument);\n};","'use strict';\n\nvar toString = require('../internals/to-string');\nmodule.exports = function (argument, $default) {\n return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);\n};","'use strict';\n\nvar $ = require('../internals/export');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar create = require('../internals/object-create');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar installErrorCause = require('../internals/install-error-cause');\nvar installErrorStack = require('../internals/error-stack-install');\nvar iterate = require('../internals/iterate');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Error = Error;\nvar push = [].push;\nvar $AggregateError = function AggregateError(errors, message /* , options */) {\n var isInstance = isPrototypeOf(AggregateErrorPrototype, this);\n var that;\n if (setPrototypeOf) {\n that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);\n } else {\n that = isInstance ? this : create(AggregateErrorPrototype);\n createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');\n }\n if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));\n installErrorStack(that, $AggregateError, that.stack, 1);\n if (arguments.length > 2) installErrorCause(that, arguments[2]);\n var errorsArray = [];\n iterate(errors, push, {\n that: errorsArray\n });\n createNonEnumerableProperty(that, 'errors', errorsArray);\n return that;\n};\nif (setPrototypeOf) setPrototypeOf($AggregateError, $Error);else copyConstructorProperties($AggregateError, $Error, {\n name: true\n});\nvar AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, {\n constructor: createPropertyDescriptor(1, $AggregateError),\n message: createPropertyDescriptor(1, ''),\n name: createPropertyDescriptor(1, 'AggregateError')\n});\n\n// `AggregateError` constructor\n// https://tc39.es/ecma262/#sec-aggregate-error-constructor\n$({\n global: true,\n constructor: true,\n arity: 2\n}, {\n AggregateError: $AggregateError\n});","'use strict';\n\n// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/es.aggregate-error.constructor');","'use strict';\n\n// TODO: Remove from `core-js@4`\nrequire('../modules/es.aggregate-error');","'use strict';\n\nvar defineProperty = require('../internals/object-define-property').f;\nmodule.exports = function (Target, Source, key) {\n key in Target || defineProperty(Target, key, {\n configurable: true,\n get: function () {\n return Source[key];\n },\n set: function (it) {\n Source[key] = it;\n }\n });\n};","'use strict';\n\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n isCallable(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};","'use strict';\n\nvar getBuiltIn = require('../internals/get-built-in');\nvar hasOwn = require('../internals/has-own-property');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar proxyAccessor = require('../internals/proxy-accessor');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar normalizeStringArgument = require('../internals/normalize-string-argument');\nvar installErrorCause = require('../internals/install-error-cause');\nvar installErrorStack = require('../internals/error-stack-install');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar IS_PURE = require('../internals/is-pure');\nmodule.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {\n var STACK_TRACE_LIMIT = 'stackTraceLimit';\n var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;\n var path = FULL_NAME.split('.');\n var ERROR_NAME = path[path.length - 1];\n var OriginalError = getBuiltIn.apply(null, path);\n if (!OriginalError) return;\n var OriginalErrorPrototype = OriginalError.prototype;\n\n // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006\n if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;\n if (!FORCED) return OriginalError;\n var BaseError = getBuiltIn('Error');\n var WrappedError = wrapper(function (a, b) {\n var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);\n var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();\n if (message !== undefined) createNonEnumerableProperty(result, 'message', message);\n installErrorStack(result, WrappedError, result.stack, 2);\n if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);\n if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);\n return result;\n });\n WrappedError.prototype = OriginalErrorPrototype;\n if (ERROR_NAME !== 'Error') {\n if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);else copyConstructorProperties(WrappedError, BaseError, {\n name: true\n });\n } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {\n proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);\n proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');\n }\n copyConstructorProperties(WrappedError, OriginalError);\n if (!IS_PURE) try {\n // Safari 13- bug: WebAssembly errors does not have a proper `.name`\n if (OriginalErrorPrototype.name !== ERROR_NAME) {\n createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);\n }\n OriginalErrorPrototype.constructor = WrappedError;\n } catch (error) {/* empty */}\n return WrappedError;\n};","'use strict';\n\n/* eslint-disable no-unused-vars -- required for functions `.length` */\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar apply = require('../internals/function-apply');\nvar wrapErrorConstructorWithCause = require('../internals/wrap-error-constructor-with-cause');\nvar WEB_ASSEMBLY = 'WebAssembly';\nvar WebAssembly = globalThis[WEB_ASSEMBLY];\n\n// eslint-disable-next-line es/no-error-cause -- feature detection\nvar FORCED = new Error('e', {\n cause: 7\n}).cause !== 7;\nvar exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {\n var O = {};\n O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);\n $({\n global: true,\n constructor: true,\n arity: 1,\n forced: FORCED\n }, O);\n};\nvar exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {\n if (WebAssembly && WebAssembly[ERROR_NAME]) {\n var O = {};\n O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);\n $({\n target: WEB_ASSEMBLY,\n stat: true,\n constructor: true,\n arity: 1,\n forced: FORCED\n }, O);\n }\n};\n\n// https://tc39.es/ecma262/#sec-nativeerror\nexportGlobalErrorCauseWrapper('Error', function (init) {\n return function Error(message) {\n return apply(init, this, arguments);\n };\n});\nexportGlobalErrorCauseWrapper('EvalError', function (init) {\n return function EvalError(message) {\n return apply(init, this, arguments);\n };\n});\nexportGlobalErrorCauseWrapper('RangeError', function (init) {\n return function RangeError(message) {\n return apply(init, this, arguments);\n };\n});\nexportGlobalErrorCauseWrapper('ReferenceError', function (init) {\n return function ReferenceError(message) {\n return apply(init, this, arguments);\n };\n});\nexportGlobalErrorCauseWrapper('SyntaxError', function (init) {\n return function SyntaxError(message) {\n return apply(init, this, arguments);\n };\n});\nexportGlobalErrorCauseWrapper('TypeError', function (init) {\n return function TypeError(message) {\n return apply(init, this, arguments);\n };\n});\nexportGlobalErrorCauseWrapper('URIError', function (init) {\n return function URIError(message) {\n return apply(init, this, arguments);\n };\n});\nexportWebAssemblyErrorCauseWrapper('CompileError', function (init) {\n return function CompileError(message) {\n return apply(init, this, arguments);\n };\n});\nexportWebAssemblyErrorCauseWrapper('LinkError', function (init) {\n return function LinkError(message) {\n return apply(init, this, arguments);\n };\n});\nexportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {\n return function RuntimeError(message) {\n return apply(init, this, arguments);\n };\n});","'use strict';\n\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar apply = require('../internals/function-apply');\nvar fails = require('../internals/fails');\nvar wrapErrorConstructorWithCause = require('../internals/wrap-error-constructor-with-cause');\nvar AGGREGATE_ERROR = 'AggregateError';\nvar $AggregateError = getBuiltIn(AGGREGATE_ERROR);\nvar FORCED = !fails(function () {\n return $AggregateError([1]).errors[0] !== 1;\n}) && fails(function () {\n return $AggregateError([1], AGGREGATE_ERROR, {\n cause: 7\n }).cause !== 7;\n});\n\n// https://tc39.es/ecma262/#sec-aggregate-error\n$({\n global: true,\n constructor: true,\n arity: 2,\n forced: FORCED\n}, {\n AggregateError: wrapErrorConstructorWithCause(AGGREGATE_ERROR, function (init) {\n // eslint-disable-next-line no-unused-vars -- required for functions `.length`\n return function AggregateError(errors, message) {\n return apply(init, this, arguments);\n };\n }, FORCED, true)\n});","'use strict';\n\nmodule.exports = function () {/* empty */};","'use strict';\n\nvar globalThis = require('../internals/global-this');\nvar isCallable = require('../internals/is-callable');\nvar WeakMap = globalThis.WeakMap;\nmodule.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));","'use strict';\n\nvar NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');\nvar globalThis = require('../internals/global-this');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = globalThis.TypeError;\nvar WeakMap = globalThis.WeakMap;\nvar set, get, has;\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw new TypeError('Incompatible receiver, ' + TYPE + ' required');\n }\n return state;\n };\n};\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n /* eslint-disable no-self-assign -- prototype methods protection */\n store.get = store.get;\n store.has = store.has;\n store.set = store.set;\n /* eslint-enable no-self-assign -- prototype methods protection */\n set = function (it, metadata) {\n if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n store.set(it, metadata);\n return metadata;\n };\n get = function (it) {\n return store.get(it) || {};\n };\n has = function (it) {\n return store.has(it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};","'use strict';\n\nvar DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && function something() {/* empty */}.name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable);\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};","'use strict';\n\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nmodule.exports = function (target, key, value, options) {\n if (options && options.enumerable) target[key] = value;else createNonEnumerableProperty(target, key, value);\n return target;\n};","'use strict';\n\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};","'use strict';\n\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};","'use strict';\n\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar defineProperty = require('../internals/object-define-property').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar toString = require('../internals/object-to-string');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nmodule.exports = function (it, TAG, STATIC, SET_METHOD) {\n var target = STATIC ? it : it && it.prototype;\n if (target) {\n if (!hasOwn(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, {\n configurable: true,\n value: TAG\n });\n }\n if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {\n createNonEnumerableProperty(target, 'toString', toString);\n }\n }\n};","'use strict';\n\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\nvar returnThis = function () {\n return this;\n};\nmodule.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, {\n next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next)\n });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};","'use strict';\n\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar IS_PURE = require('../internals/is-pure');\nvar FunctionName = require('../internals/function-name');\nvar isCallable = require('../internals/is-callable');\nvar createIteratorConstructor = require('../internals/iterator-create-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\nvar PROPER_FUNCTION_NAME = FunctionName.PROPER;\nvar CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\nvar returnThis = function () {\n return this;\n};\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS:\n return function keys() {\n return new IteratorConstructor(this, KIND);\n };\n case VALUES:\n return function values() {\n return new IteratorConstructor(this, KIND);\n };\n case ENTRIES:\n return function entries() {\n return new IteratorConstructor(this, KIND);\n };\n }\n return function () {\n return new IteratorConstructor(this);\n };\n };\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {\n defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {\n createNonEnumerableProperty(IterablePrototype, 'name', VALUES);\n } else {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() {\n return call(nativeIterator, this);\n };\n }\n }\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n defineBuiltIn(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({\n target: NAME,\n proto: true,\n forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME\n }, methods);\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, {\n name: DEFAULT\n });\n }\n Iterators[NAME] = defaultIterator;\n return methods;\n};","'use strict';\n\n// `CreateIterResultObject` abstract operation\n// https://tc39.es/ecma262/#sec-createiterresultobject\nmodule.exports = function (value, done) {\n return {\n value: value,\n done: done\n };\n};","'use strict';\n\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineProperty = require('../internals/object-define-property').f;\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated),\n // target\n index: 0,\n // next index\n kind: kind // kind\n });\n // `%ArrayIteratorPrototype%.next` method\n // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = null;\n return createIterResultObject(undefined, true);\n }\n switch (state.kind) {\n case 'keys':\n return createIterResultObject(index, false);\n case 'values':\n return createIterResultObject(target[index], false);\n }\n return createIterResultObject([index, target[index]], false);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nvar values = Iterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n// V8 ~ Chrome 45- bug\nif (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {\n defineProperty(values, 'name', {\n value: 'values'\n });\n} catch (error) {/* empty */}","'use strict';\n\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar charAt = uncurryThis(''.charAt);\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar stringSlice = uncurryThis(''.slice);\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toIntegerOrInfinity(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = charCodeAt(S, position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt(S, position) : first : CONVERT_TO_STRING ? stringSlice(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};","'use strict';\n\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/iterator-define');\nvar createIterResultObject = require('../internals/create-iter-result-object');\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n // `%StringIteratorPrototype%.next` method\n // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return createIterResultObject(undefined, true);\n point = charAt(string, index);\n state.index += point.length;\n return createIterResultObject(point, false);\n});","'use strict';\n\nrequire('../modules/es.error.cause');\nrequire('../modules/es.aggregate-error');\nrequire('../modules/es.aggregate-error.cause');\nrequire('../modules/es.array.iterator');\nrequire('../modules/es.string.iterator');\nvar path = require('../internals/path');\nmodule.exports = path.AggregateError;","'use strict';\n\n// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};","'use strict';\n\nrequire('../modules/es.array.iterator');\nvar DOMIterables = require('../internals/dom-iterables');\nvar globalThis = require('../internals/global-this');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\nfor (var COLLECTION_NAME in DOMIterables) {\n setToStringTag(globalThis[COLLECTION_NAME], COLLECTION_NAME);\n Iterators[COLLECTION_NAME] = Iterators.Array;\n}","'use strict';\n\n// TODO: remove from `core-js@4`\nrequire('../modules/esnext.aggregate-error');\nvar parent = require('../es/aggregate-error');\nrequire('../modules/web.dom-collections.iterator');\nmodule.exports = parent;","'use strict';\n\nvar parent = require('../stable/aggregate-error');\nmodule.exports = parent;","'use strict';\n\n// TODO: remove from `core-js@4`\nrequire('../modules/esnext.aggregate-error');\nvar parent = require('../actual/aggregate-error');\nmodule.exports = parent;","'use strict';\n\nmodule.exports = require('../full/aggregate-error');","module.exports = require(\"core-js-pure/features/aggregate-error\");","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\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 ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\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 ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\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;\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}\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\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}\nprocess.nextTick = function (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\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};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\nfunction noop() {}\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\nprocess.listeners = function (name) {\n return [];\n};\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\nprocess.cwd = function () {\n return '/';\n};\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function () {\n return 0;\n};","/**\n * Checks if `value` is `null`.\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 `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\nfunction isNull(value) {\n return value === null;\n}\nmodule.exports = isNull;","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\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 number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\nfunction isNumber(value) {\n return typeof value == 'number' || isObjectLike(value) && baseGetTag(value) == numberTag;\n}\nmodule.exports = isNumber;","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or 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 boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;\n}\nmodule.exports = isBoolean;","/**\n * @class JSONSerialiser\n *\n * @param {Namespace} namespace\n *\n * @property {Namespace} namespace\n */\nclass JSONSerialiser {\n constructor(namespace) {\n this.namespace = namespace || new this.Namespace();\n }\n\n /**\n * @param {Element} element\n * @returns {object}\n */\n serialise(element) {\n if (!(element instanceof this.namespace.elements.Element)) {\n throw new TypeError(`Given element \\`${element}\\` is not an Element instance`);\n }\n const payload = {\n element: element.element\n };\n if (element._meta && element._meta.length > 0) {\n payload.meta = this.serialiseObject(element.meta);\n }\n if (element._attributes && element._attributes.length > 0) {\n payload.attributes = this.serialiseObject(element.attributes);\n }\n const content = this.serialiseContent(element.content);\n if (content !== undefined) {\n payload.content = content;\n }\n return payload;\n }\n\n /**\n * @param {object} value\n * @returns {Element}\n */\n deserialise(value) {\n if (!value.element) {\n throw new Error('Given value is not an object containing an element name');\n }\n const ElementClass = this.namespace.getElementClass(value.element);\n const element = new ElementClass();\n if (element.element !== value.element) {\n element.element = value.element;\n }\n if (value.meta) {\n this.deserialiseObject(value.meta, element.meta);\n }\n if (value.attributes) {\n this.deserialiseObject(value.attributes, element.attributes);\n }\n const content = this.deserialiseContent(value.content);\n if (content !== undefined || element.content === null) {\n element.content = content;\n }\n return element;\n }\n\n // Private API\n\n serialiseContent(content) {\n if (content instanceof this.namespace.elements.Element) {\n return this.serialise(content);\n }\n if (content instanceof this.namespace.KeyValuePair) {\n const pair = {\n key: this.serialise(content.key)\n };\n if (content.value) {\n pair.value = this.serialise(content.value);\n }\n return pair;\n }\n if (content && content.map) {\n if (content.length === 0) {\n return undefined;\n }\n return content.map(this.serialise, this);\n }\n return content;\n }\n deserialiseContent(content) {\n if (content) {\n if (content.element) {\n return this.deserialise(content);\n }\n if (content.key) {\n const pair = new this.namespace.KeyValuePair(this.deserialise(content.key));\n if (content.value) {\n pair.value = this.deserialise(content.value);\n }\n return pair;\n }\n if (content.map) {\n return content.map(this.deserialise, this);\n }\n }\n return content;\n }\n serialiseObject(obj) {\n const result = {};\n obj.forEach((value, key) => {\n if (value) {\n result[key.toValue()] = this.serialise(value);\n }\n });\n if (Object.keys(result).length === 0) {\n return undefined;\n }\n return result;\n }\n deserialiseObject(from, to) {\n Object.keys(from).forEach(key => {\n to.set(key, this.deserialise(from[key]));\n });\n }\n}\nmodule.exports = JSONSerialiser;","var baseIsEqual = require('./_baseIsEqual');\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}\nmodule.exports = isEqual;","/**\n * @class\n *\n * @property {Element} key\n * @property {Element} value\n */\nclass KeyValuePair {\n constructor(key, value) {\n this.key = key;\n this.value = value;\n }\n\n /**\n * @returns {KeyValuePair}\n */\n clone() {\n const clone = new KeyValuePair();\n if (this.key) {\n clone.key = this.key.clone();\n }\n if (this.value) {\n clone.value = this.value.clone();\n }\n return clone;\n }\n}\nmodule.exports = KeyValuePair;","/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\nfunction negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function () {\n var args = arguments;\n switch (args.length) {\n case 0:\n return !predicate.call(this);\n case 1:\n return !predicate.call(this, args[0]);\n case 2:\n return !predicate.call(this, args[0], args[1]);\n case 3:\n return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n}\nmodule.exports = negate;","const negate = require('lodash/negate');\n\n// Coerces an a parameter into a callback for matching elements.\n// This accepts an element name, an element type and returns a\n// callback to match for those elements.\nfunction coerceElementMatchingCallback(value) {\n // Element Name\n if (typeof value === 'string') {\n return element => element.element === value;\n }\n\n // Element Type\n if (value.constructor && value.extend) {\n return element => element instanceof value;\n }\n return value;\n}\n\n/**\n * @class\n *\n * @param {Element[]} elements\n *\n * @property {Element[]} elements\n */\nclass ArraySlice {\n constructor(elements) {\n this.elements = elements || [];\n }\n\n /**\n * @returns {Array}\n */\n toValue() {\n return this.elements.map(element => element.toValue());\n }\n\n // High Order Functions\n\n /**\n * @param callback - Function to execute for each element\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns {array} A new array with each element being the result of the callback function\n */\n map(callback, thisArg) {\n return this.elements.map(callback, thisArg);\n }\n\n /**\n * Maps and then flattens the results.\n * @param callback - Function to execute for each element.\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns {array}\n */\n flatMap(callback, thisArg) {\n return this.map(callback, thisArg).reduce((a, b) => a.concat(b), []);\n }\n\n /**\n * Returns an array containing the truthy results of calling the given transformation with each element of this sequence\n * @param transform - A closure that accepts an element of this array as its argument and returns an optional value.\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @memberof ArraySlice.prototype\n * @returns An array of the non-undefined results of calling transform with each element of the array\n */\n compactMap(transform, thisArg) {\n const results = [];\n this.forEach(element => {\n const result = transform.bind(thisArg)(element);\n if (result) {\n results.push(result);\n }\n });\n return results;\n }\n\n /**\n * @param callback - Function to execute for each element. This may be a callback, an element name or an element class.\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns {ArraySlice}\n * @memberof ArraySlice.prototype\n */\n filter(callback, thisArg) {\n callback = coerceElementMatchingCallback(callback);\n return new ArraySlice(this.elements.filter(callback, thisArg));\n }\n\n /**\n * @param callback - Function to execute for each element. This may be a callback, an element name or an element class.\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns {ArraySlice}\n * @memberof ArraySlice.prototype\n */\n reject(callback, thisArg) {\n callback = coerceElementMatchingCallback(callback);\n return new ArraySlice(this.elements.filter(negate(callback), thisArg));\n }\n\n /**\n * Returns the first element in the array that satisfies the given value\n * @param callback - Function to execute for each element. This may be a callback, an element name or an element class.\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns {Element}\n * @memberof ArraySlice.prototype\n */\n find(callback, thisArg) {\n callback = coerceElementMatchingCallback(callback);\n return this.elements.find(callback, thisArg);\n }\n\n /**\n * @param callback - Function to execute for each element\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @memberof ArraySlice.prototype\n */\n forEach(callback, thisArg) {\n this.elements.forEach(callback, thisArg);\n }\n\n /**\n * @param callback - Function to execute for each element\n * @param initialValue\n * @memberof ArraySlice.prototype\n */\n reduce(callback, initialValue) {\n return this.elements.reduce(callback, initialValue);\n }\n\n /**\n * @param value\n * @returns {boolean}\n * @memberof ArraySlice.prototype\n */\n includes(value) {\n return this.elements.some(element => element.equals(value));\n }\n\n // Mutation\n\n /**\n * Removes the first element from the slice\n * @returns {Element} The removed element or undefined if the slice is empty\n * @memberof ArraySlice.prototype\n */\n shift() {\n return this.elements.shift();\n }\n\n /**\n * Adds the given element to the begining of the slice\n * @parameter {Element} value\n * @memberof ArraySlice.prototype\n */\n unshift(value) {\n this.elements.unshift(this.refract(value));\n }\n\n /**\n * Adds the given element to the end of the slice\n * @parameter {Element} value\n * @memberof ArraySlice.prototype\n */\n push(value) {\n this.elements.push(this.refract(value));\n return this;\n }\n\n /**\n * @parameter {Element} value\n * @memberof ArraySlice.prototype\n */\n add(value) {\n this.push(value);\n }\n\n // Accessors\n\n /**\n * @parameter {number} index\n * @returns {Element}\n * @memberof ArraySlice.prototype\n */\n get(index) {\n return this.elements[index];\n }\n\n /**\n * @parameter {number} index\n * @memberof ArraySlice.prototype\n */\n getValue(index) {\n const element = this.elements[index];\n if (element) {\n return element.toValue();\n }\n return undefined;\n }\n\n /**\n * Returns the number of elements in the slice\n * @type number\n */\n get length() {\n return this.elements.length;\n }\n\n /**\n * Returns whether the slice is empty\n * @type boolean\n */\n get isEmpty() {\n return this.elements.length === 0;\n }\n\n /**\n * Returns the first element in the slice or undefined if the slice is empty\n * @type Element\n */\n get first() {\n return this.elements[0];\n }\n}\nif (typeof Symbol !== 'undefined') {\n ArraySlice.prototype[Symbol.iterator] = function symbol() {\n return this.elements[Symbol.iterator]();\n };\n}\nmodule.exports = ArraySlice;","const isEqual = require('lodash/isEqual');\nconst KeyValuePair = require('../KeyValuePair');\nconst ArraySlice = require('../ArraySlice.js');\n\n/**\n * @class\n *\n * @param content\n * @param meta\n * @param attributes\n *\n * @property {string} element\n */\nclass Element {\n constructor(content, meta, attributes) {\n // Lazy load this.meta and this.attributes because it's a Minim element\n // Otherwise, we get into circuluar calls\n if (meta) {\n this.meta = meta;\n }\n if (attributes) {\n this.attributes = attributes;\n }\n this.content = content;\n }\n\n /**\n * Freezes the element to prevent any mutation.\n * A frozen element will add `parent` property to every child element\n * to allow traversing up the element tree.\n */\n freeze() {\n if (Object.isFrozen(this)) {\n return;\n }\n if (this._meta) {\n this.meta.parent = this;\n this.meta.freeze();\n }\n if (this._attributes) {\n this.attributes.parent = this;\n this.attributes.freeze();\n }\n this.children.forEach(element => {\n element.parent = this;\n element.freeze();\n }, this);\n if (this.content && Array.isArray(this.content)) {\n Object.freeze(this.content);\n }\n Object.freeze(this);\n }\n primitive() {}\n\n /**\n * Creates a deep clone of the instance\n */\n clone() {\n const copy = new this.constructor();\n copy.element = this.element;\n if (this.meta.length) {\n copy._meta = this.meta.clone();\n }\n if (this.attributes.length) {\n copy._attributes = this.attributes.clone();\n }\n if (this.content) {\n if (this.content.clone) {\n copy.content = this.content.clone();\n } else if (Array.isArray(this.content)) {\n copy.content = this.content.map(element => element.clone());\n } else {\n copy.content = this.content;\n }\n } else {\n copy.content = this.content;\n }\n return copy;\n }\n\n /**\n */\n toValue() {\n if (this.content instanceof Element) {\n return this.content.toValue();\n }\n if (this.content instanceof KeyValuePair) {\n return {\n key: this.content.key.toValue(),\n value: this.content.value ? this.content.value.toValue() : undefined\n };\n }\n if (this.content && this.content.map) {\n return this.content.map(element => element.toValue(), this);\n }\n return this.content;\n }\n\n /**\n * Creates a reference pointing at the Element\n * @returns {RefElement}\n * @memberof Element.prototype\n */\n toRef(path) {\n if (this.id.toValue() === '') {\n throw Error('Cannot create reference to an element that does not contain an ID');\n }\n const ref = new this.RefElement(this.id.toValue());\n if (path) {\n ref.path = path;\n }\n return ref;\n }\n\n /**\n * Finds the given elements in the element tree.\n * When providing multiple element names, you must first freeze the element.\n *\n * @param names {...elementNames}\n * @returns {ArraySlice}\n */\n findRecursive(...elementNames) {\n if (arguments.length > 1 && !this.isFrozen) {\n throw new Error('Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`');\n }\n const elementName = elementNames.pop();\n let elements = new ArraySlice();\n const append = (array, element) => {\n array.push(element);\n return array;\n };\n\n // Checks the given element and appends element/sub-elements\n // that match element name to given array\n const checkElement = (array, element) => {\n if (element.element === elementName) {\n array.push(element);\n }\n const items = element.findRecursive(elementName);\n if (items) {\n items.reduce(append, array);\n }\n if (element.content instanceof KeyValuePair) {\n if (element.content.key) {\n checkElement(array, element.content.key);\n }\n if (element.content.value) {\n checkElement(array, element.content.value);\n }\n }\n return array;\n };\n if (this.content) {\n // Direct Element\n if (this.content.element) {\n checkElement(elements, this.content);\n }\n\n // Element Array\n if (Array.isArray(this.content)) {\n this.content.reduce(checkElement, elements);\n }\n }\n if (!elementNames.isEmpty) {\n elements = elements.filter(element => {\n let parentElements = element.parents.map(e => e.element);\n\n // eslint-disable-next-line no-restricted-syntax\n for (const namesIndex in elementNames) {\n const name = elementNames[namesIndex];\n const index = parentElements.indexOf(name);\n if (index !== -1) {\n parentElements = parentElements.splice(0, index);\n } else {\n return false;\n }\n }\n return true;\n });\n }\n return elements;\n }\n set(content) {\n this.content = content;\n return this;\n }\n equals(value) {\n return isEqual(this.toValue(), value);\n }\n getMetaProperty(name, value) {\n if (!this.meta.hasKey(name)) {\n if (this.isFrozen) {\n const element = this.refract(value);\n element.freeze();\n return element;\n }\n this.meta.set(name, value);\n }\n return this.meta.get(name);\n }\n setMetaProperty(name, value) {\n this.meta.set(name, value);\n }\n\n /**\n * @type String\n */\n get element() {\n // Returns 'element' so we don't have undefined as element\n return this._storedElement || 'element';\n }\n set element(element) {\n this._storedElement = element;\n }\n get content() {\n return this._content;\n }\n set content(value) {\n if (value instanceof Element) {\n this._content = value;\n } else if (value instanceof ArraySlice) {\n this.content = value.elements;\n } else if (typeof value == 'string' || typeof value == 'number' || typeof value == 'boolean' || value === 'null' || value == undefined) {\n // Primitive Values\n this._content = value;\n } else if (value instanceof KeyValuePair) {\n this._content = value;\n } else if (Array.isArray(value)) {\n this._content = value.map(this.refract);\n } else if (typeof value === 'object') {\n this._content = Object.keys(value).map(key => new this.MemberElement(key, value[key]));\n } else {\n throw new Error('Cannot set content to given value');\n }\n }\n\n /**\n * @type ObjectElement\n */\n get meta() {\n if (!this._meta) {\n if (this.isFrozen) {\n const meta = new this.ObjectElement();\n meta.freeze();\n return meta;\n }\n this._meta = new this.ObjectElement();\n }\n return this._meta;\n }\n set meta(value) {\n if (value instanceof this.ObjectElement) {\n this._meta = value;\n } else {\n this.meta.set(value || {});\n }\n }\n\n /**\n * The attributes property defines attributes about the given instance\n * of the element, as specified by the element property.\n *\n * @type ObjectElement\n */\n get attributes() {\n if (!this._attributes) {\n if (this.isFrozen) {\n const meta = new this.ObjectElement();\n meta.freeze();\n return meta;\n }\n this._attributes = new this.ObjectElement();\n }\n return this._attributes;\n }\n set attributes(value) {\n if (value instanceof this.ObjectElement) {\n this._attributes = value;\n } else {\n this.attributes.set(value || {});\n }\n }\n\n /**\n * Unique Identifier, MUST be unique throughout an entire element tree.\n * @type StringElement\n */\n get id() {\n return this.getMetaProperty('id', '');\n }\n set id(element) {\n this.setMetaProperty('id', element);\n }\n\n /**\n * @type ArrayElement\n */\n get classes() {\n return this.getMetaProperty('classes', []);\n }\n set classes(element) {\n this.setMetaProperty('classes', element);\n }\n\n /**\n * Human-readable title of element\n * @type StringElement\n */\n get title() {\n return this.getMetaProperty('title', '');\n }\n set title(element) {\n this.setMetaProperty('title', element);\n }\n\n /**\n * Human-readable description of element\n * @type StringElement\n */\n get description() {\n return this.getMetaProperty('description', '');\n }\n set description(element) {\n this.setMetaProperty('description', element);\n }\n\n /**\n * @type ArrayElement\n */\n get links() {\n return this.getMetaProperty('links', []);\n }\n set links(element) {\n this.setMetaProperty('links', element);\n }\n\n /**\n * Returns whether the element is frozen.\n * @type boolean\n * @see freeze\n */\n get isFrozen() {\n return Object.isFrozen(this);\n }\n\n /**\n * Returns all of the parent elements.\n * @type ArraySlice\n */\n get parents() {\n let {\n parent\n } = this;\n const parents = new ArraySlice();\n while (parent) {\n parents.push(parent);\n\n // eslint-disable-next-line prefer-destructuring\n parent = parent.parent;\n }\n return parents;\n }\n\n /**\n * Returns all of the children elements found within the element.\n * @type ArraySlice\n * @see recursiveChildren\n */\n get children() {\n if (Array.isArray(this.content)) {\n return new ArraySlice(this.content);\n }\n if (this.content instanceof KeyValuePair) {\n const children = new ArraySlice([this.content.key]);\n if (this.content.value) {\n children.push(this.content.value);\n }\n return children;\n }\n if (this.content instanceof Element) {\n return new ArraySlice([this.content]);\n }\n return new ArraySlice();\n }\n\n /**\n * Returns all of the children elements found within the element recursively.\n * @type ArraySlice\n * @see children\n */\n get recursiveChildren() {\n const children = new ArraySlice();\n this.children.forEach(element => {\n children.push(element);\n element.recursiveChildren.forEach(child => {\n children.push(child);\n });\n });\n return children;\n }\n}\nmodule.exports = Element;","const Element = require('./Element');\n\n/**\n */\nclass NullElement extends Element {\n constructor(content, meta, attributes) {\n super(content || null, meta, attributes);\n this.element = 'null';\n }\n primitive() {\n return 'null';\n }\n set() {\n return new Error('Cannot set the value of null');\n }\n}\nmodule.exports = NullElement;","const Element = require('./Element');\n\n/**\n * @class StringElement\n *\n * @param {string} content\n * @param meta\n * @param attributes\n */\nmodule.exports = class StringElement extends Element {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'string';\n }\n primitive() {\n return 'string';\n }\n\n /**\n * The length of the string.\n * @type number\n */\n get length() {\n return this.content.length;\n }\n};","const Element = require('./Element');\n\n/**\n * @class NumberElement\n *\n * @param {number} content\n * @param meta\n * @param attributes\n */\nmodule.exports = class NumberElement extends Element {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'number';\n }\n primitive() {\n return 'number';\n }\n};","const Element = require('./Element');\n\n/**\n * @class BooleanElement\n *\n * @param {boolean} content\n * @param meta\n * @param attributes\n */\nmodule.exports = class BooleanElement extends Element {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'boolean';\n }\n primitive() {\n return 'boolean';\n }\n};","const negate = require('lodash/negate');\nconst Element = require('./Element');\nconst ArraySlice = require('../ArraySlice');\n\n/**\n * @class\n *\n * @param {Element[]} content\n * @param meta\n * @param attributes\n */\nlet ArrayElement = /*#__PURE__*/(() => {\n class ArrayElement extends Element {\n constructor(content, meta, attributes) {\n super(content || [], meta, attributes);\n this.element = 'array';\n }\n primitive() {\n return 'array';\n }\n\n /**\n * @returns {Element}\n */\n get(index) {\n return this.content[index];\n }\n\n /**\n * Helper for returning the value of an item\n * This works for both ArrayElement and ObjectElement instances\n */\n getValue(indexOrKey) {\n const item = this.get(indexOrKey);\n if (item) {\n return item.toValue();\n }\n return undefined;\n }\n\n /**\n * @returns {Element}\n */\n getIndex(index) {\n return this.content[index];\n }\n set(index, value) {\n this.content[index] = this.refract(value);\n return this;\n }\n remove(index) {\n const removed = this.content.splice(index, 1);\n if (removed.length) {\n return removed[0];\n }\n return null;\n }\n\n /**\n * @param callback - Function to execute for each element\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n */\n map(callback, thisArg) {\n return this.content.map(callback, thisArg);\n }\n\n /**\n * Maps and then flattens the results.\n * @param callback - Function to execute for each element.\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns {array}\n */\n flatMap(callback, thisArg) {\n return this.map(callback, thisArg).reduce((a, b) => a.concat(b), []);\n }\n\n /**\n * Returns an array containing the truthy results of calling the given transformation with each element of this sequence\n * @param transform - A closure that accepts an element of this array as its argument and returns an optional value.\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @memberof ArrayElement.prototype\n * @returns An array of the non-undefined results of calling transform with each element of the array\n */\n compactMap(transform, thisArg) {\n const results = [];\n this.forEach(element => {\n const result = transform.bind(thisArg)(element);\n if (result) {\n results.push(result);\n }\n });\n return results;\n }\n\n /**\n * @param callback - Function to execute for each element\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns {ArraySlice}\n */\n filter(callback, thisArg) {\n return new ArraySlice(this.content.filter(callback, thisArg));\n }\n\n /**\n * @param callback - Function to execute for each element\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns {ArraySlice}\n */\n reject(callback, thisArg) {\n return this.filter(negate(callback), thisArg);\n }\n\n /**\n * This is a reduce function specifically for Minim arrays and objects. It\n * allows for returning normal values or Minim instances, so it converts any\n * primitives on each step.\n */\n reduce(callback, initialValue) {\n let startIndex;\n let memo;\n\n // Allows for defining a starting value of the reduce\n if (initialValue !== undefined) {\n startIndex = 0;\n memo = this.refract(initialValue);\n } else {\n startIndex = 1;\n // Object Element content items are member elements. Because of this,\n // the memo should start out as the member value rather than the\n // actual member itself.\n memo = this.primitive() === 'object' ? this.first.value : this.first;\n }\n\n // Sending each function call to the registry allows for passing Minim\n // instances through the function return. This means you can return\n // primitive values or return Minim instances and reduce will still work.\n for (let i = startIndex; i < this.length; i += 1) {\n const item = this.content[i];\n if (this.primitive() === 'object') {\n memo = this.refract(callback(memo, item.value, item.key, item, this));\n } else {\n memo = this.refract(callback(memo, item, i, this));\n }\n }\n return memo;\n }\n\n /**\n * @callback forEachCallback\n * @param {Element} currentValue\n * @param {NumberElement} index\n */\n\n /**\n * @param {forEachCallback} callback - Function to execute for each element\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @memberof ArrayElement.prototype\n */\n forEach(callback, thisArg) {\n this.content.forEach((item, index) => {\n callback.bind(thisArg)(item, this.refract(index));\n });\n }\n\n /**\n * @returns {Element}\n */\n shift() {\n return this.content.shift();\n }\n\n /**\n * @param value\n */\n unshift(value) {\n this.content.unshift(this.refract(value));\n }\n\n /**\n * @param value\n */\n push(value) {\n this.content.push(this.refract(value));\n return this;\n }\n\n /**\n * @param value\n */\n add(value) {\n this.push(value);\n }\n\n /**\n * Recusively search all descendents using a condition function.\n * @returns {Element[]}\n */\n findElements(condition, givenOptions) {\n const options = givenOptions || {};\n const recursive = !!options.recursive;\n const results = options.results === undefined ? [] : options.results;\n\n // The forEach method for Object Elements returns value, key, and member.\n // This passes those along to the condition function below.\n this.forEach((item, keyOrIndex, member) => {\n // We use duck-typing here to support any registered class that\n // may contain other elements.\n if (recursive && item.findElements !== undefined) {\n item.findElements(condition, {\n results,\n recursive\n });\n }\n if (condition(item, keyOrIndex, member)) {\n results.push(item);\n }\n });\n return results;\n }\n\n /**\n * Recusively search all descendents using a condition function.\n * @param condition\n * @returns {ArraySlice}\n */\n find(condition) {\n return new ArraySlice(this.findElements(condition, {\n recursive: true\n }));\n }\n\n /**\n * @param {string} element\n * @returns {ArraySlice}\n */\n findByElement(element) {\n return this.find(item => item.element === element);\n }\n\n /**\n * @param {string} className\n * @returns {ArraySlice}\n * @memberof ArrayElement.prototype\n */\n findByClass(className) {\n return this.find(item => item.classes.includes(className));\n }\n\n /**\n * Search the tree recursively and find the element with the matching ID\n * @param {string} id\n * @returns {Element}\n * @memberof ArrayElement.prototype\n */\n getById(id) {\n return this.find(item => item.id.toValue() === id).first;\n }\n\n /**\n * Looks for matching children using deep equality\n * @param value\n * @returns {boolean}\n */\n includes(value) {\n return this.content.some(element => element.equals(value));\n }\n\n /**\n * Looks for matching children using deep equality\n * @param value\n * @returns {boolean}\n * @see includes\n * @deprecated method was replaced by includes\n */\n contains(value) {\n return this.includes(value);\n }\n\n // Fantasy Land\n\n /**\n * @returns {ArrayElement} An empty array element\n */\n empty() {\n return new this.constructor([]);\n }\n ['fantasy-land/empty']() {\n return this.empty();\n }\n\n /**\n * @param {ArrayElement} other\n * @returns {ArrayElement}\n */\n concat(other) {\n return new this.constructor(this.content.concat(other.content));\n }\n ['fantasy-land/concat'](other) {\n return this.concat(other);\n }\n ['fantasy-land/map'](transform) {\n return new this.constructor(this.map(transform));\n }\n ['fantasy-land/chain'](transform) {\n return this.map(element => transform(element), this).reduce((a, b) => a.concat(b), this.empty());\n }\n ['fantasy-land/filter'](callback) {\n return new this.constructor(this.content.filter(callback));\n }\n ['fantasy-land/reduce'](transform, initialValue) {\n return this.content.reduce(transform, initialValue);\n }\n\n /**\n * Returns the length of the collection\n * @type number\n */\n get length() {\n return this.content.length;\n }\n\n /**\n * Returns whether the collection is empty\n * @type boolean\n */\n get isEmpty() {\n return this.content.length === 0;\n }\n\n /**\n * Return the first item in the collection\n * @type Element\n */\n get first() {\n return this.getIndex(0);\n }\n\n /**\n * Return the second item in the collection\n * @type Element\n */\n get second() {\n return this.getIndex(1);\n }\n\n /**\n * Return the last item in the collection\n * @type Element\n */\n get last() {\n return this.getIndex(this.length - 1);\n }\n }\n /**\n * @returns {ArrayElement} An empty array element\n */\n ArrayElement.empty = function empty() {\n return new this();\n };\n return ArrayElement;\n})();\nArrayElement['fantasy-land/empty'] = ArrayElement.empty;\nif (typeof Symbol !== 'undefined') {\n ArrayElement.prototype[Symbol.iterator] = function symbol() {\n return this.content[Symbol.iterator]();\n };\n}\nmodule.exports = ArrayElement;","const KeyValuePair = require('../KeyValuePair');\nconst Element = require('./Element');\n\n/**\n * @class MemberElement\n *\n * @param {Element} key\n * @param {Element} value\n * @param meta\n * @param attributes\n */\nmodule.exports = class MemberElement extends Element {\n constructor(key, value, meta, attributes) {\n super(new KeyValuePair(), meta, attributes);\n this.element = 'member';\n this.key = key;\n this.value = value;\n }\n\n /**\n * @type Element\n */\n get key() {\n return this.content.key;\n }\n set key(key) {\n this.content.key = this.refract(key);\n }\n\n /**\n * @type Element\n */\n get value() {\n return this.content.value;\n }\n set value(value) {\n this.content.value = this.refract(value);\n }\n};","const negate = require('lodash/negate');\nconst ArraySlice = require('./ArraySlice');\n\n/**\n */\nclass ObjectSlice extends ArraySlice {\n map(callback, thisArg) {\n return this.elements.map(member => callback.bind(thisArg)(member.value, member.key, member));\n }\n filter(callback, thisArg) {\n return new ObjectSlice(this.elements.filter(member => callback.bind(thisArg)(member.value, member.key, member)));\n }\n reject(callback, thisArg) {\n return this.filter(negate(callback.bind(thisArg)));\n }\n forEach(callback, thisArg) {\n return this.elements.forEach((member, index) => {\n callback.bind(thisArg)(member.value, member.key, member, index);\n });\n }\n\n /**\n * @returns {array}\n */\n keys() {\n return this.map((value, key) => key.toValue());\n }\n\n /**\n * @returns {array}\n */\n values() {\n return this.map(value => value.toValue());\n }\n}\nmodule.exports = ObjectSlice;","const negate = require('lodash/negate');\nconst isObject = require('lodash/isObject');\nconst ArrayElement = require('./ArrayElement');\nconst MemberElement = require('./MemberElement');\nconst ObjectSlice = require('../ObjectSlice');\n\n/**\n * @class\n *\n * @param content\n * @param meta\n * @param attributes\n */\nclass ObjectElement extends ArrayElement {\n constructor(content, meta, attributes) {\n super(content || [], meta, attributes);\n this.element = 'object';\n }\n primitive() {\n return 'object';\n }\n toValue() {\n return this.content.reduce((results, el) => {\n results[el.key.toValue()] = el.value ? el.value.toValue() : undefined;\n return results;\n }, {});\n }\n\n /**\n * @param key\n * @returns {Element}\n */\n get(name) {\n const member = this.getMember(name);\n if (member) {\n return member.value;\n }\n return undefined;\n }\n\n /**\n * @param key\n * @returns {MemberElement}\n */\n getMember(name) {\n if (name === undefined) {\n return undefined;\n }\n return this.content.find(element => element.key.toValue() === name);\n }\n\n /**\n * @param key\n */\n remove(name) {\n let removed = null;\n this.content = this.content.filter(item => {\n if (item.key.toValue() === name) {\n removed = item;\n return false;\n }\n return true;\n });\n return removed;\n }\n\n /**\n * @param key\n * @returns {Element}\n */\n getKey(name) {\n const member = this.getMember(name);\n if (member) {\n return member.key;\n }\n return undefined;\n }\n\n /**\n * Set allows either a key/value pair to be given or an object\n * If an object is given, each key is set to its respective value\n */\n set(keyOrObject, value) {\n if (isObject(keyOrObject)) {\n Object.keys(keyOrObject).forEach(objectKey => {\n this.set(objectKey, keyOrObject[objectKey]);\n });\n return this;\n }\n\n // Store as key for clarity\n const key = keyOrObject;\n const member = this.getMember(key);\n if (member) {\n member.value = value;\n } else {\n this.content.push(new MemberElement(key, value));\n }\n return this;\n }\n\n /**\n */\n keys() {\n return this.content.map(item => item.key.toValue());\n }\n\n /**\n */\n values() {\n return this.content.map(item => item.value.toValue());\n }\n\n /**\n * @returns {boolean}\n */\n hasKey(value) {\n return this.content.some(member => member.key.equals(value));\n }\n\n /**\n * @returns {array}\n */\n items() {\n return this.content.map(item => [item.key.toValue(), item.value.toValue()]);\n }\n\n /**\n * @param callback\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n */\n map(callback, thisArg) {\n return this.content.map(item => callback.bind(thisArg)(item.value, item.key, item));\n }\n\n /**\n * Returns an array containing the truthy results of calling the given transformation with each element of this sequence\n * @param transform - A closure that accepts the value, key and member element of this object as its argument and returns an optional value.\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n * @returns An array of the non-undefined results of calling transform with each element of the array\n */\n compactMap(callback, thisArg) {\n const results = [];\n this.forEach((value, key, member) => {\n const result = callback.bind(thisArg)(value, key, member);\n if (result) {\n results.push(result);\n }\n });\n return results;\n }\n\n /**\n * @param callback\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n *\n * @returns {ObjectSlice}\n */\n filter(callback, thisArg) {\n return new ObjectSlice(this.content).filter(callback, thisArg);\n }\n\n /**\n * @param callback\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n *\n * @returns {ObjectSlice}\n *\n * @memberof ObjectElement.prototype\n */\n reject(callback, thisArg) {\n return this.filter(negate(callback), thisArg);\n }\n\n /**\n * @param callback\n * @param thisArg - Value to use as this (i.e the reference Object) when executing callback\n *\n * @memberof ObjectElement.prototype\n */\n forEach(callback, thisArg) {\n return this.content.forEach(item => callback.bind(thisArg)(item.value, item.key, item));\n }\n}\nmodule.exports = ObjectElement;","const Element = require('../primitives/Element');\n\n/** Hyperlinking MAY be used to link to other resources, provide links to\n * instructions on how to process a given element (by way of a profile or\n * other means), and may be used to provide meta data about the element in\n * which it's found. The meaning and purpose of the hyperlink is defined by\n * the link relation according to RFC 5988.\n *\n * @class LinkElement\n *\n * @param content\n * @param meta\n * @param attributes\n */\nmodule.exports = class LinkElement extends Element {\n constructor(content, meta, attributes) {\n super(content || [], meta, attributes);\n this.element = 'link';\n }\n\n /**\n * The relation identifier for the link, as defined in RFC 5988.\n * @type StringElement\n */\n get relation() {\n return this.attributes.get('relation');\n }\n set relation(relation) {\n this.attributes.set('relation', relation);\n }\n\n /**\n * The URI for the given link.\n * @type StringElement\n */\n get href() {\n return this.attributes.get('href');\n }\n set href(href) {\n this.attributes.set('href', href);\n }\n};","const Element = require('../primitives/Element');\n\n/**\n * @class RefElement\n *\n * @param content\n * @param meta\n * @param attributes\n *\n * @extends Element\n */\nmodule.exports = class RefElement extends Element {\n constructor(content, meta, attributes) {\n super(content || [], meta, attributes);\n this.element = 'ref';\n if (!this.path) {\n this.path = 'element';\n }\n }\n\n /**\n * Path of referenced element to transclude instead of element itself.\n * @type StringElement\n * @default element\n */\n get path() {\n return this.attributes.get('path');\n }\n set path(newValue) {\n this.attributes.set('path', newValue);\n }\n};","const Element = require('./primitives/Element');\nconst NullElement = require('./primitives/NullElement');\nconst StringElement = require('./primitives/StringElement');\nconst NumberElement = require('./primitives/NumberElement');\nconst BooleanElement = require('./primitives/BooleanElement');\nconst ArrayElement = require('./primitives/ArrayElement');\nconst MemberElement = require('./primitives/MemberElement');\nconst ObjectElement = require('./primitives/ObjectElement');\nconst LinkElement = require('./elements/LinkElement');\nconst RefElement = require('./elements/RefElement');\nconst ArraySlice = require('./ArraySlice');\nconst ObjectSlice = require('./ObjectSlice');\nconst KeyValuePair = require('./KeyValuePair');\n\n/**\n * Refracts a JSON type to minim elements\n * @param value\n * @returns {Element}\n */\nfunction refract(value) {\n if (value instanceof Element) {\n return value;\n }\n if (typeof value === 'string') {\n return new StringElement(value);\n }\n if (typeof value === 'number') {\n return new NumberElement(value);\n }\n if (typeof value === 'boolean') {\n return new BooleanElement(value);\n }\n if (value === null) {\n return new NullElement();\n }\n if (Array.isArray(value)) {\n return new ArrayElement(value.map(refract));\n }\n if (typeof value === 'object') {\n const element = new ObjectElement(value);\n return element;\n }\n return value;\n}\nElement.prototype.ObjectElement = ObjectElement;\nElement.prototype.RefElement = RefElement;\nElement.prototype.MemberElement = MemberElement;\nElement.prototype.refract = refract;\nArraySlice.prototype.refract = refract;\n\n/**\n * Contains all of the element classes, and related structures and methods\n * for handling with element instances.\n */\nmodule.exports = {\n Element,\n NullElement,\n StringElement,\n NumberElement,\n BooleanElement,\n ArrayElement,\n MemberElement,\n ObjectElement,\n LinkElement,\n RefElement,\n refract,\n ArraySlice,\n ObjectSlice,\n KeyValuePair\n};","const isNull = require('lodash/isNull');\nconst isString = require('lodash/isString');\nconst isNumber = require('lodash/isNumber');\nconst isBoolean = require('lodash/isBoolean');\nconst isObject = require('lodash/isObject');\nconst JSONSerialiser = require('./serialisers/JSONSerialiser');\nconst elements = require('./elements');\n\n/**\n * @class\n *\n * A refract element implementation with an extensible namespace, able to\n * load other namespaces into it.\n *\n * The namespace allows you to register your own classes to be instantiated\n * when a particular refract element is encountered, and allows you to specify\n * which elements get instantiated for existing Javascript objects.\n */\nclass Namespace {\n constructor(options) {\n this.elementMap = {};\n this.elementDetection = [];\n this.Element = elements.Element;\n this.KeyValuePair = elements.KeyValuePair;\n if (!options || !options.noDefault) {\n this.useDefault();\n }\n\n // These provide the defaults for new elements.\n this._attributeElementKeys = [];\n this._attributeElementArrayKeys = [];\n }\n\n /**\n * Use a namespace plugin or load a generic plugin.\n *\n * @param plugin\n */\n use(plugin) {\n if (plugin.namespace) {\n plugin.namespace({\n base: this\n });\n }\n if (plugin.load) {\n plugin.load({\n base: this\n });\n }\n return this;\n }\n\n /*\n * Use the default namespace. This preloads all the default elements\n * into this registry instance.\n */\n useDefault() {\n // Set up classes for default elements\n this.register('null', elements.NullElement).register('string', elements.StringElement).register('number', elements.NumberElement).register('boolean', elements.BooleanElement).register('array', elements.ArrayElement).register('object', elements.ObjectElement).register('member', elements.MemberElement).register('ref', elements.RefElement).register('link', elements.LinkElement);\n\n // Add instance detection functions to convert existing objects into\n // the corresponding refract elements.\n this.detect(isNull, elements.NullElement, false).detect(isString, elements.StringElement, false).detect(isNumber, elements.NumberElement, false).detect(isBoolean, elements.BooleanElement, false).detect(Array.isArray, elements.ArrayElement, false).detect(isObject, elements.ObjectElement, false);\n return this;\n }\n\n /**\n * Register a new element class for an element.\n *\n * @param {string} name\n * @param elementClass\n */\n register(name, ElementClass) {\n this._elements = undefined;\n this.elementMap[name] = ElementClass;\n return this;\n }\n\n /**\n * Unregister a previously registered class for an element.\n *\n * @param {string} name\n */\n unregister(name) {\n this._elements = undefined;\n delete this.elementMap[name];\n return this;\n }\n\n /*\n * Add a new detection function to determine which element\n * class to use when converting existing js instances into\n * refract element.\n */\n detect(test, ElementClass, givenPrepend) {\n const prepend = givenPrepend === undefined ? true : givenPrepend;\n if (prepend) {\n this.elementDetection.unshift([test, ElementClass]);\n } else {\n this.elementDetection.push([test, ElementClass]);\n }\n return this;\n }\n\n /*\n * Convert an existing Javascript object into refract element instances, which\n * can be further processed or serialized into refract.\n * If the item passed in is already refracted, then it is returned\n * unmodified.\n */\n toElement(value) {\n if (value instanceof this.Element) {\n return value;\n }\n let element;\n for (let i = 0; i < this.elementDetection.length; i += 1) {\n const test = this.elementDetection[i][0];\n const ElementClass = this.elementDetection[i][1];\n if (test(value)) {\n element = new ElementClass(value);\n break;\n }\n }\n return element;\n }\n\n /*\n * Get an element class given an element name.\n */\n getElementClass(element) {\n const ElementClass = this.elementMap[element];\n if (ElementClass === undefined) {\n // Fall back to the base element. We may not know what\n // to do with the `content`, but downstream software\n // may know.\n return this.Element;\n }\n return ElementClass;\n }\n\n /*\n * Convert a refract document into refract element instances.\n */\n fromRefract(doc) {\n return this.serialiser.deserialise(doc);\n }\n\n /*\n * Convert an element to a Refracted JSON object.\n */\n toRefract(element) {\n return this.serialiser.serialise(element);\n }\n\n /*\n * Get an object that contains all registered element classes, where\n * the key is the PascalCased element name and the value is the class.\n */\n get elements() {\n if (this._elements === undefined) {\n this._elements = {\n Element: this.Element\n };\n Object.keys(this.elementMap).forEach(name => {\n // Currently, all registered element types use a camelCaseName.\n // Converting to PascalCase is as simple as upper-casing the first\n // letter.\n const pascal = name[0].toUpperCase() + name.substr(1);\n this._elements[pascal] = this.elementMap[name];\n });\n }\n return this._elements;\n }\n\n /**\n * Convinience method for getting a JSON Serialiser configured with the\n * current namespace\n *\n * @type JSONSerialiser\n * @readonly\n *\n * @memberof Namespace.prototype\n */\n get serialiser() {\n return new JSONSerialiser(this);\n }\n}\nJSONSerialiser.prototype.Namespace = Namespace;\nmodule.exports = Namespace;","const JSONSerialiser = require('./JSONSerialiser');\nmodule.exports = class JSON06Serialiser extends JSONSerialiser {\n serialise(element) {\n if (!(element instanceof this.namespace.elements.Element)) {\n throw new TypeError(`Given element \\`${element}\\` is not an Element instance`);\n }\n let variable;\n if (element._attributes && element.attributes.get('variable')) {\n variable = element.attributes.get('variable');\n }\n const payload = {\n element: element.element\n };\n if (element._meta && element._meta.length > 0) {\n payload.meta = this.serialiseObject(element.meta);\n }\n const isEnum = element.element === 'enum' || element.attributes.keys().indexOf('enumerations') !== -1;\n if (isEnum) {\n const attributes = this.enumSerialiseAttributes(element);\n if (attributes) {\n payload.attributes = attributes;\n }\n } else if (element._attributes && element._attributes.length > 0) {\n let {\n attributes\n } = element;\n\n // Meta attribute was renamed to metadata\n if (attributes.get('metadata')) {\n attributes = attributes.clone();\n attributes.set('meta', attributes.get('metadata'));\n attributes.remove('metadata');\n }\n if (element.element === 'member' && variable) {\n attributes = attributes.clone();\n attributes.remove('variable');\n }\n if (attributes.length > 0) {\n payload.attributes = this.serialiseObject(attributes);\n }\n }\n if (isEnum) {\n payload.content = this.enumSerialiseContent(element, payload);\n } else if (this[`${element.element}SerialiseContent`]) {\n payload.content = this[`${element.element}SerialiseContent`](element, payload);\n } else if (element.content !== undefined) {\n let content;\n if (variable && element.content.key) {\n content = element.content.clone();\n content.key.attributes.set('variable', variable);\n content = this.serialiseContent(content);\n } else {\n content = this.serialiseContent(element.content);\n }\n if (this.shouldSerialiseContent(element, content)) {\n payload.content = content;\n }\n } else if (this.shouldSerialiseContent(element, element.content) && element instanceof this.namespace.elements.Array) {\n payload.content = [];\n }\n return payload;\n }\n shouldSerialiseContent(element, content) {\n if (element.element === 'parseResult' || element.element === 'httpRequest' || element.element === 'httpResponse' || element.element === 'category' || element.element === 'link') {\n return true;\n }\n if (content === undefined) {\n return false;\n }\n if (Array.isArray(content) && content.length === 0) {\n return false;\n }\n return true;\n }\n refSerialiseContent(element, payload) {\n delete payload.attributes;\n return {\n href: element.toValue(),\n path: element.path.toValue()\n };\n }\n sourceMapSerialiseContent(element) {\n return element.toValue();\n }\n dataStructureSerialiseContent(element) {\n return [this.serialiseContent(element.content)];\n }\n enumSerialiseAttributes(element) {\n const attributes = element.attributes.clone();\n\n // Enumerations attribute was is placed inside content (see `enumSerialiseContent` below)\n const enumerations = attributes.remove('enumerations') || new this.namespace.elements.Array([]);\n\n // Remove fixed type attribute from samples and default\n const defaultValue = attributes.get('default');\n let samples = attributes.get('samples') || new this.namespace.elements.Array([]);\n if (defaultValue && defaultValue.content) {\n if (defaultValue.content.attributes) {\n defaultValue.content.attributes.remove('typeAttributes');\n }\n // Wrap default in array (not sure it is really needed because tests pass without this line)\n attributes.set('default', new this.namespace.elements.Array([defaultValue.content]));\n }\n\n // Strip typeAttributes from samples, 0.6 doesn't usually contain them in samples\n samples.forEach(sample => {\n if (sample.content && sample.content.element) {\n sample.content.attributes.remove('typeAttributes');\n }\n });\n\n // Content -> Samples\n if (element.content && enumerations.length !== 0) {\n // If we don't have enumerations, content should stay in\n // content (enumerations) as per Drafter 3 behaviour.\n samples.unshift(element.content);\n }\n samples = samples.map(sample => {\n if (sample instanceof this.namespace.elements.Array) {\n return [sample];\n }\n return new this.namespace.elements.Array([sample.content]);\n });\n if (samples.length) {\n attributes.set('samples', samples);\n }\n if (attributes.length > 0) {\n return this.serialiseObject(attributes);\n }\n return undefined;\n }\n enumSerialiseContent(element) {\n // In API Elements < 1.0, the content is the enumerations\n // If we don't have an enumerations, use the value (Drafter 3 behaviour)\n\n if (element._attributes) {\n const enumerations = element.attributes.get('enumerations');\n if (enumerations && enumerations.length > 0) {\n return enumerations.content.map(enumeration => {\n const e = enumeration.clone();\n e.attributes.remove('typeAttributes');\n return this.serialise(e);\n });\n }\n }\n if (element.content) {\n const value = element.content.clone();\n value.attributes.remove('typeAttributes');\n return [this.serialise(value)];\n }\n return [];\n }\n deserialise(value) {\n if (typeof value === 'string') {\n return new this.namespace.elements.String(value);\n }\n if (typeof value === 'number') {\n return new this.namespace.elements.Number(value);\n }\n if (typeof value === 'boolean') {\n return new this.namespace.elements.Boolean(value);\n }\n if (value === null) {\n return new this.namespace.elements.Null();\n }\n if (Array.isArray(value)) {\n return new this.namespace.elements.Array(value.map(this.deserialise, this));\n }\n const ElementClass = this.namespace.getElementClass(value.element);\n const element = new ElementClass();\n if (element.element !== value.element) {\n element.element = value.element;\n }\n if (value.meta) {\n this.deserialiseObject(value.meta, element.meta);\n }\n if (value.attributes) {\n this.deserialiseObject(value.attributes, element.attributes);\n }\n const content = this.deserialiseContent(value.content);\n if (content !== undefined || element.content === null) {\n element.content = content;\n }\n if (element.element === 'enum') {\n // Grab enumerations from content\n if (element.content) {\n element.attributes.set('enumerations', element.content);\n }\n\n // Unwrap the sample value (inside double array)\n let samples = element.attributes.get('samples');\n element.attributes.remove('samples');\n if (samples) {\n // Re-wrap samples from array of array to array of enum's\n\n const existingSamples = samples;\n samples = new this.namespace.elements.Array();\n existingSamples.forEach(existingSample => {\n existingSample.forEach(sample => {\n const enumElement = new ElementClass(sample);\n enumElement.element = element.element;\n samples.push(enumElement);\n });\n });\n const sample = samples.shift();\n if (sample) {\n element.content = sample.content;\n } else {\n element.content = undefined;\n }\n element.attributes.set('samples', samples);\n } else {\n element.content = undefined;\n }\n\n // Unwrap the default value\n let defaultValue = element.attributes.get('default');\n if (defaultValue && defaultValue.length > 0) {\n defaultValue = defaultValue.get(0);\n const defaultElement = new ElementClass(defaultValue);\n defaultElement.element = element.element;\n element.attributes.set('default', defaultElement);\n }\n } else if (element.element === 'dataStructure' && Array.isArray(element.content)) {\n [element.content] = element.content;\n } else if (element.element === 'category') {\n // \"meta\" attribute has been renamed to metadata\n const metadata = element.attributes.get('meta');\n if (metadata) {\n element.attributes.set('metadata', metadata);\n element.attributes.remove('meta');\n }\n } else if (element.element === 'member' && element.key && element.key._attributes && element.key._attributes.getValue('variable')) {\n element.attributes.set('variable', element.key.attributes.get('variable'));\n element.key.attributes.remove('variable');\n }\n return element;\n }\n\n // Private API\n\n serialiseContent(content) {\n if (content instanceof this.namespace.elements.Element) {\n return this.serialise(content);\n }\n if (content instanceof this.namespace.KeyValuePair) {\n const pair = {\n key: this.serialise(content.key)\n };\n if (content.value) {\n pair.value = this.serialise(content.value);\n }\n return pair;\n }\n if (content && content.map) {\n return content.map(this.serialise, this);\n }\n return content;\n }\n deserialiseContent(content) {\n if (content) {\n if (content.element) {\n return this.deserialise(content);\n }\n if (content.key) {\n const pair = new this.namespace.KeyValuePair(this.deserialise(content.key));\n if (content.value) {\n pair.value = this.deserialise(content.value);\n }\n return pair;\n }\n if (content.map) {\n return content.map(this.deserialise, this);\n }\n }\n return content;\n }\n shouldRefract(element) {\n if (element._attributes && element.attributes.keys().length || element._meta && element.meta.keys().length) {\n return true;\n }\n if (element.element === 'enum') {\n // enum elements are treated like primitives (array)\n return false;\n }\n if (element.element !== element.primitive() || element.element === 'member') {\n return true;\n }\n return false;\n }\n convertKeyToRefract(key, item) {\n if (this.shouldRefract(item)) {\n return this.serialise(item);\n }\n if (item.element === 'enum') {\n return this.serialiseEnum(item);\n }\n if (item.element === 'array') {\n return item.map(subItem => {\n if (this.shouldRefract(subItem) || key === 'default') {\n return this.serialise(subItem);\n }\n if (subItem.element === 'array' || subItem.element === 'object' || subItem.element === 'enum') {\n // items for array or enum inside array are always serialised\n return subItem.children.map(subSubItem => this.serialise(subSubItem));\n }\n return subItem.toValue();\n });\n }\n if (item.element === 'object') {\n return (item.content || []).map(this.serialise, this);\n }\n return item.toValue();\n }\n serialiseEnum(element) {\n return element.children.map(item => this.serialise(item));\n }\n serialiseObject(obj) {\n const result = {};\n obj.forEach((value, key) => {\n if (value) {\n const keyValue = key.toValue();\n result[keyValue] = this.convertKeyToRefract(keyValue, value);\n }\n });\n return result;\n }\n deserialiseObject(from, to) {\n Object.keys(from).forEach(key => {\n to.set(key, this.deserialise(from[key]));\n });\n }\n};","const Namespace = require('./Namespace');\nconst elements = require('./elements');\n\n// Direct access to the Namespace class\nexports.Namespace = Namespace;\n\n// Special constructor for the Namespace class\nexports.namespace = function namespace(options) {\n return new Namespace(options);\n};\nexports.KeyValuePair = require('./KeyValuePair');\nexports.ArraySlice = elements.ArraySlice;\nexports.ObjectSlice = elements.ObjectSlice;\nexports.Element = elements.Element;\nexports.StringElement = elements.StringElement;\nexports.NumberElement = elements.NumberElement;\nexports.BooleanElement = elements.BooleanElement;\nexports.NullElement = elements.NullElement;\nexports.ArrayElement = elements.ArrayElement;\nexports.ObjectElement = elements.ObjectElement;\nexports.MemberElement = elements.MemberElement;\nexports.RefElement = elements.RefElement;\nexports.LinkElement = elements.LinkElement;\nexports.refract = elements.refract;\nexports.JSONSerialiser = require('./serialisers/JSONSerialiser');\nexports.JSON06Serialiser = require('./serialisers/JSON06Serialiser');","\"use strict\";\n\nvar ShortUniqueId = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getOwnPropSymbols = Object.getOwnPropertySymbols;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __propIsEnum = Object.prototype.propertyIsEnumerable;\n var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {\n enumerable: true,\n configurable: true,\n writable: true,\n value\n }) : obj[key] = value;\n var __spreadValues = (a, b) => {\n for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);\n }\n return a;\n };\n var __export = (target, all) => {\n for (var name in all) __defProp(target, name, {\n get: all[name],\n enumerable: true\n });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n get: () => from[key],\n enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n });\n }\n return to;\n };\n var __toCommonJS = mod => __copyProps(__defProp({}, \"__esModule\", {\n value: true\n }), mod);\n var __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n };\n\n // src/index.ts\n var src_exports = {};\n __export(src_exports, {\n DEFAULT_OPTIONS: () => DEFAULT_OPTIONS,\n DEFAULT_UUID_LENGTH: () => DEFAULT_UUID_LENGTH,\n default: () => ShortUniqueId\n });\n\n // package.json\n var version = \"5.2.0\";\n\n // src/index.ts\n var DEFAULT_UUID_LENGTH = 6;\n var DEFAULT_OPTIONS = {\n dictionary: \"alphanum\",\n shuffle: true,\n debug: false,\n length: DEFAULT_UUID_LENGTH,\n counter: 0\n };\n var _ShortUniqueId = class _ShortUniqueId {\n constructor(argOptions = {}) {\n __publicField(this, \"counter\");\n __publicField(this, \"debug\");\n __publicField(this, \"dict\");\n __publicField(this, \"version\");\n __publicField(this, \"dictIndex\", 0);\n __publicField(this, \"dictRange\", []);\n __publicField(this, \"lowerBound\", 0);\n __publicField(this, \"upperBound\", 0);\n __publicField(this, \"dictLength\", 0);\n __publicField(this, \"uuidLength\");\n __publicField(this, \"_digit_first_ascii\", 48);\n __publicField(this, \"_digit_last_ascii\", 58);\n __publicField(this, \"_alpha_lower_first_ascii\", 97);\n __publicField(this, \"_alpha_lower_last_ascii\", 123);\n __publicField(this, \"_hex_last_ascii\", 103);\n __publicField(this, \"_alpha_upper_first_ascii\", 65);\n __publicField(this, \"_alpha_upper_last_ascii\", 91);\n __publicField(this, \"_number_dict_ranges\", {\n digits: [this._digit_first_ascii, this._digit_last_ascii]\n });\n __publicField(this, \"_alpha_dict_ranges\", {\n lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],\n upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]\n });\n __publicField(this, \"_alpha_lower_dict_ranges\", {\n lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]\n });\n __publicField(this, \"_alpha_upper_dict_ranges\", {\n upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]\n });\n __publicField(this, \"_alphanum_dict_ranges\", {\n digits: [this._digit_first_ascii, this._digit_last_ascii],\n lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii],\n upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]\n });\n __publicField(this, \"_alphanum_lower_dict_ranges\", {\n digits: [this._digit_first_ascii, this._digit_last_ascii],\n lowerCase: [this._alpha_lower_first_ascii, this._alpha_lower_last_ascii]\n });\n __publicField(this, \"_alphanum_upper_dict_ranges\", {\n digits: [this._digit_first_ascii, this._digit_last_ascii],\n upperCase: [this._alpha_upper_first_ascii, this._alpha_upper_last_ascii]\n });\n __publicField(this, \"_hex_dict_ranges\", {\n decDigits: [this._digit_first_ascii, this._digit_last_ascii],\n alphaDigits: [this._alpha_lower_first_ascii, this._hex_last_ascii]\n });\n __publicField(this, \"_dict_ranges\", {\n _number_dict_ranges: this._number_dict_ranges,\n _alpha_dict_ranges: this._alpha_dict_ranges,\n _alpha_lower_dict_ranges: this._alpha_lower_dict_ranges,\n _alpha_upper_dict_ranges: this._alpha_upper_dict_ranges,\n _alphanum_dict_ranges: this._alphanum_dict_ranges,\n _alphanum_lower_dict_ranges: this._alphanum_lower_dict_ranges,\n _alphanum_upper_dict_ranges: this._alphanum_upper_dict_ranges,\n _hex_dict_ranges: this._hex_dict_ranges\n });\n /* tslint:disable consistent-return */\n __publicField(this, \"log\", (...args) => {\n const finalArgs = [...args];\n finalArgs[0] = `[short-unique-id] ${args[0]}`;\n if (this.debug === true) {\n if (typeof console !== \"undefined\" && console !== null) {\n return console.log(...finalArgs);\n }\n }\n });\n /* tslint:enable consistent-return */\n __publicField(this, \"_normalizeDictionary\", (dictionary, shuffle) => {\n let finalDict;\n if (dictionary && Array.isArray(dictionary) && dictionary.length > 1) {\n finalDict = dictionary;\n } else {\n finalDict = [];\n let i;\n this.dictIndex = i = 0;\n const rangesName = `_${dictionary}_dict_ranges`;\n const ranges = this._dict_ranges[rangesName];\n Object.keys(ranges).forEach(rangeType => {\n const rangeTypeKey = rangeType;\n this.dictRange = ranges[rangeTypeKey];\n this.lowerBound = this.dictRange[0];\n this.upperBound = this.dictRange[1];\n for (this.dictIndex = i = this.lowerBound; this.lowerBound <= this.upperBound ? i < this.upperBound : i > this.upperBound; this.dictIndex = this.lowerBound <= this.upperBound ? i += 1 : i -= 1) {\n finalDict.push(String.fromCharCode(this.dictIndex));\n }\n });\n }\n if (shuffle) {\n const PROBABILITY = 0.5;\n finalDict = finalDict.sort(() => Math.random() - PROBABILITY);\n }\n return finalDict;\n });\n /** Change the dictionary after initialization. */\n __publicField(this, \"setDictionary\", (dictionary, shuffle) => {\n this.dict = this._normalizeDictionary(dictionary, shuffle);\n this.dictLength = this.dict.length;\n this.setCounter(0);\n });\n __publicField(this, \"seq\", () => {\n return this.sequentialUUID();\n });\n /**\n * Generates UUID based on internal counter that's incremented after each ID generation.\n * @alias `const uid = new ShortUniqueId(); uid.seq();`\n */\n __publicField(this, \"sequentialUUID\", () => {\n let counterDiv;\n let counterRem;\n let id = \"\";\n counterDiv = this.counter;\n do {\n counterRem = counterDiv % this.dictLength;\n counterDiv = Math.trunc(counterDiv / this.dictLength);\n id += this.dict[counterRem];\n } while (counterDiv !== 0);\n this.counter += 1;\n return id;\n });\n __publicField(this, \"rnd\", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {\n return this.randomUUID(uuidLength);\n });\n /**\n * Generates UUID by creating each part randomly.\n * @alias `const uid = new ShortUniqueId(); uid.rnd(uuidLength: number);`\n */\n __publicField(this, \"randomUUID\", (uuidLength = this.uuidLength || DEFAULT_UUID_LENGTH) => {\n let id;\n let randomPartIdx;\n let j;\n if (uuidLength === null || typeof uuidLength === \"undefined\" || uuidLength < 1) {\n throw new Error(\"Invalid UUID Length Provided\");\n }\n const isPositive = uuidLength >= 0;\n id = \"\";\n for (j = 0; j < uuidLength; j += 1) {\n randomPartIdx = parseInt((Math.random() * this.dictLength).toFixed(0), 10) % this.dictLength;\n id += this.dict[randomPartIdx];\n }\n return id;\n });\n __publicField(this, \"fmt\", (format, date) => {\n return this.formattedUUID(format, date);\n });\n /**\n * Generates custom UUID with the provided format string.\n * @alias `const uid = new ShortUniqueId(); uid.fmt(format: string);`\n */\n __publicField(this, \"formattedUUID\", (format, date) => {\n const fnMap = {\n \"$r\": this.randomUUID,\n \"$s\": this.sequentialUUID,\n \"$t\": this.stamp\n };\n const result = format.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g, m => {\n const fn = m.slice(0, 2);\n const len = parseInt(m.slice(2), 10);\n if (fn === \"$s\") {\n return fnMap[fn]().padStart(len, \"0\");\n }\n if (fn === \"$t\" && date) {\n return fnMap[fn](len, date);\n }\n return fnMap[fn](len);\n });\n return result;\n });\n /**\n * Calculates total number of possible UUIDs.\n *\n * Given that:\n *\n * - `H` is the total number of possible UUIDs\n * - `n` is the number of unique characters in the dictionary\n * - `l` is the UUID length\n *\n * Then `H` is defined as `n` to the power of `l`:\n *\n *
\n * \n *
\n *\n * This function returns `H`.\n */\n __publicField(this, \"availableUUIDs\", (uuidLength = this.uuidLength) => {\n return parseFloat(Math.pow([...new Set(this.dict)].length, uuidLength).toFixed(0));\n });\n /**\n * Calculates approximate number of hashes before first collision.\n *\n * Given that:\n *\n * - `H` is the total number of possible UUIDs, or in terms of this library,\n * the result of running `availableUUIDs()`\n * - the expected number of values we have to choose before finding the\n * first collision can be expressed as the quantity `Q(H)`\n *\n * Then `Q(H)` can be approximated as the square root of the product of half\n * of pi times `H`:\n *\n *
\n * \n *
\n *\n * This function returns `Q(H)`.\n * \n * (see [Poisson distribution](https://en.wikipedia.org/wiki/Poisson_distribution))\n */\n __publicField(this, \"approxMaxBeforeCollision\", (rounds = this.availableUUIDs(this.uuidLength)) => {\n return parseFloat(Math.sqrt(Math.PI / 2 * rounds).toFixed(20));\n });\n /**\n * Calculates probability of generating duplicate UUIDs (a collision) in a\n * given number of UUID generation rounds.\n *\n * Given that:\n *\n * - `r` is the maximum number of times that `randomUUID()` will be called,\n * or better said the number of _rounds_\n * - `H` is the total number of possible UUIDs, or in terms of this library,\n * the result of running `availableUUIDs()`\n *\n * Then the probability of collision `p(r; H)` can be approximated as the result\n * of dividing the square root of the product of half of pi times `r` by `H`:\n *\n *
\n * \n *
\n *\n * This function returns `p(r; H)`.\n * \n * (see [Poisson distribution](https://en.wikipedia.org/wiki/Poisson_distribution))\n *\n * (Useful if you are wondering _\"If I use this lib and expect to perform at most\n * `r` rounds of UUID generations, what is the probability that I will hit a duplicate UUID?\"_.)\n */\n __publicField(this, \"collisionProbability\", (rounds = this.availableUUIDs(this.uuidLength), uuidLength = this.uuidLength) => {\n return parseFloat((this.approxMaxBeforeCollision(rounds) / this.availableUUIDs(uuidLength)).toFixed(20));\n });\n /**\n * Calculate a \"uniqueness\" score (from 0 to 1) of UUIDs based on size of\n * dictionary and chosen UUID length.\n *\n * Given that:\n *\n * - `H` is the total number of possible UUIDs, or in terms of this library,\n * the result of running `availableUUIDs()`\n * - `Q(H)` is the approximate number of hashes before first collision,\n * or in terms of this library, the result of running `approxMaxBeforeCollision()`\n *\n * Then `uniqueness` can be expressed as the additive inverse of the probability of\n * generating a \"word\" I had previously generated (a duplicate) at any given iteration\n * up to the the total number of possible UUIDs expressed as the quotiend of `Q(H)` and `H`:\n *\n *
\n * \n *
\n *\n * (Useful if you need a value to rate the \"quality\" of the combination of given dictionary\n * and UUID length. The closer to 1, higher the uniqueness and thus better the quality.)\n */\n __publicField(this, \"uniqueness\", (rounds = this.availableUUIDs(this.uuidLength)) => {\n const score = parseFloat((1 - this.approxMaxBeforeCollision(rounds) / rounds).toFixed(20));\n return score > 1 ? 1 : score < 0 ? 0 : score;\n });\n /**\n * Return the version of this module.\n */\n __publicField(this, \"getVersion\", () => {\n return this.version;\n });\n /**\n * Generates a UUID with a timestamp that can be extracted using `uid.parseStamp(stampString);`.\n * \n * ```js\n * const uidWithTimestamp = uid.stamp(32);\n * console.log(uidWithTimestamp);\n * // GDa608f973aRCHLXQYPTbKDbjDeVsSb3\n * \n * console.log(uid.parseStamp(uidWithTimestamp));\n * // 2021-05-03T06:24:58.000Z\n * ```\n */\n __publicField(this, \"stamp\", (finalLength, date) => {\n const hexStamp = Math.floor(+(date || /* @__PURE__ */new Date()) / 1e3).toString(16);\n if (typeof finalLength === \"number\" && finalLength === 0) {\n return hexStamp;\n }\n if (typeof finalLength !== \"number\" || finalLength < 10) {\n throw new Error([\"Param finalLength must be a number greater than or equal to 10,\", \"or 0 if you want the raw hexadecimal timestamp\"].join(\"\\n\"));\n }\n const idLength = finalLength - 9;\n const rndIdx = Math.round(Math.random() * (idLength > 15 ? 15 : idLength));\n const id = this.randomUUID(idLength);\n return `${id.substring(0, rndIdx)}${hexStamp}${id.substring(rndIdx)}${rndIdx.toString(16)}`;\n });\n /**\n * Extracts the date embeded in a UUID generated using the `uid.stamp(finalLength);` method.\n * \n * ```js\n * const uidWithTimestamp = uid.stamp(32);\n * console.log(uidWithTimestamp);\n * // GDa608f973aRCHLXQYPTbKDbjDeVsSb3\n * \n * console.log(uid.parseStamp(uidWithTimestamp));\n * // 2021-05-03T06:24:58.000Z\n * ```\n */\n __publicField(this, \"parseStamp\", (suid, format) => {\n if (format && !/t0|t[1-9]\\d{1,}/.test(format)) {\n throw new Error(\"Cannot extract date from a formated UUID with no timestamp in the format\");\n }\n const stamp = format ? format.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g, m => {\n const fnMap = {\n \"$r\": len2 => [...Array(len2)].map(() => \"r\").join(\"\"),\n \"$s\": len2 => [...Array(len2)].map(() => \"s\").join(\"\"),\n \"$t\": len2 => [...Array(len2)].map(() => \"t\").join(\"\")\n };\n const fn = m.slice(0, 2);\n const len = parseInt(m.slice(2), 10);\n return fnMap[fn](len);\n }).replace(/^(.*?)(t{8,})(.*)$/g, (_m, p1, p2) => {\n return suid.substring(p1.length, p1.length + p2.length);\n }) : suid;\n if (stamp.length === 8) {\n return new Date(parseInt(stamp, 16) * 1e3);\n }\n if (stamp.length < 10) {\n throw new Error(\"Stamp length invalid\");\n }\n const rndIdx = parseInt(stamp.substring(stamp.length - 1), 16);\n return new Date(parseInt(stamp.substring(rndIdx, rndIdx + 8), 16) * 1e3);\n });\n /**\n * Set the counter to a specific value.\n */\n __publicField(this, \"setCounter\", counter => {\n this.counter = counter;\n });\n /**\n * Validate given UID contains only characters from the instanced dictionary or optionally provided dictionary.\n */\n __publicField(this, \"validate\", (uid, dictionary) => {\n const finalDictionary = dictionary ? this._normalizeDictionary(dictionary) : this.dict;\n return uid.split(\"\").every(c => finalDictionary.includes(c));\n });\n const options = __spreadValues(__spreadValues({}, DEFAULT_OPTIONS), argOptions);\n this.counter = 0;\n this.debug = false;\n this.dict = [];\n this.version = version;\n const {\n dictionary,\n shuffle,\n length,\n counter\n } = options;\n this.uuidLength = length;\n this.setDictionary(dictionary, shuffle);\n this.setCounter(counter);\n this.debug = options.debug;\n this.log(this.dict);\n this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`);\n this.log = this.log.bind(this);\n this.setDictionary = this.setDictionary.bind(this);\n this.setCounter = this.setCounter.bind(this);\n this.seq = this.seq.bind(this);\n this.sequentialUUID = this.sequentialUUID.bind(this);\n this.rnd = this.rnd.bind(this);\n this.randomUUID = this.randomUUID.bind(this);\n this.fmt = this.fmt.bind(this);\n this.formattedUUID = this.formattedUUID.bind(this);\n this.availableUUIDs = this.availableUUIDs.bind(this);\n this.approxMaxBeforeCollision = this.approxMaxBeforeCollision.bind(this);\n this.collisionProbability = this.collisionProbability.bind(this);\n this.uniqueness = this.uniqueness.bind(this);\n this.getVersion = this.getVersion.bind(this);\n this.stamp = this.stamp.bind(this);\n this.parseStamp = this.parseStamp.bind(this);\n return this;\n }\n };\n /** @hidden */\n __publicField(_ShortUniqueId, \"default\", _ShortUniqueId);\n var ShortUniqueId = _ShortUniqueId;\n return __toCommonJS(src_exports);\n})();\n\n'undefined' != typeof module && (module.exports = ShortUniqueId.default), 'undefined' != typeof window && (ShortUniqueId = ShortUniqueId.default);","/**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nfunction f(a, b) {\n var c = a.length;\n a.push(b);\n a: for (; 0 < c;) {\n var d = c - 1 >>> 1,\n e = a[d];\n if (0 < g(e, b)) a[d] = b, a[c] = e, c = d;else break a;\n }\n}\nfunction h(a) {\n return 0 === a.length ? null : a[0];\n}\nfunction k(a) {\n if (0 === a.length) return null;\n var b = a[0],\n c = a.pop();\n if (c !== b) {\n a[0] = c;\n a: for (var d = 0, e = a.length, w = e >>> 1; d < w;) {\n var m = 2 * (d + 1) - 1,\n C = a[m],\n n = m + 1,\n x = a[n];\n if (0 > g(C, c)) n < e && 0 > g(x, C) ? (a[d] = x, a[n] = c, d = n) : (a[d] = C, a[m] = c, d = m);else if (n < e && 0 > g(x, c)) a[d] = x, a[n] = c, d = n;else break a;\n }\n }\n return b;\n}\nfunction g(a, b) {\n var c = a.sortIndex - b.sortIndex;\n return 0 !== c ? c : a.id - b.id;\n}\nif (\"object\" === typeof performance && \"function\" === typeof performance.now) {\n var l = performance;\n exports.unstable_now = function () {\n return l.now();\n };\n} else {\n var p = Date,\n q = p.now();\n exports.unstable_now = function () {\n return p.now() - q;\n };\n}\nvar r = [],\n t = [],\n u = 1,\n v = null,\n y = 3,\n z = !1,\n A = !1,\n B = !1,\n D = \"function\" === typeof setTimeout ? setTimeout : null,\n E = \"function\" === typeof clearTimeout ? clearTimeout : null,\n F = \"undefined\" !== typeof setImmediate ? setImmediate : null;\n\"undefined\" !== typeof navigator && void 0 !== navigator.scheduling && void 0 !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling);\nfunction G(a) {\n for (var b = h(t); null !== b;) {\n if (null === b.callback) k(t);else if (b.startTime <= a) k(t), b.sortIndex = b.expirationTime, f(r, b);else break;\n b = h(t);\n }\n}\nfunction H(a) {\n B = !1;\n G(a);\n if (!A) if (null !== h(r)) A = !0, I(J);else {\n var b = h(t);\n null !== b && K(H, b.startTime - a);\n }\n}\nfunction J(a, b) {\n A = !1;\n B && (B = !1, E(L), L = -1);\n z = !0;\n var c = y;\n try {\n G(b);\n for (v = h(r); null !== v && (!(v.expirationTime > b) || a && !M());) {\n var d = v.callback;\n if (\"function\" === typeof d) {\n v.callback = null;\n y = v.priorityLevel;\n var e = d(v.expirationTime <= b);\n b = exports.unstable_now();\n \"function\" === typeof e ? v.callback = e : v === h(r) && k(r);\n G(b);\n } else k(r);\n v = h(r);\n }\n if (null !== v) var w = !0;else {\n var m = h(t);\n null !== m && K(H, m.startTime - b);\n w = !1;\n }\n return w;\n } finally {\n v = null, y = c, z = !1;\n }\n}\nvar N = !1,\n O = null,\n L = -1,\n P = 5,\n Q = -1;\nfunction M() {\n return exports.unstable_now() - Q < P ? !1 : !0;\n}\nfunction R() {\n if (null !== O) {\n var a = exports.unstable_now();\n Q = a;\n var b = !0;\n try {\n b = O(!0, a);\n } finally {\n b ? S() : (N = !1, O = null);\n }\n } else N = !1;\n}\nvar S;\nif (\"function\" === typeof F) S = function () {\n F(R);\n};else if (\"undefined\" !== typeof MessageChannel) {\n var T = new MessageChannel(),\n U = T.port2;\n T.port1.onmessage = R;\n S = function () {\n U.postMessage(null);\n };\n} else S = function () {\n D(R, 0);\n};\nfunction I(a) {\n O = a;\n N || (N = !0, S());\n}\nfunction K(a, b) {\n L = D(function () {\n a(exports.unstable_now());\n }, b);\n}\nexports.unstable_IdlePriority = 5;\nexports.unstable_ImmediatePriority = 1;\nexports.unstable_LowPriority = 4;\nexports.unstable_NormalPriority = 3;\nexports.unstable_Profiling = null;\nexports.unstable_UserBlockingPriority = 2;\nexports.unstable_cancelCallback = function (a) {\n a.callback = null;\n};\nexports.unstable_continueExecution = function () {\n A || z || (A = !0, I(J));\n};\nexports.unstable_forceFrameRate = function (a) {\n 0 > a || 125 < a ? console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\") : P = 0 < a ? Math.floor(1E3 / a) : 5;\n};\nexports.unstable_getCurrentPriorityLevel = function () {\n return y;\n};\nexports.unstable_getFirstCallbackNode = function () {\n return h(r);\n};\nexports.unstable_next = function (a) {\n switch (y) {\n case 1:\n case 2:\n case 3:\n var b = 3;\n break;\n default:\n b = y;\n }\n var c = y;\n y = b;\n try {\n return a();\n } finally {\n y = c;\n }\n};\nexports.unstable_pauseExecution = function () {};\nexports.unstable_requestPaint = function () {};\nexports.unstable_runWithPriority = function (a, b) {\n switch (a) {\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n break;\n default:\n a = 3;\n }\n var c = y;\n y = a;\n try {\n return b();\n } finally {\n y = c;\n }\n};\nexports.unstable_scheduleCallback = function (a, b, c) {\n var d = exports.unstable_now();\n \"object\" === typeof c && null !== c ? (c = c.delay, c = \"number\" === typeof c && 0 < c ? d + c : d) : c = d;\n switch (a) {\n case 1:\n var e = -1;\n break;\n case 2:\n e = 250;\n break;\n case 5:\n e = 1073741823;\n break;\n case 4:\n e = 1E4;\n break;\n default:\n e = 5E3;\n }\n e = c + e;\n a = {\n id: u++,\n callback: b,\n priorityLevel: a,\n startTime: c,\n expirationTime: e,\n sortIndex: -1\n };\n c > d ? (a.sortIndex = c, f(t, a), null === h(r) && a === h(t) && (B ? (E(L), L = -1) : B = !0, K(H, c - d))) : (a.sortIndex = e, f(r, a), A || z || (A = !0, I(J)));\n return a;\n};\nexports.unstable_shouldYield = M;\nexports.unstable_wrapCallback = function (a) {\n var b = y;\n return function () {\n var c = y;\n y = b;\n try {\n return a.apply(this, arguments);\n } finally {\n y = c;\n }\n };\n};","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';\n\nvar aa = require(\"react\"),\n ca = require(\"scheduler\");\nfunction p(a) {\n for (var b = \"https://reactjs.org/docs/error-decoder.html?invariant=\" + a, c = 1; c < arguments.length; c++) b += \"&args[]=\" + encodeURIComponent(arguments[c]);\n return \"Minified React error #\" + a + \"; visit \" + b + \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\";\n}\nvar da = new Set(),\n ea = {};\nfunction fa(a, b) {\n ha(a, b);\n ha(a + \"Capture\", b);\n}\nfunction ha(a, b) {\n ea[a] = b;\n for (a = 0; a < b.length; a++) da.add(b[a]);\n}\nvar ia = !(\"undefined\" === typeof window || \"undefined\" === typeof window.document || \"undefined\" === typeof window.document.createElement),\n ja = Object.prototype.hasOwnProperty,\n ka = /^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,\n la = {},\n ma = {};\nfunction oa(a) {\n if (ja.call(ma, a)) return !0;\n if (ja.call(la, a)) return !1;\n if (ka.test(a)) return ma[a] = !0;\n la[a] = !0;\n return !1;\n}\nfunction pa(a, b, c, d) {\n if (null !== c && 0 === c.type) return !1;\n switch (typeof b) {\n case \"function\":\n case \"symbol\":\n return !0;\n case \"boolean\":\n if (d) return !1;\n if (null !== c) return !c.acceptsBooleans;\n a = a.toLowerCase().slice(0, 5);\n return \"data-\" !== a && \"aria-\" !== a;\n default:\n return !1;\n }\n}\nfunction qa(a, b, c, d) {\n if (null === b || \"undefined\" === typeof b || pa(a, b, c, d)) return !0;\n if (d) return !1;\n if (null !== c) switch (c.type) {\n case 3:\n return !b;\n case 4:\n return !1 === b;\n case 5:\n return isNaN(b);\n case 6:\n return isNaN(b) || 1 > b;\n }\n return !1;\n}\nfunction v(a, b, c, d, e, f, g) {\n this.acceptsBooleans = 2 === b || 3 === b || 4 === b;\n this.attributeName = d;\n this.attributeNamespace = e;\n this.mustUseProperty = c;\n this.propertyName = a;\n this.type = b;\n this.sanitizeURL = f;\n this.removeEmptyString = g;\n}\nvar z = {};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function (a) {\n z[a] = new v(a, 0, !1, a, null, !1, !1);\n});\n[[\"acceptCharset\", \"accept-charset\"], [\"className\", \"class\"], [\"htmlFor\", \"for\"], [\"httpEquiv\", \"http-equiv\"]].forEach(function (a) {\n var b = a[0];\n z[b] = new v(b, 1, !1, a[1], null, !1, !1);\n});\n[\"contentEditable\", \"draggable\", \"spellCheck\", \"value\"].forEach(function (a) {\n z[a] = new v(a, 2, !1, a.toLowerCase(), null, !1, !1);\n});\n[\"autoReverse\", \"externalResourcesRequired\", \"focusable\", \"preserveAlpha\"].forEach(function (a) {\n z[a] = new v(a, 2, !1, a, null, !1, !1);\n});\n\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function (a) {\n z[a] = new v(a, 3, !1, a.toLowerCase(), null, !1, !1);\n});\n[\"checked\", \"multiple\", \"muted\", \"selected\"].forEach(function (a) {\n z[a] = new v(a, 3, !0, a, null, !1, !1);\n});\n[\"capture\", \"download\"].forEach(function (a) {\n z[a] = new v(a, 4, !1, a, null, !1, !1);\n});\n[\"cols\", \"rows\", \"size\", \"span\"].forEach(function (a) {\n z[a] = new v(a, 6, !1, a, null, !1, !1);\n});\n[\"rowSpan\", \"start\"].forEach(function (a) {\n z[a] = new v(a, 5, !1, a.toLowerCase(), null, !1, !1);\n});\nvar ra = /[\\-:]([a-z])/g;\nfunction sa(a) {\n return a[1].toUpperCase();\n}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function (a) {\n var b = a.replace(ra, sa);\n z[b] = new v(b, 1, !1, a, null, !1, !1);\n});\n\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function (a) {\n var b = a.replace(ra, sa);\n z[b] = new v(b, 1, !1, a, \"http://www.w3.org/1999/xlink\", !1, !1);\n});\n[\"xml:base\", \"xml:lang\", \"xml:space\"].forEach(function (a) {\n var b = a.replace(ra, sa);\n z[b] = new v(b, 1, !1, a, \"http://www.w3.org/XML/1998/namespace\", !1, !1);\n});\n[\"tabIndex\", \"crossOrigin\"].forEach(function (a) {\n z[a] = new v(a, 1, !1, a.toLowerCase(), null, !1, !1);\n});\nz.xlinkHref = new v(\"xlinkHref\", 1, !1, \"xlink:href\", \"http://www.w3.org/1999/xlink\", !0, !1);\n[\"src\", \"href\", \"action\", \"formAction\"].forEach(function (a) {\n z[a] = new v(a, 1, !1, a.toLowerCase(), null, !0, !0);\n});\nfunction ta(a, b, c, d) {\n var e = z.hasOwnProperty(b) ? z[b] : null;\n if (null !== e ? 0 !== e.type : d || !(2 < b.length) || \"o\" !== b[0] && \"O\" !== b[0] || \"n\" !== b[1] && \"N\" !== b[1]) qa(b, c, e, d) && (c = null), d || null === e ? oa(b) && (null === c ? a.removeAttribute(b) : a.setAttribute(b, \"\" + c)) : e.mustUseProperty ? a[e.propertyName] = null === c ? 3 === e.type ? !1 : \"\" : c : (b = e.attributeName, d = e.attributeNamespace, null === c ? a.removeAttribute(b) : (e = e.type, c = 3 === e || 4 === e && !0 === c ? \"\" : \"\" + c, d ? a.setAttributeNS(d, b, c) : a.setAttribute(b, c)));\n}\nvar ua = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,\n va = Symbol.for(\"react.element\"),\n wa = Symbol.for(\"react.portal\"),\n ya = Symbol.for(\"react.fragment\"),\n za = Symbol.for(\"react.strict_mode\"),\n Aa = Symbol.for(\"react.profiler\"),\n Ba = Symbol.for(\"react.provider\"),\n Ca = Symbol.for(\"react.context\"),\n Da = Symbol.for(\"react.forward_ref\"),\n Ea = Symbol.for(\"react.suspense\"),\n Fa = Symbol.for(\"react.suspense_list\"),\n Ga = Symbol.for(\"react.memo\"),\n Ha = Symbol.for(\"react.lazy\");\nSymbol.for(\"react.scope\");\nSymbol.for(\"react.debug_trace_mode\");\nvar Ia = Symbol.for(\"react.offscreen\");\nSymbol.for(\"react.legacy_hidden\");\nSymbol.for(\"react.cache\");\nSymbol.for(\"react.tracing_marker\");\nvar Ja = Symbol.iterator;\nfunction Ka(a) {\n if (null === a || \"object\" !== typeof a) return null;\n a = Ja && a[Ja] || a[\"@@iterator\"];\n return \"function\" === typeof a ? a : null;\n}\nvar A = Object.assign,\n La;\nfunction Ma(a) {\n if (void 0 === La) try {\n throw Error();\n } catch (c) {\n var b = c.stack.trim().match(/\\n( *(at )?)/);\n La = b && b[1] || \"\";\n }\n return \"\\n\" + La + a;\n}\nvar Na = !1;\nfunction Oa(a, b) {\n if (!a || Na) return \"\";\n Na = !0;\n var c = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n try {\n if (b) {\n if (b = function () {\n throw Error();\n }, Object.defineProperty(b.prototype, \"props\", {\n set: function () {\n throw Error();\n }\n }), \"object\" === typeof Reflect && Reflect.construct) {\n try {\n Reflect.construct(b, []);\n } catch (l) {\n var d = l;\n }\n Reflect.construct(a, [], b);\n } else {\n try {\n b.call();\n } catch (l) {\n d = l;\n }\n a.call(b.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (l) {\n d = l;\n }\n a();\n }\n } catch (l) {\n if (l && d && \"string\" === typeof l.stack) {\n for (var e = l.stack.split(\"\\n\"), f = d.stack.split(\"\\n\"), g = e.length - 1, h = f.length - 1; 1 <= g && 0 <= h && e[g] !== f[h];) h--;\n for (; 1 <= g && 0 <= h; g--, h--) if (e[g] !== f[h]) {\n if (1 !== g || 1 !== h) {\n do if (g--, h--, 0 > h || e[g] !== f[h]) {\n var k = \"\\n\" + e[g].replace(\" at new \", \" at \");\n a.displayName && k.includes(\"\") && (k = k.replace(\"\", a.displayName));\n return k;\n } while (1 <= g && 0 <= h);\n }\n break;\n }\n }\n } finally {\n Na = !1, Error.prepareStackTrace = c;\n }\n return (a = a ? a.displayName || a.name : \"\") ? Ma(a) : \"\";\n}\nfunction Pa(a) {\n switch (a.tag) {\n case 5:\n return Ma(a.type);\n case 16:\n return Ma(\"Lazy\");\n case 13:\n return Ma(\"Suspense\");\n case 19:\n return Ma(\"SuspenseList\");\n case 0:\n case 2:\n case 15:\n return a = Oa(a.type, !1), a;\n case 11:\n return a = Oa(a.type.render, !1), a;\n case 1:\n return a = Oa(a.type, !0), a;\n default:\n return \"\";\n }\n}\nfunction Qa(a) {\n if (null == a) return null;\n if (\"function\" === typeof a) return a.displayName || a.name || null;\n if (\"string\" === typeof a) return a;\n switch (a) {\n case ya:\n return \"Fragment\";\n case wa:\n return \"Portal\";\n case Aa:\n return \"Profiler\";\n case za:\n return \"StrictMode\";\n case Ea:\n return \"Suspense\";\n case Fa:\n return \"SuspenseList\";\n }\n if (\"object\" === typeof a) switch (a.$$typeof) {\n case Ca:\n return (a.displayName || \"Context\") + \".Consumer\";\n case Ba:\n return (a._context.displayName || \"Context\") + \".Provider\";\n case Da:\n var b = a.render;\n a = a.displayName;\n a || (a = b.displayName || b.name || \"\", a = \"\" !== a ? \"ForwardRef(\" + a + \")\" : \"ForwardRef\");\n return a;\n case Ga:\n return b = a.displayName || null, null !== b ? b : Qa(a.type) || \"Memo\";\n case Ha:\n b = a._payload;\n a = a._init;\n try {\n return Qa(a(b));\n } catch (c) {}\n }\n return null;\n}\nfunction Ra(a) {\n var b = a.type;\n switch (a.tag) {\n case 24:\n return \"Cache\";\n case 9:\n return (b.displayName || \"Context\") + \".Consumer\";\n case 10:\n return (b._context.displayName || \"Context\") + \".Provider\";\n case 18:\n return \"DehydratedFragment\";\n case 11:\n return a = b.render, a = a.displayName || a.name || \"\", b.displayName || (\"\" !== a ? \"ForwardRef(\" + a + \")\" : \"ForwardRef\");\n case 7:\n return \"Fragment\";\n case 5:\n return b;\n case 4:\n return \"Portal\";\n case 3:\n return \"Root\";\n case 6:\n return \"Text\";\n case 16:\n return Qa(b);\n case 8:\n return b === za ? \"StrictMode\" : \"Mode\";\n case 22:\n return \"Offscreen\";\n case 12:\n return \"Profiler\";\n case 21:\n return \"Scope\";\n case 13:\n return \"Suspense\";\n case 19:\n return \"SuspenseList\";\n case 25:\n return \"TracingMarker\";\n case 1:\n case 0:\n case 17:\n case 2:\n case 14:\n case 15:\n if (\"function\" === typeof b) return b.displayName || b.name || null;\n if (\"string\" === typeof b) return b;\n }\n return null;\n}\nfunction Sa(a) {\n switch (typeof a) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n case \"undefined\":\n return a;\n case \"object\":\n return a;\n default:\n return \"\";\n }\n}\nfunction Ta(a) {\n var b = a.type;\n return (a = a.nodeName) && \"input\" === a.toLowerCase() && (\"checkbox\" === b || \"radio\" === b);\n}\nfunction Ua(a) {\n var b = Ta(a) ? \"checked\" : \"value\",\n c = Object.getOwnPropertyDescriptor(a.constructor.prototype, b),\n d = \"\" + a[b];\n if (!a.hasOwnProperty(b) && \"undefined\" !== typeof c && \"function\" === typeof c.get && \"function\" === typeof c.set) {\n var e = c.get,\n f = c.set;\n Object.defineProperty(a, b, {\n configurable: !0,\n get: function () {\n return e.call(this);\n },\n set: function (a) {\n d = \"\" + a;\n f.call(this, a);\n }\n });\n Object.defineProperty(a, b, {\n enumerable: c.enumerable\n });\n return {\n getValue: function () {\n return d;\n },\n setValue: function (a) {\n d = \"\" + a;\n },\n stopTracking: function () {\n a._valueTracker = null;\n delete a[b];\n }\n };\n }\n}\nfunction Va(a) {\n a._valueTracker || (a._valueTracker = Ua(a));\n}\nfunction Wa(a) {\n if (!a) return !1;\n var b = a._valueTracker;\n if (!b) return !0;\n var c = b.getValue();\n var d = \"\";\n a && (d = Ta(a) ? a.checked ? \"true\" : \"false\" : a.value);\n a = d;\n return a !== c ? (b.setValue(a), !0) : !1;\n}\nfunction Xa(a) {\n a = a || (\"undefined\" !== typeof document ? document : void 0);\n if (\"undefined\" === typeof a) return null;\n try {\n return a.activeElement || a.body;\n } catch (b) {\n return a.body;\n }\n}\nfunction Ya(a, b) {\n var c = b.checked;\n return A({}, b, {\n defaultChecked: void 0,\n defaultValue: void 0,\n value: void 0,\n checked: null != c ? c : a._wrapperState.initialChecked\n });\n}\nfunction Za(a, b) {\n var c = null == b.defaultValue ? \"\" : b.defaultValue,\n d = null != b.checked ? b.checked : b.defaultChecked;\n c = Sa(null != b.value ? b.value : c);\n a._wrapperState = {\n initialChecked: d,\n initialValue: c,\n controlled: \"checkbox\" === b.type || \"radio\" === b.type ? null != b.checked : null != b.value\n };\n}\nfunction ab(a, b) {\n b = b.checked;\n null != b && ta(a, \"checked\", b, !1);\n}\nfunction bb(a, b) {\n ab(a, b);\n var c = Sa(b.value),\n d = b.type;\n if (null != c) {\n if (\"number\" === d) {\n if (0 === c && \"\" === a.value || a.value != c) a.value = \"\" + c;\n } else a.value !== \"\" + c && (a.value = \"\" + c);\n } else if (\"submit\" === d || \"reset\" === d) {\n a.removeAttribute(\"value\");\n return;\n }\n b.hasOwnProperty(\"value\") ? cb(a, b.type, c) : b.hasOwnProperty(\"defaultValue\") && cb(a, b.type, Sa(b.defaultValue));\n null == b.checked && null != b.defaultChecked && (a.defaultChecked = !!b.defaultChecked);\n}\nfunction db(a, b, c) {\n if (b.hasOwnProperty(\"value\") || b.hasOwnProperty(\"defaultValue\")) {\n var d = b.type;\n if (!(\"submit\" !== d && \"reset\" !== d || void 0 !== b.value && null !== b.value)) return;\n b = \"\" + a._wrapperState.initialValue;\n c || b === a.value || (a.value = b);\n a.defaultValue = b;\n }\n c = a.name;\n \"\" !== c && (a.name = \"\");\n a.defaultChecked = !!a._wrapperState.initialChecked;\n \"\" !== c && (a.name = c);\n}\nfunction cb(a, b, c) {\n if (\"number\" !== b || Xa(a.ownerDocument) !== a) null == c ? a.defaultValue = \"\" + a._wrapperState.initialValue : a.defaultValue !== \"\" + c && (a.defaultValue = \"\" + c);\n}\nvar eb = Array.isArray;\nfunction fb(a, b, c, d) {\n a = a.options;\n if (b) {\n b = {};\n for (var e = 0; e < c.length; e++) b[\"$\" + c[e]] = !0;\n for (c = 0; c < a.length; c++) e = b.hasOwnProperty(\"$\" + a[c].value), a[c].selected !== e && (a[c].selected = e), e && d && (a[c].defaultSelected = !0);\n } else {\n c = \"\" + Sa(c);\n b = null;\n for (e = 0; e < a.length; e++) {\n if (a[e].value === c) {\n a[e].selected = !0;\n d && (a[e].defaultSelected = !0);\n return;\n }\n null !== b || a[e].disabled || (b = a[e]);\n }\n null !== b && (b.selected = !0);\n }\n}\nfunction gb(a, b) {\n if (null != b.dangerouslySetInnerHTML) throw Error(p(91));\n return A({}, b, {\n value: void 0,\n defaultValue: void 0,\n children: \"\" + a._wrapperState.initialValue\n });\n}\nfunction hb(a, b) {\n var c = b.value;\n if (null == c) {\n c = b.children;\n b = b.defaultValue;\n if (null != c) {\n if (null != b) throw Error(p(92));\n if (eb(c)) {\n if (1 < c.length) throw Error(p(93));\n c = c[0];\n }\n b = c;\n }\n null == b && (b = \"\");\n c = b;\n }\n a._wrapperState = {\n initialValue: Sa(c)\n };\n}\nfunction ib(a, b) {\n var c = Sa(b.value),\n d = Sa(b.defaultValue);\n null != c && (c = \"\" + c, c !== a.value && (a.value = c), null == b.defaultValue && a.defaultValue !== c && (a.defaultValue = c));\n null != d && (a.defaultValue = \"\" + d);\n}\nfunction jb(a) {\n var b = a.textContent;\n b === a._wrapperState.initialValue && \"\" !== b && null !== b && (a.value = b);\n}\nfunction kb(a) {\n switch (a) {\n case \"svg\":\n return \"http://www.w3.org/2000/svg\";\n case \"math\":\n return \"http://www.w3.org/1998/Math/MathML\";\n default:\n return \"http://www.w3.org/1999/xhtml\";\n }\n}\nfunction lb(a, b) {\n return null == a || \"http://www.w3.org/1999/xhtml\" === a ? kb(b) : \"http://www.w3.org/2000/svg\" === a && \"foreignObject\" === b ? \"http://www.w3.org/1999/xhtml\" : a;\n}\nvar mb,\n nb = function (a) {\n return \"undefined\" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function (b, c, d, e) {\n MSApp.execUnsafeLocalFunction(function () {\n return a(b, c, d, e);\n });\n } : a;\n }(function (a, b) {\n if (\"http://www.w3.org/2000/svg\" !== a.namespaceURI || \"innerHTML\" in a) a.innerHTML = b;else {\n mb = mb || document.createElement(\"div\");\n mb.innerHTML = \"\" + b.valueOf().toString() + \"\";\n for (b = mb.firstChild; a.firstChild;) a.removeChild(a.firstChild);\n for (; b.firstChild;) a.appendChild(b.firstChild);\n }\n });\nfunction ob(a, b) {\n if (b) {\n var c = a.firstChild;\n if (c && c === a.lastChild && 3 === c.nodeType) {\n c.nodeValue = b;\n return;\n }\n }\n a.textContent = b;\n}\nvar pb = {\n animationIterationCount: !0,\n aspectRatio: !0,\n borderImageOutset: !0,\n borderImageSlice: !0,\n borderImageWidth: !0,\n boxFlex: !0,\n boxFlexGroup: !0,\n boxOrdinalGroup: !0,\n columnCount: !0,\n columns: !0,\n flex: !0,\n flexGrow: !0,\n flexPositive: !0,\n flexShrink: !0,\n flexNegative: !0,\n flexOrder: !0,\n gridArea: !0,\n gridRow: !0,\n gridRowEnd: !0,\n gridRowSpan: !0,\n gridRowStart: !0,\n gridColumn: !0,\n gridColumnEnd: !0,\n gridColumnSpan: !0,\n gridColumnStart: !0,\n fontWeight: !0,\n lineClamp: !0,\n lineHeight: !0,\n opacity: !0,\n order: !0,\n orphans: !0,\n tabSize: !0,\n widows: !0,\n zIndex: !0,\n zoom: !0,\n fillOpacity: !0,\n floodOpacity: !0,\n stopOpacity: !0,\n strokeDasharray: !0,\n strokeDashoffset: !0,\n strokeMiterlimit: !0,\n strokeOpacity: !0,\n strokeWidth: !0\n },\n qb = [\"Webkit\", \"ms\", \"Moz\", \"O\"];\nObject.keys(pb).forEach(function (a) {\n qb.forEach(function (b) {\n b = b + a.charAt(0).toUpperCase() + a.substring(1);\n pb[b] = pb[a];\n });\n});\nfunction rb(a, b, c) {\n return null == b || \"boolean\" === typeof b || \"\" === b ? \"\" : c || \"number\" !== typeof b || 0 === b || pb.hasOwnProperty(a) && pb[a] ? (\"\" + b).trim() : b + \"px\";\n}\nfunction sb(a, b) {\n a = a.style;\n for (var c in b) if (b.hasOwnProperty(c)) {\n var d = 0 === c.indexOf(\"--\"),\n e = rb(c, b[c], d);\n \"float\" === c && (c = \"cssFloat\");\n d ? a.setProperty(c, e) : a[c] = e;\n }\n}\nvar tb = A({\n menuitem: !0\n}, {\n area: !0,\n base: !0,\n br: !0,\n col: !0,\n embed: !0,\n hr: !0,\n img: !0,\n input: !0,\n keygen: !0,\n link: !0,\n meta: !0,\n param: !0,\n source: !0,\n track: !0,\n wbr: !0\n});\nfunction ub(a, b) {\n if (b) {\n if (tb[a] && (null != b.children || null != b.dangerouslySetInnerHTML)) throw Error(p(137, a));\n if (null != b.dangerouslySetInnerHTML) {\n if (null != b.children) throw Error(p(60));\n if (\"object\" !== typeof b.dangerouslySetInnerHTML || !(\"__html\" in b.dangerouslySetInnerHTML)) throw Error(p(61));\n }\n if (null != b.style && \"object\" !== typeof b.style) throw Error(p(62));\n }\n}\nfunction vb(a, b) {\n if (-1 === a.indexOf(\"-\")) return \"string\" === typeof b.is;\n switch (a) {\n case \"annotation-xml\":\n case \"color-profile\":\n case \"font-face\":\n case \"font-face-src\":\n case \"font-face-uri\":\n case \"font-face-format\":\n case \"font-face-name\":\n case \"missing-glyph\":\n return !1;\n default:\n return !0;\n }\n}\nvar wb = null;\nfunction xb(a) {\n a = a.target || a.srcElement || window;\n a.correspondingUseElement && (a = a.correspondingUseElement);\n return 3 === a.nodeType ? a.parentNode : a;\n}\nvar yb = null,\n zb = null,\n Ab = null;\nfunction Bb(a) {\n if (a = Cb(a)) {\n if (\"function\" !== typeof yb) throw Error(p(280));\n var b = a.stateNode;\n b && (b = Db(b), yb(a.stateNode, a.type, b));\n }\n}\nfunction Eb(a) {\n zb ? Ab ? Ab.push(a) : Ab = [a] : zb = a;\n}\nfunction Fb() {\n if (zb) {\n var a = zb,\n b = Ab;\n Ab = zb = null;\n Bb(a);\n if (b) for (a = 0; a < b.length; a++) Bb(b[a]);\n }\n}\nfunction Gb(a, b) {\n return a(b);\n}\nfunction Hb() {}\nvar Ib = !1;\nfunction Jb(a, b, c) {\n if (Ib) return a(b, c);\n Ib = !0;\n try {\n return Gb(a, b, c);\n } finally {\n if (Ib = !1, null !== zb || null !== Ab) Hb(), Fb();\n }\n}\nfunction Kb(a, b) {\n var c = a.stateNode;\n if (null === c) return null;\n var d = Db(c);\n if (null === d) return null;\n c = d[b];\n a: switch (b) {\n case \"onClick\":\n case \"onClickCapture\":\n case \"onDoubleClick\":\n case \"onDoubleClickCapture\":\n case \"onMouseDown\":\n case \"onMouseDownCapture\":\n case \"onMouseMove\":\n case \"onMouseMoveCapture\":\n case \"onMouseUp\":\n case \"onMouseUpCapture\":\n case \"onMouseEnter\":\n (d = !d.disabled) || (a = a.type, d = !(\"button\" === a || \"input\" === a || \"select\" === a || \"textarea\" === a));\n a = !d;\n break a;\n default:\n a = !1;\n }\n if (a) return null;\n if (c && \"function\" !== typeof c) throw Error(p(231, b, typeof c));\n return c;\n}\nvar Lb = !1;\nif (ia) try {\n var Mb = {};\n Object.defineProperty(Mb, \"passive\", {\n get: function () {\n Lb = !0;\n }\n });\n window.addEventListener(\"test\", Mb, Mb);\n window.removeEventListener(\"test\", Mb, Mb);\n} catch (a) {\n Lb = !1;\n}\nfunction Nb(a, b, c, d, e, f, g, h, k) {\n var l = Array.prototype.slice.call(arguments, 3);\n try {\n b.apply(c, l);\n } catch (m) {\n this.onError(m);\n }\n}\nvar Ob = !1,\n Pb = null,\n Qb = !1,\n Rb = null,\n Sb = {\n onError: function (a) {\n Ob = !0;\n Pb = a;\n }\n };\nfunction Tb(a, b, c, d, e, f, g, h, k) {\n Ob = !1;\n Pb = null;\n Nb.apply(Sb, arguments);\n}\nfunction Ub(a, b, c, d, e, f, g, h, k) {\n Tb.apply(this, arguments);\n if (Ob) {\n if (Ob) {\n var l = Pb;\n Ob = !1;\n Pb = null;\n } else throw Error(p(198));\n Qb || (Qb = !0, Rb = l);\n }\n}\nfunction Vb(a) {\n var b = a,\n c = a;\n if (a.alternate) for (; b.return;) b = b.return;else {\n a = b;\n do b = a, 0 !== (b.flags & 4098) && (c = b.return), a = b.return; while (a);\n }\n return 3 === b.tag ? c : null;\n}\nfunction Wb(a) {\n if (13 === a.tag) {\n var b = a.memoizedState;\n null === b && (a = a.alternate, null !== a && (b = a.memoizedState));\n if (null !== b) return b.dehydrated;\n }\n return null;\n}\nfunction Xb(a) {\n if (Vb(a) !== a) throw Error(p(188));\n}\nfunction Yb(a) {\n var b = a.alternate;\n if (!b) {\n b = Vb(a);\n if (null === b) throw Error(p(188));\n return b !== a ? null : a;\n }\n for (var c = a, d = b;;) {\n var e = c.return;\n if (null === e) break;\n var f = e.alternate;\n if (null === f) {\n d = e.return;\n if (null !== d) {\n c = d;\n continue;\n }\n break;\n }\n if (e.child === f.child) {\n for (f = e.child; f;) {\n if (f === c) return Xb(e), a;\n if (f === d) return Xb(e), b;\n f = f.sibling;\n }\n throw Error(p(188));\n }\n if (c.return !== d.return) c = e, d = f;else {\n for (var g = !1, h = e.child; h;) {\n if (h === c) {\n g = !0;\n c = e;\n d = f;\n break;\n }\n if (h === d) {\n g = !0;\n d = e;\n c = f;\n break;\n }\n h = h.sibling;\n }\n if (!g) {\n for (h = f.child; h;) {\n if (h === c) {\n g = !0;\n c = f;\n d = e;\n break;\n }\n if (h === d) {\n g = !0;\n d = f;\n c = e;\n break;\n }\n h = h.sibling;\n }\n if (!g) throw Error(p(189));\n }\n }\n if (c.alternate !== d) throw Error(p(190));\n }\n if (3 !== c.tag) throw Error(p(188));\n return c.stateNode.current === c ? a : b;\n}\nfunction Zb(a) {\n a = Yb(a);\n return null !== a ? $b(a) : null;\n}\nfunction $b(a) {\n if (5 === a.tag || 6 === a.tag) return a;\n for (a = a.child; null !== a;) {\n var b = $b(a);\n if (null !== b) return b;\n a = a.sibling;\n }\n return null;\n}\nvar ac = ca.unstable_scheduleCallback,\n bc = ca.unstable_cancelCallback,\n cc = ca.unstable_shouldYield,\n dc = ca.unstable_requestPaint,\n B = ca.unstable_now,\n ec = ca.unstable_getCurrentPriorityLevel,\n fc = ca.unstable_ImmediatePriority,\n gc = ca.unstable_UserBlockingPriority,\n hc = ca.unstable_NormalPriority,\n ic = ca.unstable_LowPriority,\n jc = ca.unstable_IdlePriority,\n kc = null,\n lc = null;\nfunction mc(a) {\n if (lc && \"function\" === typeof lc.onCommitFiberRoot) try {\n lc.onCommitFiberRoot(kc, a, void 0, 128 === (a.current.flags & 128));\n } catch (b) {}\n}\nvar oc = Math.clz32 ? Math.clz32 : nc,\n pc = Math.log,\n qc = Math.LN2;\nfunction nc(a) {\n a >>>= 0;\n return 0 === a ? 32 : 31 - (pc(a) / qc | 0) | 0;\n}\nvar rc = 64,\n sc = 4194304;\nfunction tc(a) {\n switch (a & -a) {\n case 1:\n return 1;\n case 2:\n return 2;\n case 4:\n return 4;\n case 8:\n return 8;\n case 16:\n return 16;\n case 32:\n return 32;\n case 64:\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return a & 4194240;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n case 67108864:\n return a & 130023424;\n case 134217728:\n return 134217728;\n case 268435456:\n return 268435456;\n case 536870912:\n return 536870912;\n case 1073741824:\n return 1073741824;\n default:\n return a;\n }\n}\nfunction uc(a, b) {\n var c = a.pendingLanes;\n if (0 === c) return 0;\n var d = 0,\n e = a.suspendedLanes,\n f = a.pingedLanes,\n g = c & 268435455;\n if (0 !== g) {\n var h = g & ~e;\n 0 !== h ? d = tc(h) : (f &= g, 0 !== f && (d = tc(f)));\n } else g = c & ~e, 0 !== g ? d = tc(g) : 0 !== f && (d = tc(f));\n if (0 === d) return 0;\n if (0 !== b && b !== d && 0 === (b & e) && (e = d & -d, f = b & -b, e >= f || 16 === e && 0 !== (f & 4194240))) return b;\n 0 !== (d & 4) && (d |= c & 16);\n b = a.entangledLanes;\n if (0 !== b) for (a = a.entanglements, b &= d; 0 < b;) c = 31 - oc(b), e = 1 << c, d |= a[c], b &= ~e;\n return d;\n}\nfunction vc(a, b) {\n switch (a) {\n case 1:\n case 2:\n case 4:\n return b + 250;\n case 8:\n case 16:\n case 32:\n case 64:\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return b + 5E3;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n case 67108864:\n return -1;\n case 134217728:\n case 268435456:\n case 536870912:\n case 1073741824:\n return -1;\n default:\n return -1;\n }\n}\nfunction wc(a, b) {\n for (var c = a.suspendedLanes, d = a.pingedLanes, e = a.expirationTimes, f = a.pendingLanes; 0 < f;) {\n var g = 31 - oc(f),\n h = 1 << g,\n k = e[g];\n if (-1 === k) {\n if (0 === (h & c) || 0 !== (h & d)) e[g] = vc(h, b);\n } else k <= b && (a.expiredLanes |= h);\n f &= ~h;\n }\n}\nfunction xc(a) {\n a = a.pendingLanes & -1073741825;\n return 0 !== a ? a : a & 1073741824 ? 1073741824 : 0;\n}\nfunction yc() {\n var a = rc;\n rc <<= 1;\n 0 === (rc & 4194240) && (rc = 64);\n return a;\n}\nfunction zc(a) {\n for (var b = [], c = 0; 31 > c; c++) b.push(a);\n return b;\n}\nfunction Ac(a, b, c) {\n a.pendingLanes |= b;\n 536870912 !== b && (a.suspendedLanes = 0, a.pingedLanes = 0);\n a = a.eventTimes;\n b = 31 - oc(b);\n a[b] = c;\n}\nfunction Bc(a, b) {\n var c = a.pendingLanes & ~b;\n a.pendingLanes = b;\n a.suspendedLanes = 0;\n a.pingedLanes = 0;\n a.expiredLanes &= b;\n a.mutableReadLanes &= b;\n a.entangledLanes &= b;\n b = a.entanglements;\n var d = a.eventTimes;\n for (a = a.expirationTimes; 0 < c;) {\n var e = 31 - oc(c),\n f = 1 << e;\n b[e] = 0;\n d[e] = -1;\n a[e] = -1;\n c &= ~f;\n }\n}\nfunction Cc(a, b) {\n var c = a.entangledLanes |= b;\n for (a = a.entanglements; c;) {\n var d = 31 - oc(c),\n e = 1 << d;\n e & b | a[d] & b && (a[d] |= b);\n c &= ~e;\n }\n}\nvar C = 0;\nfunction Dc(a) {\n a &= -a;\n return 1 < a ? 4 < a ? 0 !== (a & 268435455) ? 16 : 536870912 : 4 : 1;\n}\nvar Ec,\n Fc,\n Gc,\n Hc,\n Ic,\n Jc = !1,\n Kc = [],\n Lc = null,\n Mc = null,\n Nc = null,\n Oc = new Map(),\n Pc = new Map(),\n Qc = [],\n Rc = \"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");\nfunction Sc(a, b) {\n switch (a) {\n case \"focusin\":\n case \"focusout\":\n Lc = null;\n break;\n case \"dragenter\":\n case \"dragleave\":\n Mc = null;\n break;\n case \"mouseover\":\n case \"mouseout\":\n Nc = null;\n break;\n case \"pointerover\":\n case \"pointerout\":\n Oc.delete(b.pointerId);\n break;\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n Pc.delete(b.pointerId);\n }\n}\nfunction Tc(a, b, c, d, e, f) {\n if (null === a || a.nativeEvent !== f) return a = {\n blockedOn: b,\n domEventName: c,\n eventSystemFlags: d,\n nativeEvent: f,\n targetContainers: [e]\n }, null !== b && (b = Cb(b), null !== b && Fc(b)), a;\n a.eventSystemFlags |= d;\n b = a.targetContainers;\n null !== e && -1 === b.indexOf(e) && b.push(e);\n return a;\n}\nfunction Uc(a, b, c, d, e) {\n switch (b) {\n case \"focusin\":\n return Lc = Tc(Lc, a, b, c, d, e), !0;\n case \"dragenter\":\n return Mc = Tc(Mc, a, b, c, d, e), !0;\n case \"mouseover\":\n return Nc = Tc(Nc, a, b, c, d, e), !0;\n case \"pointerover\":\n var f = e.pointerId;\n Oc.set(f, Tc(Oc.get(f) || null, a, b, c, d, e));\n return !0;\n case \"gotpointercapture\":\n return f = e.pointerId, Pc.set(f, Tc(Pc.get(f) || null, a, b, c, d, e)), !0;\n }\n return !1;\n}\nfunction Vc(a) {\n var b = Wc(a.target);\n if (null !== b) {\n var c = Vb(b);\n if (null !== c) if (b = c.tag, 13 === b) {\n if (b = Wb(c), null !== b) {\n a.blockedOn = b;\n Ic(a.priority, function () {\n Gc(c);\n });\n return;\n }\n } else if (3 === b && c.stateNode.current.memoizedState.isDehydrated) {\n a.blockedOn = 3 === c.tag ? c.stateNode.containerInfo : null;\n return;\n }\n }\n a.blockedOn = null;\n}\nfunction Xc(a) {\n if (null !== a.blockedOn) return !1;\n for (var b = a.targetContainers; 0 < b.length;) {\n var c = Yc(a.domEventName, a.eventSystemFlags, b[0], a.nativeEvent);\n if (null === c) {\n c = a.nativeEvent;\n var d = new c.constructor(c.type, c);\n wb = d;\n c.target.dispatchEvent(d);\n wb = null;\n } else return b = Cb(c), null !== b && Fc(b), a.blockedOn = c, !1;\n b.shift();\n }\n return !0;\n}\nfunction Zc(a, b, c) {\n Xc(a) && c.delete(b);\n}\nfunction $c() {\n Jc = !1;\n null !== Lc && Xc(Lc) && (Lc = null);\n null !== Mc && Xc(Mc) && (Mc = null);\n null !== Nc && Xc(Nc) && (Nc = null);\n Oc.forEach(Zc);\n Pc.forEach(Zc);\n}\nfunction ad(a, b) {\n a.blockedOn === b && (a.blockedOn = null, Jc || (Jc = !0, ca.unstable_scheduleCallback(ca.unstable_NormalPriority, $c)));\n}\nfunction bd(a) {\n function b(b) {\n return ad(b, a);\n }\n if (0 < Kc.length) {\n ad(Kc[0], a);\n for (var c = 1; c < Kc.length; c++) {\n var d = Kc[c];\n d.blockedOn === a && (d.blockedOn = null);\n }\n }\n null !== Lc && ad(Lc, a);\n null !== Mc && ad(Mc, a);\n null !== Nc && ad(Nc, a);\n Oc.forEach(b);\n Pc.forEach(b);\n for (c = 0; c < Qc.length; c++) d = Qc[c], d.blockedOn === a && (d.blockedOn = null);\n for (; 0 < Qc.length && (c = Qc[0], null === c.blockedOn);) Vc(c), null === c.blockedOn && Qc.shift();\n}\nvar cd = ua.ReactCurrentBatchConfig,\n dd = !0;\nfunction ed(a, b, c, d) {\n var e = C,\n f = cd.transition;\n cd.transition = null;\n try {\n C = 1, fd(a, b, c, d);\n } finally {\n C = e, cd.transition = f;\n }\n}\nfunction gd(a, b, c, d) {\n var e = C,\n f = cd.transition;\n cd.transition = null;\n try {\n C = 4, fd(a, b, c, d);\n } finally {\n C = e, cd.transition = f;\n }\n}\nfunction fd(a, b, c, d) {\n if (dd) {\n var e = Yc(a, b, c, d);\n if (null === e) hd(a, b, d, id, c), Sc(a, d);else if (Uc(e, a, b, c, d)) d.stopPropagation();else if (Sc(a, d), b & 4 && -1 < Rc.indexOf(a)) {\n for (; null !== e;) {\n var f = Cb(e);\n null !== f && Ec(f);\n f = Yc(a, b, c, d);\n null === f && hd(a, b, d, id, c);\n if (f === e) break;\n e = f;\n }\n null !== e && d.stopPropagation();\n } else hd(a, b, d, null, c);\n }\n}\nvar id = null;\nfunction Yc(a, b, c, d) {\n id = null;\n a = xb(d);\n a = Wc(a);\n if (null !== a) if (b = Vb(a), null === b) a = null;else if (c = b.tag, 13 === c) {\n a = Wb(b);\n if (null !== a) return a;\n a = null;\n } else if (3 === c) {\n if (b.stateNode.current.memoizedState.isDehydrated) return 3 === b.tag ? b.stateNode.containerInfo : null;\n a = null;\n } else b !== a && (a = null);\n id = a;\n return null;\n}\nfunction jd(a) {\n switch (a) {\n case \"cancel\":\n case \"click\":\n case \"close\":\n case \"contextmenu\":\n case \"copy\":\n case \"cut\":\n case \"auxclick\":\n case \"dblclick\":\n case \"dragend\":\n case \"dragstart\":\n case \"drop\":\n case \"focusin\":\n case \"focusout\":\n case \"input\":\n case \"invalid\":\n case \"keydown\":\n case \"keypress\":\n case \"keyup\":\n case \"mousedown\":\n case \"mouseup\":\n case \"paste\":\n case \"pause\":\n case \"play\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointerup\":\n case \"ratechange\":\n case \"reset\":\n case \"resize\":\n case \"seeked\":\n case \"submit\":\n case \"touchcancel\":\n case \"touchend\":\n case \"touchstart\":\n case \"volumechange\":\n case \"change\":\n case \"selectionchange\":\n case \"textInput\":\n case \"compositionstart\":\n case \"compositionend\":\n case \"compositionupdate\":\n case \"beforeblur\":\n case \"afterblur\":\n case \"beforeinput\":\n case \"blur\":\n case \"fullscreenchange\":\n case \"focus\":\n case \"hashchange\":\n case \"popstate\":\n case \"select\":\n case \"selectstart\":\n return 1;\n case \"drag\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"mousemove\":\n case \"mouseout\":\n case \"mouseover\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"scroll\":\n case \"toggle\":\n case \"touchmove\":\n case \"wheel\":\n case \"mouseenter\":\n case \"mouseleave\":\n case \"pointerenter\":\n case \"pointerleave\":\n return 4;\n case \"message\":\n switch (ec()) {\n case fc:\n return 1;\n case gc:\n return 4;\n case hc:\n case ic:\n return 16;\n case jc:\n return 536870912;\n default:\n return 16;\n }\n default:\n return 16;\n }\n}\nvar kd = null,\n ld = null,\n md = null;\nfunction nd() {\n if (md) return md;\n var a,\n b = ld,\n c = b.length,\n d,\n e = \"value\" in kd ? kd.value : kd.textContent,\n f = e.length;\n for (a = 0; a < c && b[a] === e[a]; a++);\n var g = c - a;\n for (d = 1; d <= g && b[c - d] === e[f - d]; d++);\n return md = e.slice(a, 1 < d ? 1 - d : void 0);\n}\nfunction od(a) {\n var b = a.keyCode;\n \"charCode\" in a ? (a = a.charCode, 0 === a && 13 === b && (a = 13)) : a = b;\n 10 === a && (a = 13);\n return 32 <= a || 13 === a ? a : 0;\n}\nfunction pd() {\n return !0;\n}\nfunction qd() {\n return !1;\n}\nfunction rd(a) {\n function b(b, d, e, f, g) {\n this._reactName = b;\n this._targetInst = e;\n this.type = d;\n this.nativeEvent = f;\n this.target = g;\n this.currentTarget = null;\n for (var c in a) a.hasOwnProperty(c) && (b = a[c], this[c] = b ? b(f) : f[c]);\n this.isDefaultPrevented = (null != f.defaultPrevented ? f.defaultPrevented : !1 === f.returnValue) ? pd : qd;\n this.isPropagationStopped = qd;\n return this;\n }\n A(b.prototype, {\n preventDefault: function () {\n this.defaultPrevented = !0;\n var a = this.nativeEvent;\n a && (a.preventDefault ? a.preventDefault() : \"unknown\" !== typeof a.returnValue && (a.returnValue = !1), this.isDefaultPrevented = pd);\n },\n stopPropagation: function () {\n var a = this.nativeEvent;\n a && (a.stopPropagation ? a.stopPropagation() : \"unknown\" !== typeof a.cancelBubble && (a.cancelBubble = !0), this.isPropagationStopped = pd);\n },\n persist: function () {},\n isPersistent: pd\n });\n return b;\n}\nvar sd = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (a) {\n return a.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n },\n td = rd(sd),\n ud = A({}, sd, {\n view: 0,\n detail: 0\n }),\n vd = rd(ud),\n wd,\n xd,\n yd,\n Ad = A({}, ud, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: zd,\n button: 0,\n buttons: 0,\n relatedTarget: function (a) {\n return void 0 === a.relatedTarget ? a.fromElement === a.srcElement ? a.toElement : a.fromElement : a.relatedTarget;\n },\n movementX: function (a) {\n if (\"movementX\" in a) return a.movementX;\n a !== yd && (yd && \"mousemove\" === a.type ? (wd = a.screenX - yd.screenX, xd = a.screenY - yd.screenY) : xd = wd = 0, yd = a);\n return wd;\n },\n movementY: function (a) {\n return \"movementY\" in a ? a.movementY : xd;\n }\n }),\n Bd = rd(Ad),\n Cd = A({}, Ad, {\n dataTransfer: 0\n }),\n Dd = rd(Cd),\n Ed = A({}, ud, {\n relatedTarget: 0\n }),\n Fd = rd(Ed),\n Gd = A({}, sd, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n }),\n Hd = rd(Gd),\n Id = A({}, sd, {\n clipboardData: function (a) {\n return \"clipboardData\" in a ? a.clipboardData : window.clipboardData;\n }\n }),\n Jd = rd(Id),\n Kd = A({}, sd, {\n data: 0\n }),\n Ld = rd(Kd),\n Md = {\n Esc: \"Escape\",\n Spacebar: \" \",\n Left: \"ArrowLeft\",\n Up: \"ArrowUp\",\n Right: \"ArrowRight\",\n Down: \"ArrowDown\",\n Del: \"Delete\",\n Win: \"OS\",\n Menu: \"ContextMenu\",\n Apps: \"ContextMenu\",\n Scroll: \"ScrollLock\",\n MozPrintableKey: \"Unidentified\"\n },\n Nd = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 12: \"Clear\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 19: \"Pause\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 45: \"Insert\",\n 46: \"Delete\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 224: \"Meta\"\n },\n Od = {\n Alt: \"altKey\",\n Control: \"ctrlKey\",\n Meta: \"metaKey\",\n Shift: \"shiftKey\"\n };\nfunction Pd(a) {\n var b = this.nativeEvent;\n return b.getModifierState ? b.getModifierState(a) : (a = Od[a]) ? !!b[a] : !1;\n}\nfunction zd() {\n return Pd;\n}\nvar Qd = A({}, ud, {\n key: function (a) {\n if (a.key) {\n var b = Md[a.key] || a.key;\n if (\"Unidentified\" !== b) return b;\n }\n return \"keypress\" === a.type ? (a = od(a), 13 === a ? \"Enter\" : String.fromCharCode(a)) : \"keydown\" === a.type || \"keyup\" === a.type ? Nd[a.keyCode] || \"Unidentified\" : \"\";\n },\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: zd,\n charCode: function (a) {\n return \"keypress\" === a.type ? od(a) : 0;\n },\n keyCode: function (a) {\n return \"keydown\" === a.type || \"keyup\" === a.type ? a.keyCode : 0;\n },\n which: function (a) {\n return \"keypress\" === a.type ? od(a) : \"keydown\" === a.type || \"keyup\" === a.type ? a.keyCode : 0;\n }\n }),\n Rd = rd(Qd),\n Sd = A({}, Ad, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n }),\n Td = rd(Sd),\n Ud = A({}, ud, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: zd\n }),\n Vd = rd(Ud),\n Wd = A({}, sd, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n }),\n Xd = rd(Wd),\n Yd = A({}, Ad, {\n deltaX: function (a) {\n return \"deltaX\" in a ? a.deltaX : \"wheelDeltaX\" in a ? -a.wheelDeltaX : 0;\n },\n deltaY: function (a) {\n return \"deltaY\" in a ? a.deltaY : \"wheelDeltaY\" in a ? -a.wheelDeltaY : \"wheelDelta\" in a ? -a.wheelDelta : 0;\n },\n deltaZ: 0,\n deltaMode: 0\n }),\n Zd = rd(Yd),\n $d = [9, 13, 27, 32],\n ae = ia && \"CompositionEvent\" in window,\n be = null;\nia && \"documentMode\" in document && (be = document.documentMode);\nvar ce = ia && \"TextEvent\" in window && !be,\n de = ia && (!ae || be && 8 < be && 11 >= be),\n ee = String.fromCharCode(32),\n fe = !1;\nfunction ge(a, b) {\n switch (a) {\n case \"keyup\":\n return -1 !== $d.indexOf(b.keyCode);\n case \"keydown\":\n return 229 !== b.keyCode;\n case \"keypress\":\n case \"mousedown\":\n case \"focusout\":\n return !0;\n default:\n return !1;\n }\n}\nfunction he(a) {\n a = a.detail;\n return \"object\" === typeof a && \"data\" in a ? a.data : null;\n}\nvar ie = !1;\nfunction je(a, b) {\n switch (a) {\n case \"compositionend\":\n return he(b);\n case \"keypress\":\n if (32 !== b.which) return null;\n fe = !0;\n return ee;\n case \"textInput\":\n return a = b.data, a === ee && fe ? null : a;\n default:\n return null;\n }\n}\nfunction ke(a, b) {\n if (ie) return \"compositionend\" === a || !ae && ge(a, b) ? (a = nd(), md = ld = kd = null, ie = !1, a) : null;\n switch (a) {\n case \"paste\":\n return null;\n case \"keypress\":\n if (!(b.ctrlKey || b.altKey || b.metaKey) || b.ctrlKey && b.altKey) {\n if (b.char && 1 < b.char.length) return b.char;\n if (b.which) return String.fromCharCode(b.which);\n }\n return null;\n case \"compositionend\":\n return de && \"ko\" !== b.locale ? null : b.data;\n default:\n return null;\n }\n}\nvar le = {\n color: !0,\n date: !0,\n datetime: !0,\n \"datetime-local\": !0,\n email: !0,\n month: !0,\n number: !0,\n password: !0,\n range: !0,\n search: !0,\n tel: !0,\n text: !0,\n time: !0,\n url: !0,\n week: !0\n};\nfunction me(a) {\n var b = a && a.nodeName && a.nodeName.toLowerCase();\n return \"input\" === b ? !!le[a.type] : \"textarea\" === b ? !0 : !1;\n}\nfunction ne(a, b, c, d) {\n Eb(d);\n b = oe(b, \"onChange\");\n 0 < b.length && (c = new td(\"onChange\", \"change\", null, c, d), a.push({\n event: c,\n listeners: b\n }));\n}\nvar pe = null,\n qe = null;\nfunction re(a) {\n se(a, 0);\n}\nfunction te(a) {\n var b = ue(a);\n if (Wa(b)) return a;\n}\nfunction ve(a, b) {\n if (\"change\" === a) return b;\n}\nvar we = !1;\nif (ia) {\n var xe;\n if (ia) {\n var ye = \"oninput\" in document;\n if (!ye) {\n var ze = document.createElement(\"div\");\n ze.setAttribute(\"oninput\", \"return;\");\n ye = \"function\" === typeof ze.oninput;\n }\n xe = ye;\n } else xe = !1;\n we = xe && (!document.documentMode || 9 < document.documentMode);\n}\nfunction Ae() {\n pe && (pe.detachEvent(\"onpropertychange\", Be), qe = pe = null);\n}\nfunction Be(a) {\n if (\"value\" === a.propertyName && te(qe)) {\n var b = [];\n ne(b, qe, a, xb(a));\n Jb(re, b);\n }\n}\nfunction Ce(a, b, c) {\n \"focusin\" === a ? (Ae(), pe = b, qe = c, pe.attachEvent(\"onpropertychange\", Be)) : \"focusout\" === a && Ae();\n}\nfunction De(a) {\n if (\"selectionchange\" === a || \"keyup\" === a || \"keydown\" === a) return te(qe);\n}\nfunction Ee(a, b) {\n if (\"click\" === a) return te(b);\n}\nfunction Fe(a, b) {\n if (\"input\" === a || \"change\" === a) return te(b);\n}\nfunction Ge(a, b) {\n return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;\n}\nvar He = \"function\" === typeof Object.is ? Object.is : Ge;\nfunction Ie(a, b) {\n if (He(a, b)) return !0;\n if (\"object\" !== typeof a || null === a || \"object\" !== typeof b || null === b) return !1;\n var c = Object.keys(a),\n d = Object.keys(b);\n if (c.length !== d.length) return !1;\n for (d = 0; d < c.length; d++) {\n var e = c[d];\n if (!ja.call(b, e) || !He(a[e], b[e])) return !1;\n }\n return !0;\n}\nfunction Je(a) {\n for (; a && a.firstChild;) a = a.firstChild;\n return a;\n}\nfunction Ke(a, b) {\n var c = Je(a);\n a = 0;\n for (var d; c;) {\n if (3 === c.nodeType) {\n d = a + c.textContent.length;\n if (a <= b && d >= b) return {\n node: c,\n offset: b - a\n };\n a = d;\n }\n a: {\n for (; c;) {\n if (c.nextSibling) {\n c = c.nextSibling;\n break a;\n }\n c = c.parentNode;\n }\n c = void 0;\n }\n c = Je(c);\n }\n}\nfunction Le(a, b) {\n return a && b ? a === b ? !0 : a && 3 === a.nodeType ? !1 : b && 3 === b.nodeType ? Le(a, b.parentNode) : \"contains\" in a ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : !1 : !1;\n}\nfunction Me() {\n for (var a = window, b = Xa(); b instanceof a.HTMLIFrameElement;) {\n try {\n var c = \"string\" === typeof b.contentWindow.location.href;\n } catch (d) {\n c = !1;\n }\n if (c) a = b.contentWindow;else break;\n b = Xa(a.document);\n }\n return b;\n}\nfunction Ne(a) {\n var b = a && a.nodeName && a.nodeName.toLowerCase();\n return b && (\"input\" === b && (\"text\" === a.type || \"search\" === a.type || \"tel\" === a.type || \"url\" === a.type || \"password\" === a.type) || \"textarea\" === b || \"true\" === a.contentEditable);\n}\nfunction Oe(a) {\n var b = Me(),\n c = a.focusedElem,\n d = a.selectionRange;\n if (b !== c && c && c.ownerDocument && Le(c.ownerDocument.documentElement, c)) {\n if (null !== d && Ne(c)) if (b = d.start, a = d.end, void 0 === a && (a = b), \"selectionStart\" in c) c.selectionStart = b, c.selectionEnd = Math.min(a, c.value.length);else if (a = (b = c.ownerDocument || document) && b.defaultView || window, a.getSelection) {\n a = a.getSelection();\n var e = c.textContent.length,\n f = Math.min(d.start, e);\n d = void 0 === d.end ? f : Math.min(d.end, e);\n !a.extend && f > d && (e = d, d = f, f = e);\n e = Ke(c, f);\n var g = Ke(c, d);\n e && g && (1 !== a.rangeCount || a.anchorNode !== e.node || a.anchorOffset !== e.offset || a.focusNode !== g.node || a.focusOffset !== g.offset) && (b = b.createRange(), b.setStart(e.node, e.offset), a.removeAllRanges(), f > d ? (a.addRange(b), a.extend(g.node, g.offset)) : (b.setEnd(g.node, g.offset), a.addRange(b)));\n }\n b = [];\n for (a = c; a = a.parentNode;) 1 === a.nodeType && b.push({\n element: a,\n left: a.scrollLeft,\n top: a.scrollTop\n });\n \"function\" === typeof c.focus && c.focus();\n for (c = 0; c < b.length; c++) a = b[c], a.element.scrollLeft = a.left, a.element.scrollTop = a.top;\n }\n}\nvar Pe = ia && \"documentMode\" in document && 11 >= document.documentMode,\n Qe = null,\n Re = null,\n Se = null,\n Te = !1;\nfunction Ue(a, b, c) {\n var d = c.window === c ? c.document : 9 === c.nodeType ? c : c.ownerDocument;\n Te || null == Qe || Qe !== Xa(d) || (d = Qe, \"selectionStart\" in d && Ne(d) ? d = {\n start: d.selectionStart,\n end: d.selectionEnd\n } : (d = (d.ownerDocument && d.ownerDocument.defaultView || window).getSelection(), d = {\n anchorNode: d.anchorNode,\n anchorOffset: d.anchorOffset,\n focusNode: d.focusNode,\n focusOffset: d.focusOffset\n }), Se && Ie(Se, d) || (Se = d, d = oe(Re, \"onSelect\"), 0 < d.length && (b = new td(\"onSelect\", \"select\", null, b, c), a.push({\n event: b,\n listeners: d\n }), b.target = Qe)));\n}\nfunction Ve(a, b) {\n var c = {};\n c[a.toLowerCase()] = b.toLowerCase();\n c[\"Webkit\" + a] = \"webkit\" + b;\n c[\"Moz\" + a] = \"moz\" + b;\n return c;\n}\nvar We = {\n animationend: Ve(\"Animation\", \"AnimationEnd\"),\n animationiteration: Ve(\"Animation\", \"AnimationIteration\"),\n animationstart: Ve(\"Animation\", \"AnimationStart\"),\n transitionend: Ve(\"Transition\", \"TransitionEnd\")\n },\n Xe = {},\n Ye = {};\nia && (Ye = document.createElement(\"div\").style, \"AnimationEvent\" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), \"TransitionEvent\" in window || delete We.transitionend.transition);\nfunction Ze(a) {\n if (Xe[a]) return Xe[a];\n if (!We[a]) return a;\n var b = We[a],\n c;\n for (c in b) if (b.hasOwnProperty(c) && c in Ye) return Xe[a] = b[c];\n return a;\n}\nvar $e = Ze(\"animationend\"),\n af = Ze(\"animationiteration\"),\n bf = Ze(\"animationstart\"),\n cf = Ze(\"transitionend\"),\n df = new Map(),\n ef = \"abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\" \");\nfunction ff(a, b) {\n df.set(a, b);\n fa(b, [a]);\n}\nfor (var gf = 0; gf < ef.length; gf++) {\n var hf = ef[gf],\n jf = hf.toLowerCase(),\n kf = hf[0].toUpperCase() + hf.slice(1);\n ff(jf, \"on\" + kf);\n}\nff($e, \"onAnimationEnd\");\nff(af, \"onAnimationIteration\");\nff(bf, \"onAnimationStart\");\nff(\"dblclick\", \"onDoubleClick\");\nff(\"focusin\", \"onFocus\");\nff(\"focusout\", \"onBlur\");\nff(cf, \"onTransitionEnd\");\nha(\"onMouseEnter\", [\"mouseout\", \"mouseover\"]);\nha(\"onMouseLeave\", [\"mouseout\", \"mouseover\"]);\nha(\"onPointerEnter\", [\"pointerout\", \"pointerover\"]);\nha(\"onPointerLeave\", [\"pointerout\", \"pointerover\"]);\nfa(\"onChange\", \"change click focusin focusout input keydown keyup selectionchange\".split(\" \"));\nfa(\"onSelect\", \"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \"));\nfa(\"onBeforeInput\", [\"compositionend\", \"keypress\", \"textInput\", \"paste\"]);\nfa(\"onCompositionEnd\", \"compositionend focusout keydown keypress keyup mousedown\".split(\" \"));\nfa(\"onCompositionStart\", \"compositionstart focusout keydown keypress keyup mousedown\".split(\" \"));\nfa(\"onCompositionUpdate\", \"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));\nvar lf = \"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),\n mf = new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(lf));\nfunction nf(a, b, c) {\n var d = a.type || \"unknown-event\";\n a.currentTarget = c;\n Ub(d, b, void 0, a);\n a.currentTarget = null;\n}\nfunction se(a, b) {\n b = 0 !== (b & 4);\n for (var c = 0; c < a.length; c++) {\n var d = a[c],\n e = d.event;\n d = d.listeners;\n a: {\n var f = void 0;\n if (b) for (var g = d.length - 1; 0 <= g; g--) {\n var h = d[g],\n k = h.instance,\n l = h.currentTarget;\n h = h.listener;\n if (k !== f && e.isPropagationStopped()) break a;\n nf(e, h, l);\n f = k;\n } else for (g = 0; g < d.length; g++) {\n h = d[g];\n k = h.instance;\n l = h.currentTarget;\n h = h.listener;\n if (k !== f && e.isPropagationStopped()) break a;\n nf(e, h, l);\n f = k;\n }\n }\n }\n if (Qb) throw a = Rb, Qb = !1, Rb = null, a;\n}\nfunction D(a, b) {\n var c = b[of];\n void 0 === c && (c = b[of] = new Set());\n var d = a + \"__bubble\";\n c.has(d) || (pf(b, a, 2, !1), c.add(d));\n}\nfunction qf(a, b, c) {\n var d = 0;\n b && (d |= 4);\n pf(c, a, d, b);\n}\nvar rf = \"_reactListening\" + Math.random().toString(36).slice(2);\nfunction sf(a) {\n if (!a[rf]) {\n a[rf] = !0;\n da.forEach(function (b) {\n \"selectionchange\" !== b && (mf.has(b) || qf(b, !1, a), qf(b, !0, a));\n });\n var b = 9 === a.nodeType ? a : a.ownerDocument;\n null === b || b[rf] || (b[rf] = !0, qf(\"selectionchange\", !1, b));\n }\n}\nfunction pf(a, b, c, d) {\n switch (jd(b)) {\n case 1:\n var e = ed;\n break;\n case 4:\n e = gd;\n break;\n default:\n e = fd;\n }\n c = e.bind(null, b, c, a);\n e = void 0;\n !Lb || \"touchstart\" !== b && \"touchmove\" !== b && \"wheel\" !== b || (e = !0);\n d ? void 0 !== e ? a.addEventListener(b, c, {\n capture: !0,\n passive: e\n }) : a.addEventListener(b, c, !0) : void 0 !== e ? a.addEventListener(b, c, {\n passive: e\n }) : a.addEventListener(b, c, !1);\n}\nfunction hd(a, b, c, d, e) {\n var f = d;\n if (0 === (b & 1) && 0 === (b & 2) && null !== d) a: for (;;) {\n if (null === d) return;\n var g = d.tag;\n if (3 === g || 4 === g) {\n var h = d.stateNode.containerInfo;\n if (h === e || 8 === h.nodeType && h.parentNode === e) break;\n if (4 === g) for (g = d.return; null !== g;) {\n var k = g.tag;\n if (3 === k || 4 === k) if (k = g.stateNode.containerInfo, k === e || 8 === k.nodeType && k.parentNode === e) return;\n g = g.return;\n }\n for (; null !== h;) {\n g = Wc(h);\n if (null === g) return;\n k = g.tag;\n if (5 === k || 6 === k) {\n d = f = g;\n continue a;\n }\n h = h.parentNode;\n }\n }\n d = d.return;\n }\n Jb(function () {\n var d = f,\n e = xb(c),\n g = [];\n a: {\n var h = df.get(a);\n if (void 0 !== h) {\n var k = td,\n n = a;\n switch (a) {\n case \"keypress\":\n if (0 === od(c)) break a;\n case \"keydown\":\n case \"keyup\":\n k = Rd;\n break;\n case \"focusin\":\n n = \"focus\";\n k = Fd;\n break;\n case \"focusout\":\n n = \"blur\";\n k = Fd;\n break;\n case \"beforeblur\":\n case \"afterblur\":\n k = Fd;\n break;\n case \"click\":\n if (2 === c.button) break a;\n case \"auxclick\":\n case \"dblclick\":\n case \"mousedown\":\n case \"mousemove\":\n case \"mouseup\":\n case \"mouseout\":\n case \"mouseover\":\n case \"contextmenu\":\n k = Bd;\n break;\n case \"drag\":\n case \"dragend\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"dragstart\":\n case \"drop\":\n k = Dd;\n break;\n case \"touchcancel\":\n case \"touchend\":\n case \"touchmove\":\n case \"touchstart\":\n k = Vd;\n break;\n case $e:\n case af:\n case bf:\n k = Hd;\n break;\n case cf:\n k = Xd;\n break;\n case \"scroll\":\n k = vd;\n break;\n case \"wheel\":\n k = Zd;\n break;\n case \"copy\":\n case \"cut\":\n case \"paste\":\n k = Jd;\n break;\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"pointerup\":\n k = Td;\n }\n var t = 0 !== (b & 4),\n J = !t && \"scroll\" === a,\n x = t ? null !== h ? h + \"Capture\" : null : h;\n t = [];\n for (var w = d, u; null !== w;) {\n u = w;\n var F = u.stateNode;\n 5 === u.tag && null !== F && (u = F, null !== x && (F = Kb(w, x), null != F && t.push(tf(w, F, u))));\n if (J) break;\n w = w.return;\n }\n 0 < t.length && (h = new k(h, n, null, c, e), g.push({\n event: h,\n listeners: t\n }));\n }\n }\n if (0 === (b & 7)) {\n a: {\n h = \"mouseover\" === a || \"pointerover\" === a;\n k = \"mouseout\" === a || \"pointerout\" === a;\n if (h && c !== wb && (n = c.relatedTarget || c.fromElement) && (Wc(n) || n[uf])) break a;\n if (k || h) {\n h = e.window === e ? e : (h = e.ownerDocument) ? h.defaultView || h.parentWindow : window;\n if (k) {\n if (n = c.relatedTarget || c.toElement, k = d, n = n ? Wc(n) : null, null !== n && (J = Vb(n), n !== J || 5 !== n.tag && 6 !== n.tag)) n = null;\n } else k = null, n = d;\n if (k !== n) {\n t = Bd;\n F = \"onMouseLeave\";\n x = \"onMouseEnter\";\n w = \"mouse\";\n if (\"pointerout\" === a || \"pointerover\" === a) t = Td, F = \"onPointerLeave\", x = \"onPointerEnter\", w = \"pointer\";\n J = null == k ? h : ue(k);\n u = null == n ? h : ue(n);\n h = new t(F, w + \"leave\", k, c, e);\n h.target = J;\n h.relatedTarget = u;\n F = null;\n Wc(e) === d && (t = new t(x, w + \"enter\", n, c, e), t.target = u, t.relatedTarget = J, F = t);\n J = F;\n if (k && n) b: {\n t = k;\n x = n;\n w = 0;\n for (u = t; u; u = vf(u)) w++;\n u = 0;\n for (F = x; F; F = vf(F)) u++;\n for (; 0 < w - u;) t = vf(t), w--;\n for (; 0 < u - w;) x = vf(x), u--;\n for (; w--;) {\n if (t === x || null !== x && t === x.alternate) break b;\n t = vf(t);\n x = vf(x);\n }\n t = null;\n } else t = null;\n null !== k && wf(g, h, k, t, !1);\n null !== n && null !== J && wf(g, J, n, t, !0);\n }\n }\n }\n a: {\n h = d ? ue(d) : window;\n k = h.nodeName && h.nodeName.toLowerCase();\n if (\"select\" === k || \"input\" === k && \"file\" === h.type) var na = ve;else if (me(h)) {\n if (we) na = Fe;else {\n na = De;\n var xa = Ce;\n }\n } else (k = h.nodeName) && \"input\" === k.toLowerCase() && (\"checkbox\" === h.type || \"radio\" === h.type) && (na = Ee);\n if (na && (na = na(a, d))) {\n ne(g, na, c, e);\n break a;\n }\n xa && xa(a, h, d);\n \"focusout\" === a && (xa = h._wrapperState) && xa.controlled && \"number\" === h.type && cb(h, \"number\", h.value);\n }\n xa = d ? ue(d) : window;\n switch (a) {\n case \"focusin\":\n if (me(xa) || \"true\" === xa.contentEditable) Qe = xa, Re = d, Se = null;\n break;\n case \"focusout\":\n Se = Re = Qe = null;\n break;\n case \"mousedown\":\n Te = !0;\n break;\n case \"contextmenu\":\n case \"mouseup\":\n case \"dragend\":\n Te = !1;\n Ue(g, c, e);\n break;\n case \"selectionchange\":\n if (Pe) break;\n case \"keydown\":\n case \"keyup\":\n Ue(g, c, e);\n }\n var $a;\n if (ae) b: {\n switch (a) {\n case \"compositionstart\":\n var ba = \"onCompositionStart\";\n break b;\n case \"compositionend\":\n ba = \"onCompositionEnd\";\n break b;\n case \"compositionupdate\":\n ba = \"onCompositionUpdate\";\n break b;\n }\n ba = void 0;\n } else ie ? ge(a, c) && (ba = \"onCompositionEnd\") : \"keydown\" === a && 229 === c.keyCode && (ba = \"onCompositionStart\");\n ba && (de && \"ko\" !== c.locale && (ie || \"onCompositionStart\" !== ba ? \"onCompositionEnd\" === ba && ie && ($a = nd()) : (kd = e, ld = \"value\" in kd ? kd.value : kd.textContent, ie = !0)), xa = oe(d, ba), 0 < xa.length && (ba = new Ld(ba, a, null, c, e), g.push({\n event: ba,\n listeners: xa\n }), $a ? ba.data = $a : ($a = he(c), null !== $a && (ba.data = $a))));\n if ($a = ce ? je(a, c) : ke(a, c)) d = oe(d, \"onBeforeInput\"), 0 < d.length && (e = new Ld(\"onBeforeInput\", \"beforeinput\", null, c, e), g.push({\n event: e,\n listeners: d\n }), e.data = $a);\n }\n se(g, b);\n });\n}\nfunction tf(a, b, c) {\n return {\n instance: a,\n listener: b,\n currentTarget: c\n };\n}\nfunction oe(a, b) {\n for (var c = b + \"Capture\", d = []; null !== a;) {\n var e = a,\n f = e.stateNode;\n 5 === e.tag && null !== f && (e = f, f = Kb(a, c), null != f && d.unshift(tf(a, f, e)), f = Kb(a, b), null != f && d.push(tf(a, f, e)));\n a = a.return;\n }\n return d;\n}\nfunction vf(a) {\n if (null === a) return null;\n do a = a.return; while (a && 5 !== a.tag);\n return a ? a : null;\n}\nfunction wf(a, b, c, d, e) {\n for (var f = b._reactName, g = []; null !== c && c !== d;) {\n var h = c,\n k = h.alternate,\n l = h.stateNode;\n if (null !== k && k === d) break;\n 5 === h.tag && null !== l && (h = l, e ? (k = Kb(c, f), null != k && g.unshift(tf(c, k, h))) : e || (k = Kb(c, f), null != k && g.push(tf(c, k, h))));\n c = c.return;\n }\n 0 !== g.length && a.push({\n event: b,\n listeners: g\n });\n}\nvar xf = /\\r\\n?/g,\n yf = /\\u0000|\\uFFFD/g;\nfunction zf(a) {\n return (\"string\" === typeof a ? a : \"\" + a).replace(xf, \"\\n\").replace(yf, \"\");\n}\nfunction Af(a, b, c) {\n b = zf(b);\n if (zf(a) !== b && c) throw Error(p(425));\n}\nfunction Bf() {}\nvar Cf = null,\n Df = null;\nfunction Ef(a, b) {\n return \"textarea\" === a || \"noscript\" === a || \"string\" === typeof b.children || \"number\" === typeof b.children || \"object\" === typeof b.dangerouslySetInnerHTML && null !== b.dangerouslySetInnerHTML && null != b.dangerouslySetInnerHTML.__html;\n}\nvar Ff = \"function\" === typeof setTimeout ? setTimeout : void 0,\n Gf = \"function\" === typeof clearTimeout ? clearTimeout : void 0,\n Hf = \"function\" === typeof Promise ? Promise : void 0,\n Jf = \"function\" === typeof queueMicrotask ? queueMicrotask : \"undefined\" !== typeof Hf ? function (a) {\n return Hf.resolve(null).then(a).catch(If);\n } : Ff;\nfunction If(a) {\n setTimeout(function () {\n throw a;\n });\n}\nfunction Kf(a, b) {\n var c = b,\n d = 0;\n do {\n var e = c.nextSibling;\n a.removeChild(c);\n if (e && 8 === e.nodeType) if (c = e.data, \"/$\" === c) {\n if (0 === d) {\n a.removeChild(e);\n bd(b);\n return;\n }\n d--;\n } else \"$\" !== c && \"$?\" !== c && \"$!\" !== c || d++;\n c = e;\n } while (c);\n bd(b);\n}\nfunction Lf(a) {\n for (; null != a; a = a.nextSibling) {\n var b = a.nodeType;\n if (1 === b || 3 === b) break;\n if (8 === b) {\n b = a.data;\n if (\"$\" === b || \"$!\" === b || \"$?\" === b) break;\n if (\"/$\" === b) return null;\n }\n }\n return a;\n}\nfunction Mf(a) {\n a = a.previousSibling;\n for (var b = 0; a;) {\n if (8 === a.nodeType) {\n var c = a.data;\n if (\"$\" === c || \"$!\" === c || \"$?\" === c) {\n if (0 === b) return a;\n b--;\n } else \"/$\" === c && b++;\n }\n a = a.previousSibling;\n }\n return null;\n}\nvar Nf = Math.random().toString(36).slice(2),\n Of = \"__reactFiber$\" + Nf,\n Pf = \"__reactProps$\" + Nf,\n uf = \"__reactContainer$\" + Nf,\n of = \"__reactEvents$\" + Nf,\n Qf = \"__reactListeners$\" + Nf,\n Rf = \"__reactHandles$\" + Nf;\nfunction Wc(a) {\n var b = a[Of];\n if (b) return b;\n for (var c = a.parentNode; c;) {\n if (b = c[uf] || c[Of]) {\n c = b.alternate;\n if (null !== b.child || null !== c && null !== c.child) for (a = Mf(a); null !== a;) {\n if (c = a[Of]) return c;\n a = Mf(a);\n }\n return b;\n }\n a = c;\n c = a.parentNode;\n }\n return null;\n}\nfunction Cb(a) {\n a = a[Of] || a[uf];\n return !a || 5 !== a.tag && 6 !== a.tag && 13 !== a.tag && 3 !== a.tag ? null : a;\n}\nfunction ue(a) {\n if (5 === a.tag || 6 === a.tag) return a.stateNode;\n throw Error(p(33));\n}\nfunction Db(a) {\n return a[Pf] || null;\n}\nvar Sf = [],\n Tf = -1;\nfunction Uf(a) {\n return {\n current: a\n };\n}\nfunction E(a) {\n 0 > Tf || (a.current = Sf[Tf], Sf[Tf] = null, Tf--);\n}\nfunction G(a, b) {\n Tf++;\n Sf[Tf] = a.current;\n a.current = b;\n}\nvar Vf = {},\n H = Uf(Vf),\n Wf = Uf(!1),\n Xf = Vf;\nfunction Yf(a, b) {\n var c = a.type.contextTypes;\n if (!c) return Vf;\n var d = a.stateNode;\n if (d && d.__reactInternalMemoizedUnmaskedChildContext === b) return d.__reactInternalMemoizedMaskedChildContext;\n var e = {},\n f;\n for (f in c) e[f] = b[f];\n d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b, a.__reactInternalMemoizedMaskedChildContext = e);\n return e;\n}\nfunction Zf(a) {\n a = a.childContextTypes;\n return null !== a && void 0 !== a;\n}\nfunction $f() {\n E(Wf);\n E(H);\n}\nfunction ag(a, b, c) {\n if (H.current !== Vf) throw Error(p(168));\n G(H, b);\n G(Wf, c);\n}\nfunction bg(a, b, c) {\n var d = a.stateNode;\n b = b.childContextTypes;\n if (\"function\" !== typeof d.getChildContext) return c;\n d = d.getChildContext();\n for (var e in d) if (!(e in b)) throw Error(p(108, Ra(a) || \"Unknown\", e));\n return A({}, c, d);\n}\nfunction cg(a) {\n a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Vf;\n Xf = H.current;\n G(H, a);\n G(Wf, Wf.current);\n return !0;\n}\nfunction dg(a, b, c) {\n var d = a.stateNode;\n if (!d) throw Error(p(169));\n c ? (a = bg(a, b, Xf), d.__reactInternalMemoizedMergedChildContext = a, E(Wf), E(H), G(H, a)) : E(Wf);\n G(Wf, c);\n}\nvar eg = null,\n fg = !1,\n gg = !1;\nfunction hg(a) {\n null === eg ? eg = [a] : eg.push(a);\n}\nfunction ig(a) {\n fg = !0;\n hg(a);\n}\nfunction jg() {\n if (!gg && null !== eg) {\n gg = !0;\n var a = 0,\n b = C;\n try {\n var c = eg;\n for (C = 1; a < c.length; a++) {\n var d = c[a];\n do d = d(!0); while (null !== d);\n }\n eg = null;\n fg = !1;\n } catch (e) {\n throw null !== eg && (eg = eg.slice(a + 1)), ac(fc, jg), e;\n } finally {\n C = b, gg = !1;\n }\n }\n return null;\n}\nvar kg = [],\n lg = 0,\n mg = null,\n ng = 0,\n og = [],\n pg = 0,\n qg = null,\n rg = 1,\n sg = \"\";\nfunction tg(a, b) {\n kg[lg++] = ng;\n kg[lg++] = mg;\n mg = a;\n ng = b;\n}\nfunction ug(a, b, c) {\n og[pg++] = rg;\n og[pg++] = sg;\n og[pg++] = qg;\n qg = a;\n var d = rg;\n a = sg;\n var e = 32 - oc(d) - 1;\n d &= ~(1 << e);\n c += 1;\n var f = 32 - oc(b) + e;\n if (30 < f) {\n var g = e - e % 5;\n f = (d & (1 << g) - 1).toString(32);\n d >>= g;\n e -= g;\n rg = 1 << 32 - oc(b) + e | c << e | d;\n sg = f + a;\n } else rg = 1 << f | c << e | d, sg = a;\n}\nfunction vg(a) {\n null !== a.return && (tg(a, 1), ug(a, 1, 0));\n}\nfunction wg(a) {\n for (; a === mg;) mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null;\n for (; a === qg;) qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null;\n}\nvar xg = null,\n yg = null,\n I = !1,\n zg = null;\nfunction Ag(a, b) {\n var c = Bg(5, null, null, 0);\n c.elementType = \"DELETED\";\n c.stateNode = b;\n c.return = a;\n b = a.deletions;\n null === b ? (a.deletions = [c], a.flags |= 16) : b.push(c);\n}\nfunction Cg(a, b) {\n switch (a.tag) {\n case 5:\n var c = a.type;\n b = 1 !== b.nodeType || c.toLowerCase() !== b.nodeName.toLowerCase() ? null : b;\n return null !== b ? (a.stateNode = b, xg = a, yg = Lf(b.firstChild), !0) : !1;\n case 6:\n return b = \"\" === a.pendingProps || 3 !== b.nodeType ? null : b, null !== b ? (a.stateNode = b, xg = a, yg = null, !0) : !1;\n case 13:\n return b = 8 !== b.nodeType ? null : b, null !== b ? (c = null !== qg ? {\n id: rg,\n overflow: sg\n } : null, a.memoizedState = {\n dehydrated: b,\n treeContext: c,\n retryLane: 1073741824\n }, c = Bg(18, null, null, 0), c.stateNode = b, c.return = a, a.child = c, xg = a, yg = null, !0) : !1;\n default:\n return !1;\n }\n}\nfunction Dg(a) {\n return 0 !== (a.mode & 1) && 0 === (a.flags & 128);\n}\nfunction Eg(a) {\n if (I) {\n var b = yg;\n if (b) {\n var c = b;\n if (!Cg(a, b)) {\n if (Dg(a)) throw Error(p(418));\n b = Lf(c.nextSibling);\n var d = xg;\n b && Cg(a, b) ? Ag(d, c) : (a.flags = a.flags & -4097 | 2, I = !1, xg = a);\n }\n } else {\n if (Dg(a)) throw Error(p(418));\n a.flags = a.flags & -4097 | 2;\n I = !1;\n xg = a;\n }\n }\n}\nfunction Fg(a) {\n for (a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag;) a = a.return;\n xg = a;\n}\nfunction Gg(a) {\n if (a !== xg) return !1;\n if (!I) return Fg(a), I = !0, !1;\n var b;\n (b = 3 !== a.tag) && !(b = 5 !== a.tag) && (b = a.type, b = \"head\" !== b && \"body\" !== b && !Ef(a.type, a.memoizedProps));\n if (b && (b = yg)) {\n if (Dg(a)) throw Hg(), Error(p(418));\n for (; b;) Ag(a, b), b = Lf(b.nextSibling);\n }\n Fg(a);\n if (13 === a.tag) {\n a = a.memoizedState;\n a = null !== a ? a.dehydrated : null;\n if (!a) throw Error(p(317));\n a: {\n a = a.nextSibling;\n for (b = 0; a;) {\n if (8 === a.nodeType) {\n var c = a.data;\n if (\"/$\" === c) {\n if (0 === b) {\n yg = Lf(a.nextSibling);\n break a;\n }\n b--;\n } else \"$\" !== c && \"$!\" !== c && \"$?\" !== c || b++;\n }\n a = a.nextSibling;\n }\n yg = null;\n }\n } else yg = xg ? Lf(a.stateNode.nextSibling) : null;\n return !0;\n}\nfunction Hg() {\n for (var a = yg; a;) a = Lf(a.nextSibling);\n}\nfunction Ig() {\n yg = xg = null;\n I = !1;\n}\nfunction Jg(a) {\n null === zg ? zg = [a] : zg.push(a);\n}\nvar Kg = ua.ReactCurrentBatchConfig;\nfunction Lg(a, b, c) {\n a = c.ref;\n if (null !== a && \"function\" !== typeof a && \"object\" !== typeof a) {\n if (c._owner) {\n c = c._owner;\n if (c) {\n if (1 !== c.tag) throw Error(p(309));\n var d = c.stateNode;\n }\n if (!d) throw Error(p(147, a));\n var e = d,\n f = \"\" + a;\n if (null !== b && null !== b.ref && \"function\" === typeof b.ref && b.ref._stringRef === f) return b.ref;\n b = function (a) {\n var b = e.refs;\n null === a ? delete b[f] : b[f] = a;\n };\n b._stringRef = f;\n return b;\n }\n if (\"string\" !== typeof a) throw Error(p(284));\n if (!c._owner) throw Error(p(290, a));\n }\n return a;\n}\nfunction Mg(a, b) {\n a = Object.prototype.toString.call(b);\n throw Error(p(31, \"[object Object]\" === a ? \"object with keys {\" + Object.keys(b).join(\", \") + \"}\" : a));\n}\nfunction Ng(a) {\n var b = a._init;\n return b(a._payload);\n}\nfunction Og(a) {\n function b(b, c) {\n if (a) {\n var d = b.deletions;\n null === d ? (b.deletions = [c], b.flags |= 16) : d.push(c);\n }\n }\n function c(c, d) {\n if (!a) return null;\n for (; null !== d;) b(c, d), d = d.sibling;\n return null;\n }\n function d(a, b) {\n for (a = new Map(); null !== b;) null !== b.key ? a.set(b.key, b) : a.set(b.index, b), b = b.sibling;\n return a;\n }\n function e(a, b) {\n a = Pg(a, b);\n a.index = 0;\n a.sibling = null;\n return a;\n }\n function f(b, c, d) {\n b.index = d;\n if (!a) return b.flags |= 1048576, c;\n d = b.alternate;\n if (null !== d) return d = d.index, d < c ? (b.flags |= 2, c) : d;\n b.flags |= 2;\n return c;\n }\n function g(b) {\n a && null === b.alternate && (b.flags |= 2);\n return b;\n }\n function h(a, b, c, d) {\n if (null === b || 6 !== b.tag) return b = Qg(c, a.mode, d), b.return = a, b;\n b = e(b, c);\n b.return = a;\n return b;\n }\n function k(a, b, c, d) {\n var f = c.type;\n if (f === ya) return m(a, b, c.props.children, d, c.key);\n if (null !== b && (b.elementType === f || \"object\" === typeof f && null !== f && f.$$typeof === Ha && Ng(f) === b.type)) return d = e(b, c.props), d.ref = Lg(a, b, c), d.return = a, d;\n d = Rg(c.type, c.key, c.props, null, a.mode, d);\n d.ref = Lg(a, b, c);\n d.return = a;\n return d;\n }\n function l(a, b, c, d) {\n if (null === b || 4 !== b.tag || b.stateNode.containerInfo !== c.containerInfo || b.stateNode.implementation !== c.implementation) return b = Sg(c, a.mode, d), b.return = a, b;\n b = e(b, c.children || []);\n b.return = a;\n return b;\n }\n function m(a, b, c, d, f) {\n if (null === b || 7 !== b.tag) return b = Tg(c, a.mode, d, f), b.return = a, b;\n b = e(b, c);\n b.return = a;\n return b;\n }\n function q(a, b, c) {\n if (\"string\" === typeof b && \"\" !== b || \"number\" === typeof b) return b = Qg(\"\" + b, a.mode, c), b.return = a, b;\n if (\"object\" === typeof b && null !== b) {\n switch (b.$$typeof) {\n case va:\n return c = Rg(b.type, b.key, b.props, null, a.mode, c), c.ref = Lg(a, null, b), c.return = a, c;\n case wa:\n return b = Sg(b, a.mode, c), b.return = a, b;\n case Ha:\n var d = b._init;\n return q(a, d(b._payload), c);\n }\n if (eb(b) || Ka(b)) return b = Tg(b, a.mode, c, null), b.return = a, b;\n Mg(a, b);\n }\n return null;\n }\n function r(a, b, c, d) {\n var e = null !== b ? b.key : null;\n if (\"string\" === typeof c && \"\" !== c || \"number\" === typeof c) return null !== e ? null : h(a, b, \"\" + c, d);\n if (\"object\" === typeof c && null !== c) {\n switch (c.$$typeof) {\n case va:\n return c.key === e ? k(a, b, c, d) : null;\n case wa:\n return c.key === e ? l(a, b, c, d) : null;\n case Ha:\n return e = c._init, r(a, b, e(c._payload), d);\n }\n if (eb(c) || Ka(c)) return null !== e ? null : m(a, b, c, d, null);\n Mg(a, c);\n }\n return null;\n }\n function y(a, b, c, d, e) {\n if (\"string\" === typeof d && \"\" !== d || \"number\" === typeof d) return a = a.get(c) || null, h(b, a, \"\" + d, e);\n if (\"object\" === typeof d && null !== d) {\n switch (d.$$typeof) {\n case va:\n return a = a.get(null === d.key ? c : d.key) || null, k(b, a, d, e);\n case wa:\n return a = a.get(null === d.key ? c : d.key) || null, l(b, a, d, e);\n case Ha:\n var f = d._init;\n return y(a, b, c, f(d._payload), e);\n }\n if (eb(d) || Ka(d)) return a = a.get(c) || null, m(b, a, d, e, null);\n Mg(b, d);\n }\n return null;\n }\n function n(e, g, h, k) {\n for (var l = null, m = null, u = g, w = g = 0, x = null; null !== u && w < h.length; w++) {\n u.index > w ? (x = u, u = null) : x = u.sibling;\n var n = r(e, u, h[w], k);\n if (null === n) {\n null === u && (u = x);\n break;\n }\n a && u && null === n.alternate && b(e, u);\n g = f(n, g, w);\n null === m ? l = n : m.sibling = n;\n m = n;\n u = x;\n }\n if (w === h.length) return c(e, u), I && tg(e, w), l;\n if (null === u) {\n for (; w < h.length; w++) u = q(e, h[w], k), null !== u && (g = f(u, g, w), null === m ? l = u : m.sibling = u, m = u);\n I && tg(e, w);\n return l;\n }\n for (u = d(e, u); w < h.length; w++) x = y(u, e, w, h[w], k), null !== x && (a && null !== x.alternate && u.delete(null === x.key ? w : x.key), g = f(x, g, w), null === m ? l = x : m.sibling = x, m = x);\n a && u.forEach(function (a) {\n return b(e, a);\n });\n I && tg(e, w);\n return l;\n }\n function t(e, g, h, k) {\n var l = Ka(h);\n if (\"function\" !== typeof l) throw Error(p(150));\n h = l.call(h);\n if (null == h) throw Error(p(151));\n for (var u = l = null, m = g, w = g = 0, x = null, n = h.next(); null !== m && !n.done; w++, n = h.next()) {\n m.index > w ? (x = m, m = null) : x = m.sibling;\n var t = r(e, m, n.value, k);\n if (null === t) {\n null === m && (m = x);\n break;\n }\n a && m && null === t.alternate && b(e, m);\n g = f(t, g, w);\n null === u ? l = t : u.sibling = t;\n u = t;\n m = x;\n }\n if (n.done) return c(e, m), I && tg(e, w), l;\n if (null === m) {\n for (; !n.done; w++, n = h.next()) n = q(e, n.value, k), null !== n && (g = f(n, g, w), null === u ? l = n : u.sibling = n, u = n);\n I && tg(e, w);\n return l;\n }\n for (m = d(e, m); !n.done; w++, n = h.next()) n = y(m, e, w, n.value, k), null !== n && (a && null !== n.alternate && m.delete(null === n.key ? w : n.key), g = f(n, g, w), null === u ? l = n : u.sibling = n, u = n);\n a && m.forEach(function (a) {\n return b(e, a);\n });\n I && tg(e, w);\n return l;\n }\n function J(a, d, f, h) {\n \"object\" === typeof f && null !== f && f.type === ya && null === f.key && (f = f.props.children);\n if (\"object\" === typeof f && null !== f) {\n switch (f.$$typeof) {\n case va:\n a: {\n for (var k = f.key, l = d; null !== l;) {\n if (l.key === k) {\n k = f.type;\n if (k === ya) {\n if (7 === l.tag) {\n c(a, l.sibling);\n d = e(l, f.props.children);\n d.return = a;\n a = d;\n break a;\n }\n } else if (l.elementType === k || \"object\" === typeof k && null !== k && k.$$typeof === Ha && Ng(k) === l.type) {\n c(a, l.sibling);\n d = e(l, f.props);\n d.ref = Lg(a, l, f);\n d.return = a;\n a = d;\n break a;\n }\n c(a, l);\n break;\n } else b(a, l);\n l = l.sibling;\n }\n f.type === ya ? (d = Tg(f.props.children, a.mode, h, f.key), d.return = a, a = d) : (h = Rg(f.type, f.key, f.props, null, a.mode, h), h.ref = Lg(a, d, f), h.return = a, a = h);\n }\n return g(a);\n case wa:\n a: {\n for (l = f.key; null !== d;) {\n if (d.key === l) {\n if (4 === d.tag && d.stateNode.containerInfo === f.containerInfo && d.stateNode.implementation === f.implementation) {\n c(a, d.sibling);\n d = e(d, f.children || []);\n d.return = a;\n a = d;\n break a;\n } else {\n c(a, d);\n break;\n }\n } else b(a, d);\n d = d.sibling;\n }\n d = Sg(f, a.mode, h);\n d.return = a;\n a = d;\n }\n return g(a);\n case Ha:\n return l = f._init, J(a, d, l(f._payload), h);\n }\n if (eb(f)) return n(a, d, f, h);\n if (Ka(f)) return t(a, d, f, h);\n Mg(a, f);\n }\n return \"string\" === typeof f && \"\" !== f || \"number\" === typeof f ? (f = \"\" + f, null !== d && 6 === d.tag ? (c(a, d.sibling), d = e(d, f), d.return = a, a = d) : (c(a, d), d = Qg(f, a.mode, h), d.return = a, a = d), g(a)) : c(a, d);\n }\n return J;\n}\nvar Ug = Og(!0),\n Vg = Og(!1),\n Wg = Uf(null),\n Xg = null,\n Yg = null,\n Zg = null;\nfunction $g() {\n Zg = Yg = Xg = null;\n}\nfunction ah(a) {\n var b = Wg.current;\n E(Wg);\n a._currentValue = b;\n}\nfunction bh(a, b, c) {\n for (; null !== a;) {\n var d = a.alternate;\n (a.childLanes & b) !== b ? (a.childLanes |= b, null !== d && (d.childLanes |= b)) : null !== d && (d.childLanes & b) !== b && (d.childLanes |= b);\n if (a === c) break;\n a = a.return;\n }\n}\nfunction ch(a, b) {\n Xg = a;\n Zg = Yg = null;\n a = a.dependencies;\n null !== a && null !== a.firstContext && (0 !== (a.lanes & b) && (dh = !0), a.firstContext = null);\n}\nfunction eh(a) {\n var b = a._currentValue;\n if (Zg !== a) if (a = {\n context: a,\n memoizedValue: b,\n next: null\n }, null === Yg) {\n if (null === Xg) throw Error(p(308));\n Yg = a;\n Xg.dependencies = {\n lanes: 0,\n firstContext: a\n };\n } else Yg = Yg.next = a;\n return b;\n}\nvar fh = null;\nfunction gh(a) {\n null === fh ? fh = [a] : fh.push(a);\n}\nfunction hh(a, b, c, d) {\n var e = b.interleaved;\n null === e ? (c.next = c, gh(b)) : (c.next = e.next, e.next = c);\n b.interleaved = c;\n return ih(a, d);\n}\nfunction ih(a, b) {\n a.lanes |= b;\n var c = a.alternate;\n null !== c && (c.lanes |= b);\n c = a;\n for (a = a.return; null !== a;) a.childLanes |= b, c = a.alternate, null !== c && (c.childLanes |= b), c = a, a = a.return;\n return 3 === c.tag ? c.stateNode : null;\n}\nvar jh = !1;\nfunction kh(a) {\n a.updateQueue = {\n baseState: a.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null,\n interleaved: null,\n lanes: 0\n },\n effects: null\n };\n}\nfunction lh(a, b) {\n a = a.updateQueue;\n b.updateQueue === a && (b.updateQueue = {\n baseState: a.baseState,\n firstBaseUpdate: a.firstBaseUpdate,\n lastBaseUpdate: a.lastBaseUpdate,\n shared: a.shared,\n effects: a.effects\n });\n}\nfunction mh(a, b) {\n return {\n eventTime: a,\n lane: b,\n tag: 0,\n payload: null,\n callback: null,\n next: null\n };\n}\nfunction nh(a, b, c) {\n var d = a.updateQueue;\n if (null === d) return null;\n d = d.shared;\n if (0 !== (K & 2)) {\n var e = d.pending;\n null === e ? b.next = b : (b.next = e.next, e.next = b);\n d.pending = b;\n return ih(a, c);\n }\n e = d.interleaved;\n null === e ? (b.next = b, gh(d)) : (b.next = e.next, e.next = b);\n d.interleaved = b;\n return ih(a, c);\n}\nfunction oh(a, b, c) {\n b = b.updateQueue;\n if (null !== b && (b = b.shared, 0 !== (c & 4194240))) {\n var d = b.lanes;\n d &= a.pendingLanes;\n c |= d;\n b.lanes = c;\n Cc(a, c);\n }\n}\nfunction ph(a, b) {\n var c = a.updateQueue,\n d = a.alternate;\n if (null !== d && (d = d.updateQueue, c === d)) {\n var e = null,\n f = null;\n c = c.firstBaseUpdate;\n if (null !== c) {\n do {\n var g = {\n eventTime: c.eventTime,\n lane: c.lane,\n tag: c.tag,\n payload: c.payload,\n callback: c.callback,\n next: null\n };\n null === f ? e = f = g : f = f.next = g;\n c = c.next;\n } while (null !== c);\n null === f ? e = f = b : f = f.next = b;\n } else e = f = b;\n c = {\n baseState: d.baseState,\n firstBaseUpdate: e,\n lastBaseUpdate: f,\n shared: d.shared,\n effects: d.effects\n };\n a.updateQueue = c;\n return;\n }\n a = c.lastBaseUpdate;\n null === a ? c.firstBaseUpdate = b : a.next = b;\n c.lastBaseUpdate = b;\n}\nfunction qh(a, b, c, d) {\n var e = a.updateQueue;\n jh = !1;\n var f = e.firstBaseUpdate,\n g = e.lastBaseUpdate,\n h = e.shared.pending;\n if (null !== h) {\n e.shared.pending = null;\n var k = h,\n l = k.next;\n k.next = null;\n null === g ? f = l : g.next = l;\n g = k;\n var m = a.alternate;\n null !== m && (m = m.updateQueue, h = m.lastBaseUpdate, h !== g && (null === h ? m.firstBaseUpdate = l : h.next = l, m.lastBaseUpdate = k));\n }\n if (null !== f) {\n var q = e.baseState;\n g = 0;\n m = l = k = null;\n h = f;\n do {\n var r = h.lane,\n y = h.eventTime;\n if ((d & r) === r) {\n null !== m && (m = m.next = {\n eventTime: y,\n lane: 0,\n tag: h.tag,\n payload: h.payload,\n callback: h.callback,\n next: null\n });\n a: {\n var n = a,\n t = h;\n r = b;\n y = c;\n switch (t.tag) {\n case 1:\n n = t.payload;\n if (\"function\" === typeof n) {\n q = n.call(y, q, r);\n break a;\n }\n q = n;\n break a;\n case 3:\n n.flags = n.flags & -65537 | 128;\n case 0:\n n = t.payload;\n r = \"function\" === typeof n ? n.call(y, q, r) : n;\n if (null === r || void 0 === r) break a;\n q = A({}, q, r);\n break a;\n case 2:\n jh = !0;\n }\n }\n null !== h.callback && 0 !== h.lane && (a.flags |= 64, r = e.effects, null === r ? e.effects = [h] : r.push(h));\n } else y = {\n eventTime: y,\n lane: r,\n tag: h.tag,\n payload: h.payload,\n callback: h.callback,\n next: null\n }, null === m ? (l = m = y, k = q) : m = m.next = y, g |= r;\n h = h.next;\n if (null === h) if (h = e.shared.pending, null === h) break;else r = h, h = r.next, r.next = null, e.lastBaseUpdate = r, e.shared.pending = null;\n } while (1);\n null === m && (k = q);\n e.baseState = k;\n e.firstBaseUpdate = l;\n e.lastBaseUpdate = m;\n b = e.shared.interleaved;\n if (null !== b) {\n e = b;\n do g |= e.lane, e = e.next; while (e !== b);\n } else null === f && (e.shared.lanes = 0);\n rh |= g;\n a.lanes = g;\n a.memoizedState = q;\n }\n}\nfunction sh(a, b, c) {\n a = b.effects;\n b.effects = null;\n if (null !== a) for (b = 0; b < a.length; b++) {\n var d = a[b],\n e = d.callback;\n if (null !== e) {\n d.callback = null;\n d = c;\n if (\"function\" !== typeof e) throw Error(p(191, e));\n e.call(d);\n }\n }\n}\nvar th = {},\n uh = Uf(th),\n vh = Uf(th),\n wh = Uf(th);\nfunction xh(a) {\n if (a === th) throw Error(p(174));\n return a;\n}\nfunction yh(a, b) {\n G(wh, b);\n G(vh, a);\n G(uh, th);\n a = b.nodeType;\n switch (a) {\n case 9:\n case 11:\n b = (b = b.documentElement) ? b.namespaceURI : lb(null, \"\");\n break;\n default:\n a = 8 === a ? b.parentNode : b, b = a.namespaceURI || null, a = a.tagName, b = lb(b, a);\n }\n E(uh);\n G(uh, b);\n}\nfunction zh() {\n E(uh);\n E(vh);\n E(wh);\n}\nfunction Ah(a) {\n xh(wh.current);\n var b = xh(uh.current);\n var c = lb(b, a.type);\n b !== c && (G(vh, a), G(uh, c));\n}\nfunction Bh(a) {\n vh.current === a && (E(uh), E(vh));\n}\nvar L = Uf(0);\nfunction Ch(a) {\n for (var b = a; null !== b;) {\n if (13 === b.tag) {\n var c = b.memoizedState;\n if (null !== c && (c = c.dehydrated, null === c || \"$?\" === c.data || \"$!\" === c.data)) return b;\n } else if (19 === b.tag && void 0 !== b.memoizedProps.revealOrder) {\n if (0 !== (b.flags & 128)) return b;\n } else if (null !== b.child) {\n b.child.return = b;\n b = b.child;\n continue;\n }\n if (b === a) break;\n for (; null === b.sibling;) {\n if (null === b.return || b.return === a) return null;\n b = b.return;\n }\n b.sibling.return = b.return;\n b = b.sibling;\n }\n return null;\n}\nvar Dh = [];\nfunction Eh() {\n for (var a = 0; a < Dh.length; a++) Dh[a]._workInProgressVersionPrimary = null;\n Dh.length = 0;\n}\nvar Fh = ua.ReactCurrentDispatcher,\n Gh = ua.ReactCurrentBatchConfig,\n Hh = 0,\n M = null,\n N = null,\n O = null,\n Ih = !1,\n Jh = !1,\n Kh = 0,\n Lh = 0;\nfunction P() {\n throw Error(p(321));\n}\nfunction Mh(a, b) {\n if (null === b) return !1;\n for (var c = 0; c < b.length && c < a.length; c++) if (!He(a[c], b[c])) return !1;\n return !0;\n}\nfunction Nh(a, b, c, d, e, f) {\n Hh = f;\n M = b;\n b.memoizedState = null;\n b.updateQueue = null;\n b.lanes = 0;\n Fh.current = null === a || null === a.memoizedState ? Oh : Ph;\n a = c(d, e);\n if (Jh) {\n f = 0;\n do {\n Jh = !1;\n Kh = 0;\n if (25 <= f) throw Error(p(301));\n f += 1;\n O = N = null;\n b.updateQueue = null;\n Fh.current = Qh;\n a = c(d, e);\n } while (Jh);\n }\n Fh.current = Rh;\n b = null !== N && null !== N.next;\n Hh = 0;\n O = N = M = null;\n Ih = !1;\n if (b) throw Error(p(300));\n return a;\n}\nfunction Sh() {\n var a = 0 !== Kh;\n Kh = 0;\n return a;\n}\nfunction Th() {\n var a = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n null === O ? M.memoizedState = O = a : O = O.next = a;\n return O;\n}\nfunction Uh() {\n if (null === N) {\n var a = M.alternate;\n a = null !== a ? a.memoizedState : null;\n } else a = N.next;\n var b = null === O ? M.memoizedState : O.next;\n if (null !== b) O = b, N = a;else {\n if (null === a) throw Error(p(310));\n N = a;\n a = {\n memoizedState: N.memoizedState,\n baseState: N.baseState,\n baseQueue: N.baseQueue,\n queue: N.queue,\n next: null\n };\n null === O ? M.memoizedState = O = a : O = O.next = a;\n }\n return O;\n}\nfunction Vh(a, b) {\n return \"function\" === typeof b ? b(a) : b;\n}\nfunction Wh(a) {\n var b = Uh(),\n c = b.queue;\n if (null === c) throw Error(p(311));\n c.lastRenderedReducer = a;\n var d = N,\n e = d.baseQueue,\n f = c.pending;\n if (null !== f) {\n if (null !== e) {\n var g = e.next;\n e.next = f.next;\n f.next = g;\n }\n d.baseQueue = e = f;\n c.pending = null;\n }\n if (null !== e) {\n f = e.next;\n d = d.baseState;\n var h = g = null,\n k = null,\n l = f;\n do {\n var m = l.lane;\n if ((Hh & m) === m) null !== k && (k = k.next = {\n lane: 0,\n action: l.action,\n hasEagerState: l.hasEagerState,\n eagerState: l.eagerState,\n next: null\n }), d = l.hasEagerState ? l.eagerState : a(d, l.action);else {\n var q = {\n lane: m,\n action: l.action,\n hasEagerState: l.hasEagerState,\n eagerState: l.eagerState,\n next: null\n };\n null === k ? (h = k = q, g = d) : k = k.next = q;\n M.lanes |= m;\n rh |= m;\n }\n l = l.next;\n } while (null !== l && l !== f);\n null === k ? g = d : k.next = h;\n He(d, b.memoizedState) || (dh = !0);\n b.memoizedState = d;\n b.baseState = g;\n b.baseQueue = k;\n c.lastRenderedState = d;\n }\n a = c.interleaved;\n if (null !== a) {\n e = a;\n do f = e.lane, M.lanes |= f, rh |= f, e = e.next; while (e !== a);\n } else null === e && (c.lanes = 0);\n return [b.memoizedState, c.dispatch];\n}\nfunction Xh(a) {\n var b = Uh(),\n c = b.queue;\n if (null === c) throw Error(p(311));\n c.lastRenderedReducer = a;\n var d = c.dispatch,\n e = c.pending,\n f = b.memoizedState;\n if (null !== e) {\n c.pending = null;\n var g = e = e.next;\n do f = a(f, g.action), g = g.next; while (g !== e);\n He(f, b.memoizedState) || (dh = !0);\n b.memoizedState = f;\n null === b.baseQueue && (b.baseState = f);\n c.lastRenderedState = f;\n }\n return [f, d];\n}\nfunction Yh() {}\nfunction Zh(a, b) {\n var c = M,\n d = Uh(),\n e = b(),\n f = !He(d.memoizedState, e);\n f && (d.memoizedState = e, dh = !0);\n d = d.queue;\n $h(ai.bind(null, c, d, a), [a]);\n if (d.getSnapshot !== b || f || null !== O && O.memoizedState.tag & 1) {\n c.flags |= 2048;\n bi(9, ci.bind(null, c, d, e, b), void 0, null);\n if (null === Q) throw Error(p(349));\n 0 !== (Hh & 30) || di(c, b, e);\n }\n return e;\n}\nfunction di(a, b, c) {\n a.flags |= 16384;\n a = {\n getSnapshot: b,\n value: c\n };\n b = M.updateQueue;\n null === b ? (b = {\n lastEffect: null,\n stores: null\n }, M.updateQueue = b, b.stores = [a]) : (c = b.stores, null === c ? b.stores = [a] : c.push(a));\n}\nfunction ci(a, b, c, d) {\n b.value = c;\n b.getSnapshot = d;\n ei(b) && fi(a);\n}\nfunction ai(a, b, c) {\n return c(function () {\n ei(b) && fi(a);\n });\n}\nfunction ei(a) {\n var b = a.getSnapshot;\n a = a.value;\n try {\n var c = b();\n return !He(a, c);\n } catch (d) {\n return !0;\n }\n}\nfunction fi(a) {\n var b = ih(a, 1);\n null !== b && gi(b, a, 1, -1);\n}\nfunction hi(a) {\n var b = Th();\n \"function\" === typeof a && (a = a());\n b.memoizedState = b.baseState = a;\n a = {\n pending: null,\n interleaved: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: Vh,\n lastRenderedState: a\n };\n b.queue = a;\n a = a.dispatch = ii.bind(null, M, a);\n return [b.memoizedState, a];\n}\nfunction bi(a, b, c, d) {\n a = {\n tag: a,\n create: b,\n destroy: c,\n deps: d,\n next: null\n };\n b = M.updateQueue;\n null === b ? (b = {\n lastEffect: null,\n stores: null\n }, M.updateQueue = b, b.lastEffect = a.next = a) : (c = b.lastEffect, null === c ? b.lastEffect = a.next = a : (d = c.next, c.next = a, a.next = d, b.lastEffect = a));\n return a;\n}\nfunction ji() {\n return Uh().memoizedState;\n}\nfunction ki(a, b, c, d) {\n var e = Th();\n M.flags |= a;\n e.memoizedState = bi(1 | b, c, void 0, void 0 === d ? null : d);\n}\nfunction li(a, b, c, d) {\n var e = Uh();\n d = void 0 === d ? null : d;\n var f = void 0;\n if (null !== N) {\n var g = N.memoizedState;\n f = g.destroy;\n if (null !== d && Mh(d, g.deps)) {\n e.memoizedState = bi(b, c, f, d);\n return;\n }\n }\n M.flags |= a;\n e.memoizedState = bi(1 | b, c, f, d);\n}\nfunction mi(a, b) {\n return ki(8390656, 8, a, b);\n}\nfunction $h(a, b) {\n return li(2048, 8, a, b);\n}\nfunction ni(a, b) {\n return li(4, 2, a, b);\n}\nfunction oi(a, b) {\n return li(4, 4, a, b);\n}\nfunction pi(a, b) {\n if (\"function\" === typeof b) return a = a(), b(a), function () {\n b(null);\n };\n if (null !== b && void 0 !== b) return a = a(), b.current = a, function () {\n b.current = null;\n };\n}\nfunction qi(a, b, c) {\n c = null !== c && void 0 !== c ? c.concat([a]) : null;\n return li(4, 4, pi.bind(null, b, a), c);\n}\nfunction ri() {}\nfunction si(a, b) {\n var c = Uh();\n b = void 0 === b ? null : b;\n var d = c.memoizedState;\n if (null !== d && null !== b && Mh(b, d[1])) return d[0];\n c.memoizedState = [a, b];\n return a;\n}\nfunction ti(a, b) {\n var c = Uh();\n b = void 0 === b ? null : b;\n var d = c.memoizedState;\n if (null !== d && null !== b && Mh(b, d[1])) return d[0];\n a = a();\n c.memoizedState = [a, b];\n return a;\n}\nfunction ui(a, b, c) {\n if (0 === (Hh & 21)) return a.baseState && (a.baseState = !1, dh = !0), a.memoizedState = c;\n He(c, b) || (c = yc(), M.lanes |= c, rh |= c, a.baseState = !0);\n return b;\n}\nfunction vi(a, b) {\n var c = C;\n C = 0 !== c && 4 > c ? c : 4;\n a(!0);\n var d = Gh.transition;\n Gh.transition = {};\n try {\n a(!1), b();\n } finally {\n C = c, Gh.transition = d;\n }\n}\nfunction wi() {\n return Uh().memoizedState;\n}\nfunction xi(a, b, c) {\n var d = yi(a);\n c = {\n lane: d,\n action: c,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (zi(a)) Ai(b, c);else if (c = hh(a, b, c, d), null !== c) {\n var e = R();\n gi(c, a, d, e);\n Bi(c, b, d);\n }\n}\nfunction ii(a, b, c) {\n var d = yi(a),\n e = {\n lane: d,\n action: c,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (zi(a)) Ai(b, e);else {\n var f = a.alternate;\n if (0 === a.lanes && (null === f || 0 === f.lanes) && (f = b.lastRenderedReducer, null !== f)) try {\n var g = b.lastRenderedState,\n h = f(g, c);\n e.hasEagerState = !0;\n e.eagerState = h;\n if (He(h, g)) {\n var k = b.interleaved;\n null === k ? (e.next = e, gh(b)) : (e.next = k.next, k.next = e);\n b.interleaved = e;\n return;\n }\n } catch (l) {} finally {}\n c = hh(a, b, e, d);\n null !== c && (e = R(), gi(c, a, d, e), Bi(c, b, d));\n }\n}\nfunction zi(a) {\n var b = a.alternate;\n return a === M || null !== b && b === M;\n}\nfunction Ai(a, b) {\n Jh = Ih = !0;\n var c = a.pending;\n null === c ? b.next = b : (b.next = c.next, c.next = b);\n a.pending = b;\n}\nfunction Bi(a, b, c) {\n if (0 !== (c & 4194240)) {\n var d = b.lanes;\n d &= a.pendingLanes;\n c |= d;\n b.lanes = c;\n Cc(a, c);\n }\n}\nvar Rh = {\n readContext: eh,\n useCallback: P,\n useContext: P,\n useEffect: P,\n useImperativeHandle: P,\n useInsertionEffect: P,\n useLayoutEffect: P,\n useMemo: P,\n useReducer: P,\n useRef: P,\n useState: P,\n useDebugValue: P,\n useDeferredValue: P,\n useTransition: P,\n useMutableSource: P,\n useSyncExternalStore: P,\n useId: P,\n unstable_isNewReconciler: !1\n },\n Oh = {\n readContext: eh,\n useCallback: function (a, b) {\n Th().memoizedState = [a, void 0 === b ? null : b];\n return a;\n },\n useContext: eh,\n useEffect: mi,\n useImperativeHandle: function (a, b, c) {\n c = null !== c && void 0 !== c ? c.concat([a]) : null;\n return ki(4194308, 4, pi.bind(null, b, a), c);\n },\n useLayoutEffect: function (a, b) {\n return ki(4194308, 4, a, b);\n },\n useInsertionEffect: function (a, b) {\n return ki(4, 2, a, b);\n },\n useMemo: function (a, b) {\n var c = Th();\n b = void 0 === b ? null : b;\n a = a();\n c.memoizedState = [a, b];\n return a;\n },\n useReducer: function (a, b, c) {\n var d = Th();\n b = void 0 !== c ? c(b) : b;\n d.memoizedState = d.baseState = b;\n a = {\n pending: null,\n interleaved: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: a,\n lastRenderedState: b\n };\n d.queue = a;\n a = a.dispatch = xi.bind(null, M, a);\n return [d.memoizedState, a];\n },\n useRef: function (a) {\n var b = Th();\n a = {\n current: a\n };\n return b.memoizedState = a;\n },\n useState: hi,\n useDebugValue: ri,\n useDeferredValue: function (a) {\n return Th().memoizedState = a;\n },\n useTransition: function () {\n var a = hi(!1),\n b = a[0];\n a = vi.bind(null, a[1]);\n Th().memoizedState = a;\n return [b, a];\n },\n useMutableSource: function () {},\n useSyncExternalStore: function (a, b, c) {\n var d = M,\n e = Th();\n if (I) {\n if (void 0 === c) throw Error(p(407));\n c = c();\n } else {\n c = b();\n if (null === Q) throw Error(p(349));\n 0 !== (Hh & 30) || di(d, b, c);\n }\n e.memoizedState = c;\n var f = {\n value: c,\n getSnapshot: b\n };\n e.queue = f;\n mi(ai.bind(null, d, f, a), [a]);\n d.flags |= 2048;\n bi(9, ci.bind(null, d, f, c, b), void 0, null);\n return c;\n },\n useId: function () {\n var a = Th(),\n b = Q.identifierPrefix;\n if (I) {\n var c = sg;\n var d = rg;\n c = (d & ~(1 << 32 - oc(d) - 1)).toString(32) + c;\n b = \":\" + b + \"R\" + c;\n c = Kh++;\n 0 < c && (b += \"H\" + c.toString(32));\n b += \":\";\n } else c = Lh++, b = \":\" + b + \"r\" + c.toString(32) + \":\";\n return a.memoizedState = b;\n },\n unstable_isNewReconciler: !1\n },\n Ph = {\n readContext: eh,\n useCallback: si,\n useContext: eh,\n useEffect: $h,\n useImperativeHandle: qi,\n useInsertionEffect: ni,\n useLayoutEffect: oi,\n useMemo: ti,\n useReducer: Wh,\n useRef: ji,\n useState: function () {\n return Wh(Vh);\n },\n useDebugValue: ri,\n useDeferredValue: function (a) {\n var b = Uh();\n return ui(b, N.memoizedState, a);\n },\n useTransition: function () {\n var a = Wh(Vh)[0],\n b = Uh().memoizedState;\n return [a, b];\n },\n useMutableSource: Yh,\n useSyncExternalStore: Zh,\n useId: wi,\n unstable_isNewReconciler: !1\n },\n Qh = {\n readContext: eh,\n useCallback: si,\n useContext: eh,\n useEffect: $h,\n useImperativeHandle: qi,\n useInsertionEffect: ni,\n useLayoutEffect: oi,\n useMemo: ti,\n useReducer: Xh,\n useRef: ji,\n useState: function () {\n return Xh(Vh);\n },\n useDebugValue: ri,\n useDeferredValue: function (a) {\n var b = Uh();\n return null === N ? b.memoizedState = a : ui(b, N.memoizedState, a);\n },\n useTransition: function () {\n var a = Xh(Vh)[0],\n b = Uh().memoizedState;\n return [a, b];\n },\n useMutableSource: Yh,\n useSyncExternalStore: Zh,\n useId: wi,\n unstable_isNewReconciler: !1\n };\nfunction Ci(a, b) {\n if (a && a.defaultProps) {\n b = A({}, b);\n a = a.defaultProps;\n for (var c in a) void 0 === b[c] && (b[c] = a[c]);\n return b;\n }\n return b;\n}\nfunction Di(a, b, c, d) {\n b = a.memoizedState;\n c = c(d, b);\n c = null === c || void 0 === c ? b : A({}, b, c);\n a.memoizedState = c;\n 0 === a.lanes && (a.updateQueue.baseState = c);\n}\nvar Ei = {\n isMounted: function (a) {\n return (a = a._reactInternals) ? Vb(a) === a : !1;\n },\n enqueueSetState: function (a, b, c) {\n a = a._reactInternals;\n var d = R(),\n e = yi(a),\n f = mh(d, e);\n f.payload = b;\n void 0 !== c && null !== c && (f.callback = c);\n b = nh(a, f, e);\n null !== b && (gi(b, a, e, d), oh(b, a, e));\n },\n enqueueReplaceState: function (a, b, c) {\n a = a._reactInternals;\n var d = R(),\n e = yi(a),\n f = mh(d, e);\n f.tag = 1;\n f.payload = b;\n void 0 !== c && null !== c && (f.callback = c);\n b = nh(a, f, e);\n null !== b && (gi(b, a, e, d), oh(b, a, e));\n },\n enqueueForceUpdate: function (a, b) {\n a = a._reactInternals;\n var c = R(),\n d = yi(a),\n e = mh(c, d);\n e.tag = 2;\n void 0 !== b && null !== b && (e.callback = b);\n b = nh(a, e, d);\n null !== b && (gi(b, a, d, c), oh(b, a, d));\n }\n};\nfunction Fi(a, b, c, d, e, f, g) {\n a = a.stateNode;\n return \"function\" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(d, f, g) : b.prototype && b.prototype.isPureReactComponent ? !Ie(c, d) || !Ie(e, f) : !0;\n}\nfunction Gi(a, b, c) {\n var d = !1,\n e = Vf;\n var f = b.contextType;\n \"object\" === typeof f && null !== f ? f = eh(f) : (e = Zf(b) ? Xf : H.current, d = b.contextTypes, f = (d = null !== d && void 0 !== d) ? Yf(a, e) : Vf);\n b = new b(c, f);\n a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null;\n b.updater = Ei;\n a.stateNode = b;\n b._reactInternals = a;\n d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = e, a.__reactInternalMemoizedMaskedChildContext = f);\n return b;\n}\nfunction Hi(a, b, c, d) {\n a = b.state;\n \"function\" === typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d);\n \"function\" === typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d);\n b.state !== a && Ei.enqueueReplaceState(b, b.state, null);\n}\nfunction Ii(a, b, c, d) {\n var e = a.stateNode;\n e.props = c;\n e.state = a.memoizedState;\n e.refs = {};\n kh(a);\n var f = b.contextType;\n \"object\" === typeof f && null !== f ? e.context = eh(f) : (f = Zf(b) ? Xf : H.current, e.context = Yf(a, f));\n e.state = a.memoizedState;\n f = b.getDerivedStateFromProps;\n \"function\" === typeof f && (Di(a, b, f, c), e.state = a.memoizedState);\n \"function\" === typeof b.getDerivedStateFromProps || \"function\" === typeof e.getSnapshotBeforeUpdate || \"function\" !== typeof e.UNSAFE_componentWillMount && \"function\" !== typeof e.componentWillMount || (b = e.state, \"function\" === typeof e.componentWillMount && e.componentWillMount(), \"function\" === typeof e.UNSAFE_componentWillMount && e.UNSAFE_componentWillMount(), b !== e.state && Ei.enqueueReplaceState(e, e.state, null), qh(a, c, e, d), e.state = a.memoizedState);\n \"function\" === typeof e.componentDidMount && (a.flags |= 4194308);\n}\nfunction Ji(a, b) {\n try {\n var c = \"\",\n d = b;\n do c += Pa(d), d = d.return; while (d);\n var e = c;\n } catch (f) {\n e = \"\\nError generating stack: \" + f.message + \"\\n\" + f.stack;\n }\n return {\n value: a,\n source: b,\n stack: e,\n digest: null\n };\n}\nfunction Ki(a, b, c) {\n return {\n value: a,\n source: null,\n stack: null != c ? c : null,\n digest: null != b ? b : null\n };\n}\nfunction Li(a, b) {\n try {\n console.error(b.value);\n } catch (c) {\n setTimeout(function () {\n throw c;\n });\n }\n}\nvar Mi = \"function\" === typeof WeakMap ? WeakMap : Map;\nfunction Ni(a, b, c) {\n c = mh(-1, c);\n c.tag = 3;\n c.payload = {\n element: null\n };\n var d = b.value;\n c.callback = function () {\n Oi || (Oi = !0, Pi = d);\n Li(a, b);\n };\n return c;\n}\nfunction Qi(a, b, c) {\n c = mh(-1, c);\n c.tag = 3;\n var d = a.type.getDerivedStateFromError;\n if (\"function\" === typeof d) {\n var e = b.value;\n c.payload = function () {\n return d(e);\n };\n c.callback = function () {\n Li(a, b);\n };\n }\n var f = a.stateNode;\n null !== f && \"function\" === typeof f.componentDidCatch && (c.callback = function () {\n Li(a, b);\n \"function\" !== typeof d && (null === Ri ? Ri = new Set([this]) : Ri.add(this));\n var c = b.stack;\n this.componentDidCatch(b.value, {\n componentStack: null !== c ? c : \"\"\n });\n });\n return c;\n}\nfunction Si(a, b, c) {\n var d = a.pingCache;\n if (null === d) {\n d = a.pingCache = new Mi();\n var e = new Set();\n d.set(b, e);\n } else e = d.get(b), void 0 === e && (e = new Set(), d.set(b, e));\n e.has(c) || (e.add(c), a = Ti.bind(null, a, b, c), b.then(a, a));\n}\nfunction Ui(a) {\n do {\n var b;\n if (b = 13 === a.tag) b = a.memoizedState, b = null !== b ? null !== b.dehydrated ? !0 : !1 : !0;\n if (b) return a;\n a = a.return;\n } while (null !== a);\n return null;\n}\nfunction Vi(a, b, c, d, e) {\n if (0 === (a.mode & 1)) return a === b ? a.flags |= 65536 : (a.flags |= 128, c.flags |= 131072, c.flags &= -52805, 1 === c.tag && (null === c.alternate ? c.tag = 17 : (b = mh(-1, 1), b.tag = 2, nh(c, b, 1))), c.lanes |= 1), a;\n a.flags |= 65536;\n a.lanes = e;\n return a;\n}\nvar Wi = ua.ReactCurrentOwner,\n dh = !1;\nfunction Xi(a, b, c, d) {\n b.child = null === a ? Vg(b, null, c, d) : Ug(b, a.child, c, d);\n}\nfunction Yi(a, b, c, d, e) {\n c = c.render;\n var f = b.ref;\n ch(b, e);\n d = Nh(a, b, c, d, f, e);\n c = Sh();\n if (null !== a && !dh) return b.updateQueue = a.updateQueue, b.flags &= -2053, a.lanes &= ~e, Zi(a, b, e);\n I && c && vg(b);\n b.flags |= 1;\n Xi(a, b, d, e);\n return b.child;\n}\nfunction $i(a, b, c, d, e) {\n if (null === a) {\n var f = c.type;\n if (\"function\" === typeof f && !aj(f) && void 0 === f.defaultProps && null === c.compare && void 0 === c.defaultProps) return b.tag = 15, b.type = f, bj(a, b, f, d, e);\n a = Rg(c.type, null, d, b, b.mode, e);\n a.ref = b.ref;\n a.return = b;\n return b.child = a;\n }\n f = a.child;\n if (0 === (a.lanes & e)) {\n var g = f.memoizedProps;\n c = c.compare;\n c = null !== c ? c : Ie;\n if (c(g, d) && a.ref === b.ref) return Zi(a, b, e);\n }\n b.flags |= 1;\n a = Pg(f, d);\n a.ref = b.ref;\n a.return = b;\n return b.child = a;\n}\nfunction bj(a, b, c, d, e) {\n if (null !== a) {\n var f = a.memoizedProps;\n if (Ie(f, d) && a.ref === b.ref) if (dh = !1, b.pendingProps = d = f, 0 !== (a.lanes & e)) 0 !== (a.flags & 131072) && (dh = !0);else return b.lanes = a.lanes, Zi(a, b, e);\n }\n return cj(a, b, c, d, e);\n}\nfunction dj(a, b, c) {\n var d = b.pendingProps,\n e = d.children,\n f = null !== a ? a.memoizedState : null;\n if (\"hidden\" === d.mode) {\n if (0 === (b.mode & 1)) b.memoizedState = {\n baseLanes: 0,\n cachePool: null,\n transitions: null\n }, G(ej, fj), fj |= c;else {\n if (0 === (c & 1073741824)) return a = null !== f ? f.baseLanes | c : c, b.lanes = b.childLanes = 1073741824, b.memoizedState = {\n baseLanes: a,\n cachePool: null,\n transitions: null\n }, b.updateQueue = null, G(ej, fj), fj |= a, null;\n b.memoizedState = {\n baseLanes: 0,\n cachePool: null,\n transitions: null\n };\n d = null !== f ? f.baseLanes : c;\n G(ej, fj);\n fj |= d;\n }\n } else null !== f ? (d = f.baseLanes | c, b.memoizedState = null) : d = c, G(ej, fj), fj |= d;\n Xi(a, b, e, c);\n return b.child;\n}\nfunction gj(a, b) {\n var c = b.ref;\n if (null === a && null !== c || null !== a && a.ref !== c) b.flags |= 512, b.flags |= 2097152;\n}\nfunction cj(a, b, c, d, e) {\n var f = Zf(c) ? Xf : H.current;\n f = Yf(b, f);\n ch(b, e);\n c = Nh(a, b, c, d, f, e);\n d = Sh();\n if (null !== a && !dh) return b.updateQueue = a.updateQueue, b.flags &= -2053, a.lanes &= ~e, Zi(a, b, e);\n I && d && vg(b);\n b.flags |= 1;\n Xi(a, b, c, e);\n return b.child;\n}\nfunction hj(a, b, c, d, e) {\n if (Zf(c)) {\n var f = !0;\n cg(b);\n } else f = !1;\n ch(b, e);\n if (null === b.stateNode) ij(a, b), Gi(b, c, d), Ii(b, c, d, e), d = !0;else if (null === a) {\n var g = b.stateNode,\n h = b.memoizedProps;\n g.props = h;\n var k = g.context,\n l = c.contextType;\n \"object\" === typeof l && null !== l ? l = eh(l) : (l = Zf(c) ? Xf : H.current, l = Yf(b, l));\n var m = c.getDerivedStateFromProps,\n q = \"function\" === typeof m || \"function\" === typeof g.getSnapshotBeforeUpdate;\n q || \"function\" !== typeof g.UNSAFE_componentWillReceiveProps && \"function\" !== typeof g.componentWillReceiveProps || (h !== d || k !== l) && Hi(b, g, d, l);\n jh = !1;\n var r = b.memoizedState;\n g.state = r;\n qh(b, d, g, e);\n k = b.memoizedState;\n h !== d || r !== k || Wf.current || jh ? (\"function\" === typeof m && (Di(b, c, m, d), k = b.memoizedState), (h = jh || Fi(b, c, h, d, r, k, l)) ? (q || \"function\" !== typeof g.UNSAFE_componentWillMount && \"function\" !== typeof g.componentWillMount || (\"function\" === typeof g.componentWillMount && g.componentWillMount(), \"function\" === typeof g.UNSAFE_componentWillMount && g.UNSAFE_componentWillMount()), \"function\" === typeof g.componentDidMount && (b.flags |= 4194308)) : (\"function\" === typeof g.componentDidMount && (b.flags |= 4194308), b.memoizedProps = d, b.memoizedState = k), g.props = d, g.state = k, g.context = l, d = h) : (\"function\" === typeof g.componentDidMount && (b.flags |= 4194308), d = !1);\n } else {\n g = b.stateNode;\n lh(a, b);\n h = b.memoizedProps;\n l = b.type === b.elementType ? h : Ci(b.type, h);\n g.props = l;\n q = b.pendingProps;\n r = g.context;\n k = c.contextType;\n \"object\" === typeof k && null !== k ? k = eh(k) : (k = Zf(c) ? Xf : H.current, k = Yf(b, k));\n var y = c.getDerivedStateFromProps;\n (m = \"function\" === typeof y || \"function\" === typeof g.getSnapshotBeforeUpdate) || \"function\" !== typeof g.UNSAFE_componentWillReceiveProps && \"function\" !== typeof g.componentWillReceiveProps || (h !== q || r !== k) && Hi(b, g, d, k);\n jh = !1;\n r = b.memoizedState;\n g.state = r;\n qh(b, d, g, e);\n var n = b.memoizedState;\n h !== q || r !== n || Wf.current || jh ? (\"function\" === typeof y && (Di(b, c, y, d), n = b.memoizedState), (l = jh || Fi(b, c, l, d, r, n, k) || !1) ? (m || \"function\" !== typeof g.UNSAFE_componentWillUpdate && \"function\" !== typeof g.componentWillUpdate || (\"function\" === typeof g.componentWillUpdate && g.componentWillUpdate(d, n, k), \"function\" === typeof g.UNSAFE_componentWillUpdate && g.UNSAFE_componentWillUpdate(d, n, k)), \"function\" === typeof g.componentDidUpdate && (b.flags |= 4), \"function\" === typeof g.getSnapshotBeforeUpdate && (b.flags |= 1024)) : (\"function\" !== typeof g.componentDidUpdate || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 4), \"function\" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 1024), b.memoizedProps = d, b.memoizedState = n), g.props = d, g.state = n, g.context = k, d = l) : (\"function\" !== typeof g.componentDidUpdate || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 4), \"function\" !== typeof g.getSnapshotBeforeUpdate || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 1024), d = !1);\n }\n return jj(a, b, c, d, f, e);\n}\nfunction jj(a, b, c, d, e, f) {\n gj(a, b);\n var g = 0 !== (b.flags & 128);\n if (!d && !g) return e && dg(b, c, !1), Zi(a, b, f);\n d = b.stateNode;\n Wi.current = b;\n var h = g && \"function\" !== typeof c.getDerivedStateFromError ? null : d.render();\n b.flags |= 1;\n null !== a && g ? (b.child = Ug(b, a.child, null, f), b.child = Ug(b, null, h, f)) : Xi(a, b, h, f);\n b.memoizedState = d.state;\n e && dg(b, c, !0);\n return b.child;\n}\nfunction kj(a) {\n var b = a.stateNode;\n b.pendingContext ? ag(a, b.pendingContext, b.pendingContext !== b.context) : b.context && ag(a, b.context, !1);\n yh(a, b.containerInfo);\n}\nfunction lj(a, b, c, d, e) {\n Ig();\n Jg(e);\n b.flags |= 256;\n Xi(a, b, c, d);\n return b.child;\n}\nvar mj = {\n dehydrated: null,\n treeContext: null,\n retryLane: 0\n};\nfunction nj(a) {\n return {\n baseLanes: a,\n cachePool: null,\n transitions: null\n };\n}\nfunction oj(a, b, c) {\n var d = b.pendingProps,\n e = L.current,\n f = !1,\n g = 0 !== (b.flags & 128),\n h;\n (h = g) || (h = null !== a && null === a.memoizedState ? !1 : 0 !== (e & 2));\n if (h) f = !0, b.flags &= -129;else if (null === a || null !== a.memoizedState) e |= 1;\n G(L, e & 1);\n if (null === a) {\n Eg(b);\n a = b.memoizedState;\n if (null !== a && (a = a.dehydrated, null !== a)) return 0 === (b.mode & 1) ? b.lanes = 1 : \"$!\" === a.data ? b.lanes = 8 : b.lanes = 1073741824, null;\n g = d.children;\n a = d.fallback;\n return f ? (d = b.mode, f = b.child, g = {\n mode: \"hidden\",\n children: g\n }, 0 === (d & 1) && null !== f ? (f.childLanes = 0, f.pendingProps = g) : f = pj(g, d, 0, null), a = Tg(a, d, c, null), f.return = b, a.return = b, f.sibling = a, b.child = f, b.child.memoizedState = nj(c), b.memoizedState = mj, a) : qj(b, g);\n }\n e = a.memoizedState;\n if (null !== e && (h = e.dehydrated, null !== h)) return rj(a, b, g, d, h, e, c);\n if (f) {\n f = d.fallback;\n g = b.mode;\n e = a.child;\n h = e.sibling;\n var k = {\n mode: \"hidden\",\n children: d.children\n };\n 0 === (g & 1) && b.child !== e ? (d = b.child, d.childLanes = 0, d.pendingProps = k, b.deletions = null) : (d = Pg(e, k), d.subtreeFlags = e.subtreeFlags & 14680064);\n null !== h ? f = Pg(h, f) : (f = Tg(f, g, c, null), f.flags |= 2);\n f.return = b;\n d.return = b;\n d.sibling = f;\n b.child = d;\n d = f;\n f = b.child;\n g = a.child.memoizedState;\n g = null === g ? nj(c) : {\n baseLanes: g.baseLanes | c,\n cachePool: null,\n transitions: g.transitions\n };\n f.memoizedState = g;\n f.childLanes = a.childLanes & ~c;\n b.memoizedState = mj;\n return d;\n }\n f = a.child;\n a = f.sibling;\n d = Pg(f, {\n mode: \"visible\",\n children: d.children\n });\n 0 === (b.mode & 1) && (d.lanes = c);\n d.return = b;\n d.sibling = null;\n null !== a && (c = b.deletions, null === c ? (b.deletions = [a], b.flags |= 16) : c.push(a));\n b.child = d;\n b.memoizedState = null;\n return d;\n}\nfunction qj(a, b) {\n b = pj({\n mode: \"visible\",\n children: b\n }, a.mode, 0, null);\n b.return = a;\n return a.child = b;\n}\nfunction sj(a, b, c, d) {\n null !== d && Jg(d);\n Ug(b, a.child, null, c);\n a = qj(b, b.pendingProps.children);\n a.flags |= 2;\n b.memoizedState = null;\n return a;\n}\nfunction rj(a, b, c, d, e, f, g) {\n if (c) {\n if (b.flags & 256) return b.flags &= -257, d = Ki(Error(p(422))), sj(a, b, g, d);\n if (null !== b.memoizedState) return b.child = a.child, b.flags |= 128, null;\n f = d.fallback;\n e = b.mode;\n d = pj({\n mode: \"visible\",\n children: d.children\n }, e, 0, null);\n f = Tg(f, e, g, null);\n f.flags |= 2;\n d.return = b;\n f.return = b;\n d.sibling = f;\n b.child = d;\n 0 !== (b.mode & 1) && Ug(b, a.child, null, g);\n b.child.memoizedState = nj(g);\n b.memoizedState = mj;\n return f;\n }\n if (0 === (b.mode & 1)) return sj(a, b, g, null);\n if (\"$!\" === e.data) {\n d = e.nextSibling && e.nextSibling.dataset;\n if (d) var h = d.dgst;\n d = h;\n f = Error(p(419));\n d = Ki(f, d, void 0);\n return sj(a, b, g, d);\n }\n h = 0 !== (g & a.childLanes);\n if (dh || h) {\n d = Q;\n if (null !== d) {\n switch (g & -g) {\n case 4:\n e = 2;\n break;\n case 16:\n e = 8;\n break;\n case 64:\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n case 67108864:\n e = 32;\n break;\n case 536870912:\n e = 268435456;\n break;\n default:\n e = 0;\n }\n e = 0 !== (e & (d.suspendedLanes | g)) ? 0 : e;\n 0 !== e && e !== f.retryLane && (f.retryLane = e, ih(a, e), gi(d, a, e, -1));\n }\n tj();\n d = Ki(Error(p(421)));\n return sj(a, b, g, d);\n }\n if (\"$?\" === e.data) return b.flags |= 128, b.child = a.child, b = uj.bind(null, a), e._reactRetry = b, null;\n a = f.treeContext;\n yg = Lf(e.nextSibling);\n xg = b;\n I = !0;\n zg = null;\n null !== a && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a.id, sg = a.overflow, qg = b);\n b = qj(b, d.children);\n b.flags |= 4096;\n return b;\n}\nfunction vj(a, b, c) {\n a.lanes |= b;\n var d = a.alternate;\n null !== d && (d.lanes |= b);\n bh(a.return, b, c);\n}\nfunction wj(a, b, c, d, e) {\n var f = a.memoizedState;\n null === f ? a.memoizedState = {\n isBackwards: b,\n rendering: null,\n renderingStartTime: 0,\n last: d,\n tail: c,\n tailMode: e\n } : (f.isBackwards = b, f.rendering = null, f.renderingStartTime = 0, f.last = d, f.tail = c, f.tailMode = e);\n}\nfunction xj(a, b, c) {\n var d = b.pendingProps,\n e = d.revealOrder,\n f = d.tail;\n Xi(a, b, d.children, c);\n d = L.current;\n if (0 !== (d & 2)) d = d & 1 | 2, b.flags |= 128;else {\n if (null !== a && 0 !== (a.flags & 128)) a: for (a = b.child; null !== a;) {\n if (13 === a.tag) null !== a.memoizedState && vj(a, c, b);else if (19 === a.tag) vj(a, c, b);else if (null !== a.child) {\n a.child.return = a;\n a = a.child;\n continue;\n }\n if (a === b) break a;\n for (; null === a.sibling;) {\n if (null === a.return || a.return === b) break a;\n a = a.return;\n }\n a.sibling.return = a.return;\n a = a.sibling;\n }\n d &= 1;\n }\n G(L, d);\n if (0 === (b.mode & 1)) b.memoizedState = null;else switch (e) {\n case \"forwards\":\n c = b.child;\n for (e = null; null !== c;) a = c.alternate, null !== a && null === Ch(a) && (e = c), c = c.sibling;\n c = e;\n null === c ? (e = b.child, b.child = null) : (e = c.sibling, c.sibling = null);\n wj(b, !1, e, c, f);\n break;\n case \"backwards\":\n c = null;\n e = b.child;\n for (b.child = null; null !== e;) {\n a = e.alternate;\n if (null !== a && null === Ch(a)) {\n b.child = e;\n break;\n }\n a = e.sibling;\n e.sibling = c;\n c = e;\n e = a;\n }\n wj(b, !0, c, null, f);\n break;\n case \"together\":\n wj(b, !1, null, null, void 0);\n break;\n default:\n b.memoizedState = null;\n }\n return b.child;\n}\nfunction ij(a, b) {\n 0 === (b.mode & 1) && null !== a && (a.alternate = null, b.alternate = null, b.flags |= 2);\n}\nfunction Zi(a, b, c) {\n null !== a && (b.dependencies = a.dependencies);\n rh |= b.lanes;\n if (0 === (c & b.childLanes)) return null;\n if (null !== a && b.child !== a.child) throw Error(p(153));\n if (null !== b.child) {\n a = b.child;\n c = Pg(a, a.pendingProps);\n b.child = c;\n for (c.return = b; null !== a.sibling;) a = a.sibling, c = c.sibling = Pg(a, a.pendingProps), c.return = b;\n c.sibling = null;\n }\n return b.child;\n}\nfunction yj(a, b, c) {\n switch (b.tag) {\n case 3:\n kj(b);\n Ig();\n break;\n case 5:\n Ah(b);\n break;\n case 1:\n Zf(b.type) && cg(b);\n break;\n case 4:\n yh(b, b.stateNode.containerInfo);\n break;\n case 10:\n var d = b.type._context,\n e = b.memoizedProps.value;\n G(Wg, d._currentValue);\n d._currentValue = e;\n break;\n case 13:\n d = b.memoizedState;\n if (null !== d) {\n if (null !== d.dehydrated) return G(L, L.current & 1), b.flags |= 128, null;\n if (0 !== (c & b.child.childLanes)) return oj(a, b, c);\n G(L, L.current & 1);\n a = Zi(a, b, c);\n return null !== a ? a.sibling : null;\n }\n G(L, L.current & 1);\n break;\n case 19:\n d = 0 !== (c & b.childLanes);\n if (0 !== (a.flags & 128)) {\n if (d) return xj(a, b, c);\n b.flags |= 128;\n }\n e = b.memoizedState;\n null !== e && (e.rendering = null, e.tail = null, e.lastEffect = null);\n G(L, L.current);\n if (d) break;else return null;\n case 22:\n case 23:\n return b.lanes = 0, dj(a, b, c);\n }\n return Zi(a, b, c);\n}\nvar zj, Aj, Bj, Cj;\nzj = function (a, b) {\n for (var c = b.child; null !== c;) {\n if (5 === c.tag || 6 === c.tag) a.appendChild(c.stateNode);else if (4 !== c.tag && null !== c.child) {\n c.child.return = c;\n c = c.child;\n continue;\n }\n if (c === b) break;\n for (; null === c.sibling;) {\n if (null === c.return || c.return === b) return;\n c = c.return;\n }\n c.sibling.return = c.return;\n c = c.sibling;\n }\n};\nAj = function () {};\nBj = function (a, b, c, d) {\n var e = a.memoizedProps;\n if (e !== d) {\n a = b.stateNode;\n xh(uh.current);\n var f = null;\n switch (c) {\n case \"input\":\n e = Ya(a, e);\n d = Ya(a, d);\n f = [];\n break;\n case \"select\":\n e = A({}, e, {\n value: void 0\n });\n d = A({}, d, {\n value: void 0\n });\n f = [];\n break;\n case \"textarea\":\n e = gb(a, e);\n d = gb(a, d);\n f = [];\n break;\n default:\n \"function\" !== typeof e.onClick && \"function\" === typeof d.onClick && (a.onclick = Bf);\n }\n ub(c, d);\n var g;\n c = null;\n for (l in e) if (!d.hasOwnProperty(l) && e.hasOwnProperty(l) && null != e[l]) if (\"style\" === l) {\n var h = e[l];\n for (g in h) h.hasOwnProperty(g) && (c || (c = {}), c[g] = \"\");\n } else \"dangerouslySetInnerHTML\" !== l && \"children\" !== l && \"suppressContentEditableWarning\" !== l && \"suppressHydrationWarning\" !== l && \"autoFocus\" !== l && (ea.hasOwnProperty(l) ? f || (f = []) : (f = f || []).push(l, null));\n for (l in d) {\n var k = d[l];\n h = null != e ? e[l] : void 0;\n if (d.hasOwnProperty(l) && k !== h && (null != k || null != h)) if (\"style\" === l) {\n if (h) {\n for (g in h) !h.hasOwnProperty(g) || k && k.hasOwnProperty(g) || (c || (c = {}), c[g] = \"\");\n for (g in k) k.hasOwnProperty(g) && h[g] !== k[g] && (c || (c = {}), c[g] = k[g]);\n } else c || (f || (f = []), f.push(l, c)), c = k;\n } else \"dangerouslySetInnerHTML\" === l ? (k = k ? k.__html : void 0, h = h ? h.__html : void 0, null != k && h !== k && (f = f || []).push(l, k)) : \"children\" === l ? \"string\" !== typeof k && \"number\" !== typeof k || (f = f || []).push(l, \"\" + k) : \"suppressContentEditableWarning\" !== l && \"suppressHydrationWarning\" !== l && (ea.hasOwnProperty(l) ? (null != k && \"onScroll\" === l && D(\"scroll\", a), f || h === k || (f = [])) : (f = f || []).push(l, k));\n }\n c && (f = f || []).push(\"style\", c);\n var l = f;\n if (b.updateQueue = l) b.flags |= 4;\n }\n};\nCj = function (a, b, c, d) {\n c !== d && (b.flags |= 4);\n};\nfunction Dj(a, b) {\n if (!I) switch (a.tailMode) {\n case \"hidden\":\n b = a.tail;\n for (var c = null; null !== b;) null !== b.alternate && (c = b), b = b.sibling;\n null === c ? a.tail = null : c.sibling = null;\n break;\n case \"collapsed\":\n c = a.tail;\n for (var d = null; null !== c;) null !== c.alternate && (d = c), c = c.sibling;\n null === d ? b || null === a.tail ? a.tail = null : a.tail.sibling = null : d.sibling = null;\n }\n}\nfunction S(a) {\n var b = null !== a.alternate && a.alternate.child === a.child,\n c = 0,\n d = 0;\n if (b) for (var e = a.child; null !== e;) c |= e.lanes | e.childLanes, d |= e.subtreeFlags & 14680064, d |= e.flags & 14680064, e.return = a, e = e.sibling;else for (e = a.child; null !== e;) c |= e.lanes | e.childLanes, d |= e.subtreeFlags, d |= e.flags, e.return = a, e = e.sibling;\n a.subtreeFlags |= d;\n a.childLanes = c;\n return b;\n}\nfunction Ej(a, b, c) {\n var d = b.pendingProps;\n wg(b);\n switch (b.tag) {\n case 2:\n case 16:\n case 15:\n case 0:\n case 11:\n case 7:\n case 8:\n case 12:\n case 9:\n case 14:\n return S(b), null;\n case 1:\n return Zf(b.type) && $f(), S(b), null;\n case 3:\n d = b.stateNode;\n zh();\n E(Wf);\n E(H);\n Eh();\n d.pendingContext && (d.context = d.pendingContext, d.pendingContext = null);\n if (null === a || null === a.child) Gg(b) ? b.flags |= 4 : null === a || a.memoizedState.isDehydrated && 0 === (b.flags & 256) || (b.flags |= 1024, null !== zg && (Fj(zg), zg = null));\n Aj(a, b);\n S(b);\n return null;\n case 5:\n Bh(b);\n var e = xh(wh.current);\n c = b.type;\n if (null !== a && null != b.stateNode) Bj(a, b, c, d, e), a.ref !== b.ref && (b.flags |= 512, b.flags |= 2097152);else {\n if (!d) {\n if (null === b.stateNode) throw Error(p(166));\n S(b);\n return null;\n }\n a = xh(uh.current);\n if (Gg(b)) {\n d = b.stateNode;\n c = b.type;\n var f = b.memoizedProps;\n d[Of] = b;\n d[Pf] = f;\n a = 0 !== (b.mode & 1);\n switch (c) {\n case \"dialog\":\n D(\"cancel\", d);\n D(\"close\", d);\n break;\n case \"iframe\":\n case \"object\":\n case \"embed\":\n D(\"load\", d);\n break;\n case \"video\":\n case \"audio\":\n for (e = 0; e < lf.length; e++) D(lf[e], d);\n break;\n case \"source\":\n D(\"error\", d);\n break;\n case \"img\":\n case \"image\":\n case \"link\":\n D(\"error\", d);\n D(\"load\", d);\n break;\n case \"details\":\n D(\"toggle\", d);\n break;\n case \"input\":\n Za(d, f);\n D(\"invalid\", d);\n break;\n case \"select\":\n d._wrapperState = {\n wasMultiple: !!f.multiple\n };\n D(\"invalid\", d);\n break;\n case \"textarea\":\n hb(d, f), D(\"invalid\", d);\n }\n ub(c, f);\n e = null;\n for (var g in f) if (f.hasOwnProperty(g)) {\n var h = f[g];\n \"children\" === g ? \"string\" === typeof h ? d.textContent !== h && (!0 !== f.suppressHydrationWarning && Af(d.textContent, h, a), e = [\"children\", h]) : \"number\" === typeof h && d.textContent !== \"\" + h && (!0 !== f.suppressHydrationWarning && Af(d.textContent, h, a), e = [\"children\", \"\" + h]) : ea.hasOwnProperty(g) && null != h && \"onScroll\" === g && D(\"scroll\", d);\n }\n switch (c) {\n case \"input\":\n Va(d);\n db(d, f, !0);\n break;\n case \"textarea\":\n Va(d);\n jb(d);\n break;\n case \"select\":\n case \"option\":\n break;\n default:\n \"function\" === typeof f.onClick && (d.onclick = Bf);\n }\n d = e;\n b.updateQueue = d;\n null !== d && (b.flags |= 4);\n } else {\n g = 9 === e.nodeType ? e : e.ownerDocument;\n \"http://www.w3.org/1999/xhtml\" === a && (a = kb(c));\n \"http://www.w3.org/1999/xhtml\" === a ? \"script\" === c ? (a = g.createElement(\"div\"), a.innerHTML = \"\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n`;\r\n }\r\n}\r\n","import { Component, AfterViewInit, ViewChild, ElementRef } from '@angular/core';\r\nimport { HttpHeaders, HttpResponse } from '@angular/common/http';\r\nimport { Config } from '@config';\r\nimport { LoaderService } from '@loader';\r\nimport { LoaderService as ScriptLoader, FileTypes } from '@tools';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { __i18n, LanguageService } from '@localisation';\r\nimport { AuthHttp } from '@http';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { ContentLoader } from '@winforms';\r\nimport { HttpParams } from '@angular/common/http';\r\nimport { map, timeout } from 'rxjs/operators';\r\nimport { ButtonStates } from '@forms/clx-forms/controls/clx.button.component';\r\nimport { DataChangesHandlerService } from '@check'\r\nimport { lastValueFrom } from 'rxjs';\r\nconst win = window as any;\r\n\r\n@Component({\n selector: 'scheduler-page',\n templateUrl: './scheduler.template.html',\n standalone: false\n})\r\nexport class SchedulerComponent implements AfterViewInit {\r\n\r\n isLoading: boolean = true;\r\n schedulers: any = null;\r\n hasSchedulers: boolean = false;\r\n saveState: ButtonStates = null;\r\n\r\n constructor(\r\n public config: Config,\r\n private loader: LoaderService,\r\n private messageService: MessagesService,\r\n private urlEnhancer: UrlEnhancerService,\r\n private http: AuthHttp,\r\n private scriptLoader: ScriptLoader,\r\n private languageService: LanguageService,\r\n private contentLoaderService: ContentLoader,\r\n private dataChangesHandlerService: DataChangesHandlerService\r\n ) {\r\n }\r\n\r\n private async fetchCommandStatus(commandId: number, resolve: () => void, reject: (reason?: any) => void) {\r\n try {\r\n const data = await lastValueFrom(this.http.post(this.urlEnhancer.replaceParams(\r\n this.config.services.plant.plantSchedulersGetDataPointCommandStatus, {commandId}), null)\r\n .pipe(map((e: any) => {\r\n if (e instanceof HttpResponse) {\r\n return JSON.parse(e.body);\r\n }\r\n })));\r\n switch (data.Status) {\r\n case -1:\r\n case 0:\r\n setTimeout(() => this.fetchCommandStatus(commandId, resolve, reject), 1000);\r\n break;\r\n\r\n case 1:\r\n if (typeof data.Result === 'string') {\r\n const result = JSON.parse(data.Result);\r\n if (result.success) {\r\n resolve();\r\n } else {\r\n if (Array.isArray(result.descr)) {\r\n let lngIdx = this.schedulers.languageIndex;\r\n if (lngIdx < 0 || lngIdx >= result.descr.length || !result.descr[lngIdx]) {\r\n lngIdx = 0;\r\n }\r\n reject(result.descr[lngIdx]);\r\n }\r\n }\r\n } else {\r\n setTimeout(() => this.fetchCommandStatus(commandId, resolve, reject), 1000);\r\n }\r\n break;\r\n\r\n case 2:\r\n reject(__i18n('The command timed out.', 'operating.scheduler.status.text.commandtimedout'));\r\n break;\r\n\r\n default:\r\n reject(__i18n('Unexpected result received.', 'operating.scheduler.status.text.unexpectedresult'));\r\n }\r\n } catch (e) {\r\n reject(e);\r\n }\r\n }\r\n\r\n private async resolveCommandStatus(commandId: number): Promise {\r\n const p = new Promise((resolve, reject) => {\r\n this.fetchCommandStatus(commandId, resolve, reject);\r\n });\r\n return p;\r\n }\r\n\r\n public async save() {\r\n this.messageService.deleteTargetMessages('scheduler-save-message');\r\n const loaderId = this.loader.start();\r\n this.loader.setText(__i18n('Saving schedulers, please wait...', 'operating.scheduler.loader.text.savingschedulers'));\r\n this.saveState = ButtonStates.loading;\r\n try {\r\n const result = await lastValueFrom(this.http.post(this.urlEnhancer.replaceParams(this.config.services.plant.plantSchedulersSave), {})\r\n .pipe(map((e: any) => {\r\n if (e instanceof HttpResponse) {\r\n return JSON.parse(e.body);\r\n }\r\n })));\r\n if (typeof result.commandIds === 'undefined' && !win.parseAjaxResult(result)) {\r\n this.messageService.addMessage({\r\n target: 'scheduler-save-message',\r\n type: MessageType.error,\r\n text: __i18n('Unexpected result received.', 'operating.scheduler.status.text.unexpectedresult')\r\n });\r\n this.loader.stop(loaderId);\r\n this.saveState = null;\r\n } else {\r\n if (Array.isArray(result.commandIds) && result.commandIds.length > 0) {\r\n const promises = result.commandIds.map(cid => this.resolveCommandStatus(cid));\r\n try {\r\n await Promise.all(promises);\r\n this.messageService.addMessage({\r\n target: 'scheduler-save-message',\r\n type: MessageType.success,\r\n text: __i18n('The scheduler data was successfully saved.', 'operating.scheduler.message.successfullysaved')\r\n });\r\n this.dataChangesHandlerService.markAsClean();\r\n this.loader.stop(loaderId);\r\n const reloaderId = this.loader.start();\r\n this.loader.setText(__i18n('Reloading scheduler data, please wait.', 'operating.scheduler.loader.text.reloadingschedulers'));\r\n setTimeout(async() => {\r\n try {\r\n await this.reloadSchedulerData(true, true);\r\n } catch (e) {\r\n // ignored\r\n }\r\n this.loader.stop(reloaderId);\r\n this.saveState = null;\r\n }, 5000);\r\n } catch (ex) {\r\n this.messageService.addMessage({\r\n target: 'scheduler-save-message',\r\n type: MessageType.error,\r\n text: typeof ex === 'string' ? ex : __i18n('Failed to save the scheduler data. Please try again.', 'operating.scheduler.message.savefailed')\r\n });\r\n this.loader.stop(loaderId);\r\n this.saveState = null;\r\n }\r\n } else {\r\n this.messageService.addMessage({\r\n target: 'scheduler-save-message',\r\n type: MessageType.info,\r\n text: __i18n('There are no changes to save.', 'operating.scheduler.message.nochangestosave')\r\n });\r\n this.loader.stop(loaderId);\r\n this.saveState = null;\r\n }\r\n if (result.warningForUnsavedObjects) {\r\n this.messageService.addMessage({\r\n type: MessageType.info,\r\n text: __i18n('One or more schedulers cannot be saved. You do not have sufficient permissions.',\r\n 'operating.scheduler.message.schedulercannotbesaved')\r\n });\r\n }\r\n }\r\n } catch (e) {\r\n this.messageService.addMessage({\r\n target: 'scheduler-save-message',\r\n type: MessageType.error,\r\n text: typeof e === 'string' ? e : __i18n('Cannot save schedulers data. Please try again.', 'operating.scheduler.status.text.cannotsaveschedulerdata')\r\n });\r\n this.loader.stop(loaderId);\r\n this.saveState = null;\r\n }\r\n }\r\n\r\n async ngAfterViewInit(): Promise {\r\n\r\n const loaderId = this.loader.start();\r\n this.loader.setText(__i18n('loading schedulers', 'operating.scheduler.loader.text.loadingschedulers'));\r\n\r\n await this.contentLoaderService.loadMvcScripts();\r\n await this.scriptLoader.loadFiles([\r\n '/bundles/ba/scheduler',\r\n this.languageService.language.indexOf('de') === 0\r\n ? '/bundles/ba/scheduler/de'\r\n : '/bundles/ba/scheduler/en'\r\n ], FileTypes.script);\r\n\r\n this.initBaScheduler();\r\n this.loader.stop(loaderId);\r\n\r\n this.reloadSchedulerData(true, true);\r\n }\r\n\r\n private async reloadSchedulerData(forceReload: boolean, bypassCache: boolean): Promise {\r\n const loaderId = this.loader.start();\r\n this.loader.setText(__i18n('loading schedulers', 'operating.scheduler.loader.text.loadingschedulers'));\r\n this.isLoading = true;\r\n\r\n try {\r\n this.schedulers = await lastValueFrom(this.http.getJSON(this.urlEnhancer.replaceParams(this.config.services.plant.plantSchedulers, {bypasscache: bypassCache})));\r\n this.hasSchedulers = !!this.schedulers?.clientRepresentationModel?.operateModel?.schedulerModel?.length;\r\n this.loader.stop(loaderId);\r\n this.isLoading = false;\r\n } catch(e) {\r\n this.schedulers = null;\r\n this.hasSchedulers = false;\r\n this.loader.stopAll();\r\n this.isLoading = false;\r\n this.messageService.addMessage({\r\n type: MessageType.error,\r\n text: __i18n('An error occurred while fetching the schedulers data.', 'operating.scheduler.message.errorfetchingschedulersdata')\r\n });\r\n }\r\n if (this.schedulers !== null) {\r\n const $ = win.$;\r\n const schedulerWidget = $('#scheduler-overview').data().widget;\r\n if (schedulerWidget === undefined) {\r\n const tool = $('#tools-area').addWidget('toolsArea').data().widget;\r\n $('#scheduler-overview').addWidget('schedulerView', {\r\n viewModel: this.schedulers,\r\n toolsArea: tool\r\n });\r\n } else {\r\n schedulerWidget.updateView(this.schedulers, forceReload);\r\n }\r\n }\r\n }\r\n\r\n private postify(data: any): HttpParams {\r\n let result = new HttpParams();\r\n\r\n const buildResult = (object, prefix) => {\r\n for (const key in object) {\r\n if (object.hasOwnProperty(key)) {\r\n const postKey = isFinite(Number(key))\r\n ? (prefix !== '' ? prefix : '') + '[' + key + ']'\r\n : (prefix !== '' ? prefix + '.' : '') + key;\r\n\r\n switch (typeof (object[key])) {\r\n case 'number': case 'string': case 'boolean':\r\n result = result.set(postKey, object[key]);\r\n break;\r\n\r\n case 'object':\r\n if (object[key]) {\r\n if (object[key].toUTCString) {\r\n result = result.set(postKey, object[key].toUTCString().replace('UTC', 'GMT'));\r\n } else {\r\n buildResult(object[key], postKey !== '' ? postKey : key);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n buildResult(data, '');\r\n\r\n return result;\r\n }\r\n\r\n private async serverOperation(urlPattern: string, data: any) {\r\n this.messageService.deleteTargetMessages('scheduler-save-message');\r\n let loaderId;\r\n const schedulerWidget = $('#scheduler-overview').data().widget;\r\n const body = this.postify(data);\r\n try {\r\n loaderId = this.loader.start();\r\n const headers = new HttpHeaders({'Content-type': 'application/x-www-form-urlencoded'});\r\n const schedulerModel = await lastValueFrom(this.http.post(this.urlEnhancer.replaceParams(urlPattern), body.toString(), {headers})\r\n .pipe(map((e: any) => {\r\n if (e instanceof HttpResponse) {\r\n return JSON.parse(e.body);\r\n }\r\n })));\r\n if (!win.parseAjaxResult(schedulerModel)) {\r\n this.schedulers = schedulerModel;\r\n this.hasSchedulers = !!this.schedulers?.clientRepresentationModel?.operateModel?.schedulerModel?.length;\r\n this.dataChangesHandlerService.markAsDirty();\r\n }\r\n schedulerWidget.updateView(this.schedulers, false);\r\n this.loader.stop(loaderId);\r\n } catch (e) {\r\n this.loader.stop(loaderId);\r\n this.messageService.addMessage({\r\n type: MessageType.error,\r\n text: __i18n('The operation failed. Please try again.', 'operating.scheduler.message.operationfailed')\r\n });\r\n schedulerWidget.updateView(this.schedulers, false);\r\n throw e;\r\n }\r\n }\r\n\r\n private initBaScheduler() {\r\n const $ = win.jQuery;\r\n\r\n $.ba.scheduler = () => {\r\n return {\r\n setPhaseForDay: async(schedulerId, day, startTime, endTime, value) => {\r\n const body = { schedulerId, day, startTime, endTime, value };\r\n await this.serverOperation(this.config.services.plant.plantSchedulersSetPhaseForDay, body);\r\n },\r\n changePhaseForDay: async(schedulerId, day, prevStartTime, newStartTime, newEndTime, value) => {\r\n const body = {schedulerId, day, prevStartTime, newStartTime, newEndTime, value};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersChangePhaseForDay, body);\r\n },\r\n deletePhaseForDay: async(schedulerId, day, startTime) => {\r\n const body = {schedulerId, day, startTime};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersDeletePhaseForDay, body);\r\n },\r\n copyDailyProfile: async(schedulerId, sourceDay, destinationDays) => {\r\n const body = {schedulerId, sourceDay, destinationDays};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersCopyDailyProfile, body);\r\n },\r\n requestExceptionMonths: async(schedulerId, startYear, startMonth, numberOfMonths, completehandler) => {\r\n const body = {schedulerId, startYear, startMonth, numberOfMonths, completehandler};\r\n try {\r\n await this.serverOperation(this.config.services.plant.plantSchedulersRequestExceptionMonths, body);\r\n } catch (e) {\r\n console.error('Exception in \"requestExceptionMonths\": ' + e);\r\n }\r\n completehandler();\r\n },\r\n deleteSpecialEvent: async(schedulerId, specialEventId) => {\r\n const body = {schedulerId, specialEventId};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersDeleteSpecialEvent, body);\r\n },\r\n changeDateException: async(schedulerId, specialEventId, date) => {\r\n const body = {schedulerId, specialEventId, date};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersChangeDateException, body);\r\n },\r\n setDateRange: async(schedulerId, startDate, endDate) => {\r\n const body = {schedulerId, startDate, endDate};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersSetDateRange, body);\r\n },\r\n copySpecialEventProfile: async(schedulerId, specialEventId, destDates) => {\r\n const body = {schedulerId, specialEventId, destDates};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersCopySpecialEventProfile, body);\r\n },\r\n createWeekNDayException: async(schedulerId, weekNDayDetails, startTime, endTime, value, successhandler) => {\r\n const body = {schedulerId, weekNDayDetails, startTime, endTime, value, successhandler};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersCreateWeekNDayException, body);\r\n successhandler();\r\n },\r\n changeWeekNDayException: async(schedulerId, specialEventId, weekNDayDetails) => {\r\n const body = {schedulerId, specialEventId, weekNDayDetails};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersChangeWeekNDayException, body);\r\n },\r\n createDateException: async(schedulerId, date, startTime, endTime, value, successhandler) => {\r\n const body = {schedulerId, date, startTime, endTime, value, successhandler};\r\n await this.serverOperation(this.config.services.plant.plantSchedulersCreateDateException, body);\r\n successhandler();\r\n },\r\n displaySuccessMessage: (successText) => {\r\n this.messageService.addMessage({\r\n type: MessageType.success,\r\n text: successText\r\n });\r\n },\r\n displayInfoMessage: (infoText) => {\r\n this.messageService.addMessage({\r\n type: MessageType.info,\r\n text: infoText\r\n });\r\n },\r\n displayErrorMessage: (errorText) => {\r\n this.messageService.addMessage({\r\n type: MessageType.error,\r\n text: errorText\r\n });\r\n }\r\n };\r\n };\r\n\r\n // Register global services\r\n $.registerService('ba', 'textManager', $.ba.services.TextManager);\r\n\r\n // Initialize main application controller instance\r\n $.ba.authManager = {\r\n userLoggedIn: true\r\n };\r\n }\r\n}\r\n","
No schedulers available
\r\n\r\n
\r\n \r\n Save\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CxFormsModule } from '@forms';\r\n\r\nimport { SchedulerComponent } from './scheduler.component';\r\nimport { SchedulerTemplates } from './scheduler-templates.directive';\r\nimport { UiMessagesModule } from '@ui-messages';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CxFormsModule,\r\n UiMessagesModule\r\n ],\r\n declarations: [\r\n SchedulerComponent,\r\n SchedulerTemplates\r\n ],\r\n exports: [\r\n SchedulerComponent,\r\n SchedulerTemplates\r\n ],\r\n providers: []\r\n})\r\nexport class SchedulerModule { }\r\n\r\nexport {\r\n SchedulerComponent\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { FormHelper } from '@forms';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { UserService } from '@user';\r\nimport { __i18n } from '@localisation';\r\nimport { HttpHelperService } from '@http';\r\nimport { Config } from '@config';\r\nimport { MessagesService, Message, MessageType } from '@ui-messages';\r\nimport { StateService, States } from '@state';\r\nimport { ThemeService } from '@themes';\r\n\r\n@Component({\n selector: 'registration',\n templateUrl: './registration.template.html',\n standalone: false\n})\r\nexport class RegistrationComponent {\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private formHelper: FormHelper,\r\n private user: UserService,\r\n private httpHelper: HttpHelperService,\r\n private config: Config,\r\n private router: Router,\r\n private messageService: MessagesService,\r\n private stateService: StateService,\r\n private themeService: ThemeService,\r\n private route: ActivatedRoute\r\n ) {\r\n this.registrationForm = formBuilder.group({\r\n email: ['', Validators.required],\r\n activationKey: ['', Validators.required],\r\n tenantKey: [''],\r\n accept: ['', Validators.requiredTrue]\r\n });\r\n\r\n if (this.config.serverConfig && this.config.serverConfig.SIGNUP_EMAIL) {\r\n const signUpInfoJson = localStorage.getItem('signupData');\r\n let signUpInfoAssigned = false;\r\n if (signUpInfoJson) {\r\n try {\r\n const signUpInfo = JSON.parse(signUpInfoJson);\r\n if (signUpInfo.Email && signUpInfo.NewActivationKey && signUpInfo.TermsOfUse) {\r\n signUpInfoAssigned = true;\r\n this.registrationForm.controls.email.setValue(signUpInfo.Email);\r\n this.registrationForm.controls.activationKey.setValue(signUpInfo.NewActivationKey);\r\n this.registrationForm.controls.tenantKey.setValue(signUpInfo.TenantKey);\r\n if(this.registrationForm.controls.accept){\r\n this.registrationForm.controls.accept.setValue(signUpInfo.TermsOfUse);\r\n }\r\n this.register();\r\n }\r\n } catch {\r\n // ignored\r\n }\r\n }\r\n if (!signUpInfoAssigned) {\r\n this.registrationForm.controls.email.setValue(this.config.serverConfig.SIGNUP_EMAIL);\r\n }\r\n }\r\n localStorage.removeItem('signupData');\r\n\r\n this.route.queryParams.subscribe(params => {\r\n const converted: any = {};\r\n Object.keys(params).forEach((current) => {\r\n converted[current.toLocaleLowerCase()] = params[current];\r\n });\r\n if(converted.email){\r\n this.registrationForm.controls.email.setValue(converted.email);\r\n }\r\n if(converted.activationkey){\r\n this.registrationForm.controls.activationKey.setValue(converted.activationkey);\r\n }\r\n })\r\n\r\n\r\n this.themeService.data.subscribe((themeData: any) => {\r\n if(themeData) {\r\n if (themeData.showSignUpTenantKey) {\r\n this.showTenantKey = true;\r\n }\r\n if(themeData.disableSignupButton){\r\n this.disableSignupButton = true;\r\n }\r\n this.showTermsOfUse = !themeData.dontShowTermsOfUse;\r\n if(!this.showTermsOfUse){\r\n this.registrationForm.removeControl('accept')\r\n }\r\n if (this.config.serverConfig.EXT_AUTH_TYPE && themeData.showExternalLogin) {\r\n this.showExternalLogin = !this.config.serverConfig || !this.config.serverConfig.SIGNUP_EMAIL;\r\n this.externalLoginLink = this.config.externaLoginLink + this.config.serverConfig.EXT_AUTH_TYPE;\r\n }\r\n if(themeData.disableExternalSignupButton) {\r\n this.showExternalLogin = false;\r\n }\r\n }\r\n });\r\n }\r\n\r\n public showTermsOfUse: boolean = false;\r\n\r\n public registrationForm: FormGroup;\r\n\r\n public registrationError: string;\r\n\r\n public registerButtonState: string;\r\n\r\n public disableSignupButton: boolean = false;\r\n\r\n public showTenantKey: boolean = false;\r\n public showExternalLogin: boolean;\r\n public externalLoginLink: string;\r\n\r\n public useExternalLogin() {\r\n this.formHelper.markFormGroupTouched(this.registrationForm);\r\n\r\n if (this.registrationForm.valid) {\r\n const registerData : any = {\r\n Email: this.registrationForm.controls.email.value,\r\n NewActivationKey: this.registrationForm.controls.activationKey.value,\r\n TenantKey: this.registrationForm.controls.tenantKey.value\r\n }\r\n if(this.showTermsOfUse){\r\n registerData.TermsOfUse = this.registrationForm.controls.accept.value;\r\n }\r\n localStorage.setItem('signupData', JSON.stringify(registerData));\r\n location.href = this.externalLoginLink;\r\n }\r\n }\r\n\r\n public async register() {\r\n this.formHelper.markFormGroupTouched(this.registrationForm);\r\n\r\n if (this.registrationForm.valid) {\r\n try {\r\n this.registerButtonState = 'loading';\r\n const registerData : any = {\r\n Email: this.registrationForm.controls.email.value,\r\n NewActivationKey: this.registrationForm.controls.activationKey.value,\r\n TenantKey: this.registrationForm.controls.tenantKey.value\r\n }\r\n if(this.showTermsOfUse){\r\n registerData.TermsOfUse = this.registrationForm.controls.accept.value;\r\n }\r\n const result = await this.user.register(registerData);\r\n this.stateService.change(States.userMustRegister, false);\r\n this.registerButtonState = 'loaded';\r\n if (this.config.serverConfig.SIGNUP_EMAIL) {\r\n this.router.navigateByUrl('/VerificationCode');\r\n }else{\r\n this.messageService.addMessage({\r\n text: __i18n(\r\n 'The registration was successful. As a new user please check your e-mail account or log-in directly and finish the registration of your plant.',\r\n 'landingpage.register.success.message'\r\n ),\r\n type: MessageType.success,\r\n target: 'landingpage'\r\n });\r\n this.router.navigateByUrl('/Login');\r\n }\r\n } catch (e) {\r\n this.registerButtonState = 'loaded';\r\n console.error('Error on registration! [RegistrationComponent.register]', e);\r\n this.registrationError =\r\n this.httpHelper.getErrorMessage(e) ||\r\n __i18n('Could not register, an error occured.', 'landingpage.register.error');\r\n }\r\n } else {\r\n this.registrationError = '';\r\n }\r\n }\r\n}\r\n","
\r\n

null

\r\n

null

\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n The 'e-mail address' is required.\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n 'New activation key' is required.\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n or\r\n External Log in\r\n
\r\n
","import { Injectable } from '@angular/core';\r\nimport { AuthHttp } from '@http';\r\nimport { Config } from '@config';\r\nimport { lastValueFrom } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class VerificationService {\r\n constructor(\r\n private http : AuthHttp,\r\n private config : Config\r\n ){}\r\n\r\n public verificate(code : string){\r\n return lastValueFrom(this.http\r\n .putJSON(this.config.services.accounts.verification, { verificationcode : code }, null, true)\r\n );\r\n }\r\n}","import { Component } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { FormHelper } from '@forms';\r\nimport { AuthService } from '@auth';\r\nimport { HttpHelperService, HttpTokenService } from '@http';\r\nimport { VerificationService } from './verification.service';\r\nimport { __i18n } from '@localisation';\r\nimport { Config } from '@config';\r\nimport { GlobalEventBus, ActionEvents } from '@event-bus';\r\n\r\n\r\n@Component({\n selector: 'verification-code',\n templateUrl: './verification.code.template.html',\n standalone: false\n})\r\nexport class VerificationCodeComponent {\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private formHelper: FormHelper,\r\n private verificationService: VerificationService,\r\n private httpHelper: HttpHelperService,\r\n private authService: AuthService,\r\n private config: Config,\r\n private eventBus: GlobalEventBus\r\n ) {\r\n this.verificationCodeForm = this.formBuilder.group({\r\n code: ['', Validators.required]\r\n });\r\n }\r\n\r\n public async verification() {\r\n this.formHelper.markFormGroupTouched(this.verificationCodeForm);\r\n if (this.verificationCodeForm.valid) {\r\n try {\r\n const result = await this.verificationService.verificate(this.verificationCodeForm.controls.code.value);\r\n if (result) {\r\n this.config.serverConfig.VERIFICATION_CODE_REQUIRED = false;\r\n this.authService.checkLoginStatus();\r\n }\r\n } catch (e) {\r\n this.verificationError =\r\n this.httpHelper.getErrorMessage(e)\r\n || __i18n('We could not verify it, an error occured.', 'landingpage.verification.error');\r\n }\r\n }\r\n }\r\n\r\n public logout() {\r\n this.eventBus.trigger(ActionEvents.disconnect, { force : true});\r\n }\r\n\r\n public verificationCodeForm: any;\r\n\r\n public verificationError: string;\r\n\r\n public confirmButtonState: boolean;\r\n}","
\r\n
\r\n

null

\r\n

null

\r\n

null

\r\n
\r\n
\r\n

Verification

\r\n \r\n
\r\n \r\n \r\n \r\n You must enter the code.\r\n \r\n
\r\n
\r\n \r\n or\r\n Log out\r\n
\r\n
\r\n
","import { Component } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Config } from '@config';\r\nimport { StateService, States } from '@state';\r\nimport { AuthService } from '@auth';\r\nimport { ThemeService } from '@themes';\r\n\r\n@Component({\n selector: 'registration',\n templateUrl: './ext.login.registration.info.template.html',\n standalone: false\n})\r\nexport class ExtLoginRegistrationInfoComponent {\r\n constructor(\r\n private router: Router,\r\n private config: Config,\r\n private stateService: StateService,\r\n private authService: AuthService,\r\n private themeService: ThemeService\r\n ) {\r\n if (!config.serverConfig.SIGNUP_EMAIL) {\r\n this.router.navigateByUrl('/Login');\r\n } else {\r\n this.showSignup = themeService.currentThemeConfig ? themeService.currentThemeConfig.showSignUp : false;\r\n this.subscriptions.push(this.themeService.data.subscribe((data: any) => {\r\n if (data) {\r\n this.showSignup = data.showSignUp;\r\n }\r\n }));\r\n this.checkSignUp();\r\n }\r\n }\r\n\r\n private checkSignUp(){\r\n const signUpInfoJson = localStorage.getItem('signupData');\r\n if (signUpInfoJson) {\r\n try {\r\n const signUpInfo = JSON.parse(signUpInfoJson);\r\n if (signUpInfo.Email && signUpInfo.NewActivationKey && signUpInfo.TermsOfUse) {\r\n this.router.navigateByUrl('/Registration');\r\n }\r\n } catch {\r\n // ignored\r\n }\r\n }\r\n }\r\n\r\n public register() {\r\n this.router.navigateByUrl('/Registration');\r\n }\r\n\r\n public login() {\r\n this.stateService.change(States.userMustRegister, false);\r\n this.router.navigateByUrl('/Login');\r\n }\r\n\r\n public logOut() {\r\n this.authService.disconnect({force: true});\r\n }\r\n\r\n private subscriptions = []\r\n\r\n public ngOnDestroy() {\r\n this.subscriptions.forEach((current) => {\r\n current.unsubscribe();\r\n })\r\n }\r\n\r\n public showSignup: boolean;\r\n}","
\r\n
\r\n

Welcome to ClimatixIC

\r\n

\r\n This seems to be your first time in ClimatixIC with this account. If you already have an account here, please click the \"Log in\" button below to log in with your account and assign this external account, so you can use it for future logins.\r\n If you are a new user with a supported device and want to sign up, please click the \"Sign up\" button below.\r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","import { NgModule } from '@angular/core';\r\nimport { RegistrationComponent } from './registration.component';\r\nimport { RouterModule } from '@angular/router';\r\n//import { BrowserModule } from '@angular/platform-browser';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CxFormsModule } from '@forms';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { UiFormatModule } from '@ui-format';\r\nimport { VerificationCodeComponent } from './verification.code.component';\r\nimport { VerificationService } from './verification.service';\r\nimport { ExtLoginRegistrationInfoComponent } from './ext.login.registration.info.component';\r\n\r\n@NgModule({\r\n imports : [\r\n RouterModule,\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n CxFormsModule,\r\n UiFormatModule\r\n ],\r\n declarations : [\r\n RegistrationComponent,\r\n VerificationCodeComponent,\r\n ExtLoginRegistrationInfoComponent\r\n ],\r\n providers : [\r\n VerificationService\r\n ]\r\n})\r\nexport class RegistrationModule {\r\n\r\n}\r\n\r\nexport {\r\n RegistrationComponent,\r\n VerificationCodeComponent,\r\n ExtLoginRegistrationInfoComponent\r\n}","import { Component, OnDestroy, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators } from '@angular/forms';\r\nimport { FormHelper } from '@forms';\r\nimport { UserService } from '@user';\r\nimport { HttpHelperService } from '@http';\r\nimport { __i18n, LanguageService } from '@localisation';\r\nimport { ThemeService } from '@themes';\r\nimport { Config } from '@config';\r\n\r\n\r\n@Component({\r\n selector: 'reset-password',\r\n templateUrl: './reset.password.template.html',\r\n standalone: false\r\n})\r\nexport class ResetPasswordComponent implements OnDestroy, OnInit {\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private formHelper: FormHelper,\r\n private user: UserService,\r\n private httpHelper: HttpHelperService,\r\n private config: Config,\r\n private languageService: LanguageService\r\n ) {\r\n this.changePasswordForm = this.formBuilder.group({\r\n email : ['', Validators.compose([Validators.required, Validators.email]) ]\r\n });\r\n if (location.hash == '#/ResetPasswordExt') {\r\n this.externalLoginLink = this.config.externaLoginLink + this.config.serverConfig.EXT_AUTH_TYPE + '&locale=' + this.languageService.language;\r\n }\r\n }\r\n\r\n public changePasswordForm: FormGroup;\r\n\r\n public resetError: string;\r\n\r\n public mailIsSended: boolean = false;\r\n\r\n public resetPasswordButtonState: string;\r\n\r\n private externalLoginLink: string;\r\n\r\n private _handlePopStateBound = this.handlePopState.bind(this);\r\n\r\n ngOnInit() {\r\n if (this.externalLoginLink) {\r\n history.replaceState({goToExternalLogin: true}, \"\", \"#/Externallogin\");\r\n history.pushState(null, \"\", \"#/ResetPassword\");\r\n window.addEventListener('popstate', this._handlePopStateBound);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n window.removeEventListener('popstate', this._handlePopStateBound);\r\n }\r\n\r\n handlePopState(e: PopStateEvent) {\r\n if (e.state?.goToExternalLogin) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n window.location.href = this.externalLoginLink;\r\n }\r\n }\r\n\r\n public async resetPassword(){\r\n this.resetError = null;\r\n this.formHelper.markFormGroupTouched(this.changePasswordForm);\r\n\r\n if(this.changePasswordForm.valid) {\r\n this.resetPasswordButtonState = 'loading';\r\n try {\r\n const result = await this.user.resetPassword({\r\n email: this.changePasswordForm.controls.email.value\r\n });\r\n this.mailIsSended = true;\r\n }catch(e) {\r\n this.resetError = this.httpHelper.getErrorMessage(e)\r\n || __i18n('The password could not be changed, an error occurred.', 'landingpage.changepassword.error');\r\n } finally {\r\n this.resetPasswordButtonState = 'loaded';\r\n }\r\n }\r\n }\r\n}","
\r\n
\r\n \r\n
\r\n \r\n
\r\n

Reset your password

\r\n \r\n \r\n \r\n The email address cannot be empty.\r\n The email address you entered is invalid.\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n

Reset password

\r\n

\r\n An email containing instructions on how to reset your password has been sent to your email address. Please check your emails and follow the steps described in the email.\r\n

\r\n
\r\n
","import { Component, ChangeDetectorRef } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators, FormGroupDirective , FormControl } from '@angular/forms';\r\nimport { FormHelper } from '@forms';\r\nimport { UserService } from '@user';\r\nimport { __i18n } from '@localisation';\r\nimport { RoutingInfoService } from '@routing';\r\nimport { HttpHelperService } from '@http';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { Router } from '@angular/router';\r\nimport { GlobalEventBus, ActionEvents } from '@event-bus';\r\nimport { StateService, States } from '@state';\r\n\r\n@Component({\n selector: 'reset-password',\n templateUrl: './change.password.template.html',\n standalone: false\n})\r\nexport class ChangePasswordComponent {\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private formHelper: FormHelper,\r\n private user: UserService,\r\n private routingInfos: RoutingInfoService,\r\n private httpHelper: HttpHelperService,\r\n private messageService: MessagesService,\r\n private router: Router,\r\n private changeDetection: ChangeDetectorRef,\r\n private eventBus: GlobalEventBus,\r\n private stateService: StateService\r\n ) {\r\n const formGroupConfig: any = {\r\n oldpassword: ['', Validators.compose([Validators.required])],\r\n password: ['', Validators.compose([Validators.required])],\r\n confirmPassword: ['', Validators.compose([Validators.required])]\r\n };\r\n\r\n this.changePasswordForm = this.formBuilder.group(formGroupConfig);\r\n\r\n this.stateService.values([States.user, States.themeConfig]).subscribe((value) => {\r\n if(!value.themeConfig){\r\n return false;\r\n }\r\n if(!value.user){\r\n this.router.navigateByUrl('/Login');\r\n return true;\r\n }\r\n this.mustAcceptTermsOfUse = value.user.mustAcceptTermsOfUse && !value.themeConfig.dontShowTermsOfUse;\r\n if (this.mustAcceptTermsOfUse) {\r\n this.changePasswordForm.addControl('acceptTermsOfUse', new FormControl('', Validators.requiredTrue));\r\n }\r\n\r\n if (value.user && value.user.mustChangePassword === false) {\r\n this.router.navigateByUrl('/Home');\r\n }\r\n\r\n return true;\r\n }, true).while.falsy();\r\n }\r\n\r\n public changePasswordForm: FormGroup;\r\n\r\n public changePasswordError: string;\r\n\r\n public changePasswordButtonState: string;\r\n\r\n public mailIsSended: boolean = false;\r\n\r\n public mustAcceptTermsOfUse: boolean = false;\r\n\r\n public async changePassword() {\r\n this.changePasswordError = null;\r\n this.formHelper.markFormGroupTouched(this.changePasswordForm);\r\n const oldpassword = this.changePasswordForm.controls.oldpassword.value;\r\n const password = this.changePasswordForm.controls.password.value;\r\n const confirmPassword = this.changePasswordForm.controls.confirmPassword.value;\r\n const idParameter = this.routingInfos.getCurrentRoutingParams();\r\n if (password !== confirmPassword) {\r\n this.changePasswordError = __i18n(\r\n 'Password and password confirmation must be equal!',\r\n 'landingpage.changepassword.error.text.equal'\r\n );\r\n } else {\r\n if (this.changePasswordForm.valid) {\r\n try {\r\n await this.user.changePassword({\r\n requestId: idParameter.id,\r\n oldpassword,\r\n newPassword: password,\r\n confirmPassword\r\n });\r\n\r\n //add message and navigate to login\r\n this.messageService.addMessage({\r\n type: MessageType.success,\r\n text: __i18n('The password has been changed', 'landingpage.info.text.passwordchanged'),\r\n target: 'landingpage'\r\n });\r\n\r\n this.messageService.addMessage({\r\n type: MessageType.success,\r\n text: __i18n('The password has been changed', 'landingpage.info.text.passwordchanged')\r\n });\r\n this.eventBus.trigger(ActionEvents.loadUser);\r\n } catch (e) {\r\n console.error('Passwort Change Error! [ChangePasswordComponent.changePassword]', e);\r\n this.changePasswordError =\r\n this.httpHelper.getErrorMessage(e) ||\r\n __i18n('The password could not be changed, an error occurred.', 'landingpage.changepassword.error');\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","\r\n\r\n\r\n
\r\n
\r\n

Change password

\r\n

Please enter a new password and confirm it in the second box.

\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n The password cannot be empty.\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n The password cannot be empty.\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n The confirm password cannot be empty.\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
","import { Component, ChangeDetectorRef } from '@angular/core';\r\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\r\nimport { FormHelper } from '@forms';\r\nimport { UserService } from '@user';\r\nimport { __i18n } from '@localisation';\r\nimport { RoutingInfoService } from '@routing';\r\nimport { HttpHelperService } from '@http';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { Router } from '@angular/router';\r\nimport { StateService, States } from '@state';\r\n\r\n@Component({\n selector: 'reset-password',\n templateUrl: './set.password.template.html',\n standalone: false\n})\r\nexport class SetPasswordComponent {\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private formHelper: FormHelper,\r\n private user: UserService,\r\n private routingInfos: RoutingInfoService,\r\n private httpHelper: HttpHelperService,\r\n private messageService: MessagesService,\r\n private router: Router,\r\n private changeDetection: ChangeDetectorRef,\r\n private stateService: StateService\r\n ){\r\n const formGroupCofig: any = {\r\n password : ['', Validators.compose([Validators.required]) ],\r\n confirmPassword : ['', Validators.compose([Validators.required]) ]\r\n };\r\n\r\n this.changePasswordForm = this.formBuilder.group(formGroupCofig);\r\n\r\n const currentUser = this.user.getUser();\r\n if(currentUser){\r\n this.stateService.value(States.themeConfig).subscribe((themeConfig) => {\r\n if(!themeConfig){\r\n return false;\r\n }\r\n this.mustAcceptTermsOfUse = currentUser.mustAcceptTermsOfUse;\r\n if(this.mustAcceptTermsOfUse){\r\n this.changePasswordForm.addControl(\r\n 'acceptTermsOfUse',\r\n new FormControl('', Validators.required)\r\n );\r\n }\r\n\r\n return true;\r\n }).while.falsy();\r\n }\r\n }\r\n\r\n public changePasswordForm: FormGroup;\r\n\r\n public changePasswordError: string;\r\n\r\n public changePasswordButtonState: string;\r\n\r\n public mustAcceptTermsOfUse: boolean = false;\r\n\r\n public mailIsSended: boolean = false;\r\n\r\n public async changePassword(){\r\n this.changePasswordError = null;\r\n this.formHelper.markFormGroupTouched(this.changePasswordForm);\r\n const password = this.changePasswordForm.controls.password.value;\r\n const confirmPassword = this.changePasswordForm.controls.confirmPassword.value;\r\n const idParameter = this.routingInfos.getCurrentRoutingParams();\r\n\r\n if(password !== confirmPassword){\r\n this.changePasswordError = __i18n(\r\n 'Password and password confirmation must be equal!',\r\n 'landingpage.changepassword.error.text.equal'\r\n );\r\n }else if(this.mustAcceptTermsOfUse && !this.changePasswordForm.controls.acceptTermsOfUse.value){\r\n this.changePasswordError = __i18n(\r\n 'Terms of use must be accepted!',\r\n 'landingpage.changepassword.error.termsofuse.notaccepted'\r\n );\r\n }else{\r\n if(this.changePasswordForm.valid) {\r\n this.changePasswordButtonState = 'loading';\r\n try {\r\n const result = await this.user.setPassword({\r\n requestId: idParameter.id,\r\n newPassword: password,\r\n confirmPassword\r\n });\r\n //add message and navigate to login\r\n this.messageService.addMessage({\r\n type : MessageType.success,\r\n text : __i18n('The password has been changed', 'landingpage.info.text.passwordchanged'),\r\n target : 'landingpage'\r\n });\r\n this.router.navigateByUrl('/Login');\r\n } catch(e) {\r\n this.changePasswordError = this.httpHelper.getErrorMessage(e) \r\n || __i18n('The password could not be changed, an error occurred.', 'landingpage.changepassword.error');\r\n } finally {\r\n this.changePasswordButtonState = 'loaded';\r\n }\r\n }\r\n }\r\n }\r\n}","
\r\n
\r\n

Set password

\r\n

Please enter a new password and confirm it in the second box.

\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n The password cannot be empty.\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n The confirm password cannot be empty.\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
","import { NgModule } from '@angular/core';\r\nimport { ResetPasswordComponent } from './reset.password.component';\r\nimport { ChangePasswordComponent } from './change.password.component';\r\nimport { SetPasswordComponent } from './set.password.component';\r\nimport { CxFormsModule } from '@forms';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\nimport { UiFormatModule } from '@ui-format';\r\n\r\n\r\n@NgModule({\r\n imports : [\r\n BrowserModule,\r\n CxFormsModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n UiFormatModule\r\n ],\r\n declarations : [\r\n ResetPasswordComponent,\r\n ChangePasswordComponent,\r\n SetPasswordComponent\r\n ],\r\n providers : [],\r\n exports : [\r\n ResetPasswordComponent,\r\n SetPasswordComponent,\r\n ChangePasswordComponent\r\n ]\r\n})\r\nexport class ChangePasswordModul {\r\n\r\n}\r\n\r\nexport {\r\n ResetPasswordComponent,\r\n ChangePasswordComponent,\r\n SetPasswordComponent\r\n}","import { Injectable } from '@angular/core';\r\nimport { RoutingObserverService, RoutingInfoService } from '@routing';\r\nimport { GlobalEventBus, ActionEvents } from '@event-bus';\r\nimport { Config } from '@config';\r\n\r\n@Injectable()\r\nexport class RouteActionsService {\r\n private routeActions: Array = [\r\n {\r\n type: ActionEvents.tenantSaved,\r\n url: this.config.routeActions.tenantSaved\r\n },\r\n {\r\n type: ActionEvents.plantSettingsSaved,\r\n url: this.config.routeActions.plantSettingsSaved\r\n },\r\n {\r\n type: ActionEvents.tenantDeleted,\r\n url: this.config.routeActions.tenantDeleted\r\n },\r\n /*\r\n {\r\n type: ActionEvents.refreshPage,\r\n url: this.config.routeActions.plantAssigned\r\n },*/\r\n {\r\n type: ActionEvents.userChanged,\r\n url: this.config.routeActions.userChanged\r\n },\r\n {\r\n type: ActionEvents.passwordChanged,\r\n url: this.config.routeActions.passwordChanged\r\n },\r\n {\r\n type: ActionEvents.activatePlant,\r\n url: this.config.routeActions.activationChanged\r\n }\r\n ];\r\n\r\n constructor(\r\n private routingObserver: RoutingObserverService,\r\n private routingInfo: RoutingInfoService,\r\n private eventBus: GlobalEventBus,\r\n private config: Config\r\n ) {\r\n this.routingObserver.onRouteChanged.subscribe( async(data: any) => {\r\n const pathMatches = this.routeActions.filter((routeAction) => {\r\n return this.routingInfo.pathMatchesUrl(routeAction.url, data.url);\r\n });\r\n\r\n pathMatches.forEach((pathMatch) => {\r\n this.eventBus.trigger(pathMatch.type);\r\n });\r\n });\r\n }\r\n}\r\n\r\nexport interface RouteAction {\r\n type: ActionEvents;\r\n url: string;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ExternalAction, ExternalActionData } from '../external.action.interface';\r\nimport { PlantService } from '@plants';\r\nimport { Router } from '@angular/router';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { __i18n } from '@localisation'\r\n\r\n@Injectable()\r\nexport class DeletePlantActions implements ExternalAction {\r\n constructor(\r\n private plantService : PlantService,\r\n private router : Router,\r\n private messageService : MessagesService\r\n ){}\r\n\r\n public name : string = 'delete-plant';\r\n\r\n public async execute(data : ExternalActionData) {\r\n try {\r\n\r\n const result = await this.plantService.deletePlant(data.data.plantid);\r\n if(result){\r\n this.router.navigateByUrl('/Administration/Plants');\r\n this.messageService.addMessage({\r\n text : __i18n('Plant successfully removed.', 'workflow.external.actions.plant.deleted.message.success'),\r\n type : MessageType.success\r\n })\r\n }else{\r\n this.handleError();\r\n }\r\n }catch(e) {\r\n this.handleError();\r\n console.error('Error while deleting plant! [DeletePlantActions.execute]', e)\r\n //throw new Error(\"Error while deleting plantid!\");\r\n }\r\n }\r\n\r\n private handleError(){\r\n this.messageService.addMessage({\r\n text : __i18n('Can not remove the plant!', 'workflow.external.actions.plant.deleted.message.error'),\r\n type : MessageType.error\r\n })\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { ExternalAction, ExternalActionData } from '../external.action.interface';\r\nimport { UserService } from '@user';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { __i18n } from '@localisation';\r\nimport { HttpHelperService } from '@http';\r\nimport { GlobalEventBus, ActionEvents } from '@event-bus';\r\nimport { SiteInfoService } from '@site-info';\r\nimport { LoaderService } from '@loader';\r\n\r\n@Injectable()\r\nexport class DeleteUserActions implements ExternalAction {\r\n constructor(\r\n private userService: UserService,\r\n private router: Router,\r\n private messageService: MessagesService,\r\n private helperService: HttpHelperService,\r\n private eventBus: GlobalEventBus,\r\n private siteInfo: SiteInfoService,\r\n private loader: LoaderService\r\n ) {}\r\n\r\n public name: string = 'delete-current-user';\r\n\r\n public async execute(data: ExternalActionData) {\r\n const loaderId = this.loader.start();\r\n try {\r\n const result = await this.userService.deleteCurrentUser();\r\n\r\n this.messageService.addMessage({\r\n text: __i18n('User successfully removed.', 'workflow.external.actions.user.deleted.message.success'),\r\n type: MessageType.success\r\n });\r\n\r\n this.messageService.addMessage({\r\n text: __i18n('User successfully removed.', 'workflow.external.actions.user.deleted.message.success'),\r\n type: MessageType.success,\r\n target: 'landingpage'\r\n });\r\n\r\n //delete session etc.\r\n this.eventBus.trigger(ActionEvents.disconnect, { reload : true});\r\n localStorage.removeItem('_lastroute');\r\n } catch (e) {\r\n this.handleError(e);\r\n console.error('Error while deleting user! [DeleteUserActions.execute]');\r\n } finally {\r\n this.loader.stop(loaderId);\r\n }\r\n }\r\n\r\n private handleError(e?: any) {\r\n const errorMessage = this.helperService.getErrorMessage(e);\r\n this.messageService.addMessage({\r\n text: errorMessage,\r\n type: MessageType.error\r\n });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ExternalAction, ExternalActionData } from './external.action.interface';\r\nimport { DeletePlantActions } from './external-actions/delete.plant.action';\r\nimport { DeleteUserActions } from './external-actions/delete.user.action';\r\n\r\n@Injectable()\r\nexport class ExternalActionsService {\r\n constructor(private deletePlantAction: DeletePlantActions, private deleteUserAction: DeleteUserActions) {\r\n window.addEventListener('angular-action', (e: any) => this.handleAction(e.detail), false);\r\n this.registerAction(deletePlantAction);\r\n this.registerAction(deleteUserAction);\r\n }\r\n\r\n private actions: Array = [];\r\n\r\n public registerAction(action: ExternalAction) {\r\n this.actions.push(action);\r\n }\r\n\r\n private handleAction(data: ExternalActionData) {\r\n const action = this.actions.find((current) => current.name === data.name);\r\n if (action) {\r\n action.execute(data);\r\n } else {\r\n console.info('ExternalAction Error, cannot find action!', data.name);\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { GlobalEventBus, ActionEvents } from '@event-bus';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { __i18n } from '@localisation';\r\n\r\n/**\r\n * Shows Message on a specific event\r\n */\r\n@Injectable({ providedIn : 'root'})\r\nexport class WorkflowMessagesService {\r\n constructor(private eventBus: GlobalEventBus, private messageService: MessagesService) {\r\n this.eventBus.on(ActionEvents.passwordChanged, () => {\r\n this.messageService.addMessage({\r\n text: __i18n('Your password has been changed.', 'account.changepassword.success.message'),\r\n type: MessageType.success\r\n });\r\n });\r\n }\r\n}\r\n","import { Injectable, EventEmitter } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { AuthService, PrivilegesLoadingService } from '@auth';\r\nimport { ThemeService } from '@themes';\r\nimport { TenantService } from '@tenant';\r\nimport { GlobalEventBus, ActionEvents, TabEvents, TabEventBus } from '@event-bus';\r\nimport { RoutingObserverService, RoutingInfoService, RoutingModifiyerService } from '@routing';\r\nimport { Config } from '@config';\r\nimport { RouteActionsService } from './routeactions.service';\r\nimport { ExternalActionsService } from './external.actions.service';\r\nimport { LoaderService } from '@loader';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { __i18n } from '@localisation';\r\nimport { FullScreenService, PopupManagerService } from '@screen';\r\nimport { CachedPromiseManager } from '@cache';\r\nimport { WorkflowMessagesService } from './workflow.messages';\r\nimport { UserService } from '@user';\r\nimport { StateService, StateListener, States, StateHandler } from '@state';\r\n\r\n\r\n@Injectable( { providedIn : 'root'})\r\nexport class InitWorkflowService {\r\n constructor(\r\n private authService: AuthService,\r\n private theme: ThemeService,\r\n private tenant: TenantService,\r\n private eventBus: GlobalEventBus,\r\n private routingObserver: RoutingObserverService,\r\n private routingInfo: RoutingInfoService,\r\n private config: Config,\r\n private routeActionsService: RouteActionsService,\r\n private actionsService: ExternalActionsService,\r\n public router: Router,\r\n private loader: LoaderService,\r\n private messages: MessagesService,\r\n private tabEventBus: TabEventBus,\r\n private popupManager: PopupManagerService,\r\n private workflowMessage: WorkflowMessagesService,\r\n private userService: UserService,\r\n private stateService: StateService,\r\n private privilegesLoadingService: PrivilegesLoadingService,\r\n private routingModifiyer: RoutingModifiyerService,\r\n private themeService: ThemeService,\r\n private fullsScreenService: FullScreenService\r\n ) {\r\n const stateHandler = new StateHandler(this);\r\n //load theme\r\n this.init();\r\n }\r\n\r\n private async init(){\r\n //check login status\r\n this.authService.checkLoginStatus(() => {\r\n if (this.config.serverConfig && this.config.serverConfig.VERIFICATION_CODE_REQUIRED) {\r\n this.stateService.change(States.isLoggedIn, false);\r\n this.router.navigateByUrl('/VerificationCode');\r\n } else {\r\n this.authService.logIn();\r\n }\r\n });\r\n\r\n document.querySelector('body').addEventListener('click', () => {\r\n this.checkUserTimeout();\r\n });\r\n\r\n this.addIframeListener();\r\n\r\n\r\n this.routingObserver.onRouteChanged.subscribe( async(config: any) => {\r\n //remove all popups\r\n this.popupManager.removeAllPopups();\r\n\r\n this.checkUserTimeout();\r\n\r\n this.addIframeListener();\r\n\r\n const currentRoutingEntry = this.routingInfo.getCurrentConfig();\r\n\r\n //if user is logged in an the routing conf entry ignorIfLoggedIn is set, jump to Home\r\n if (this.authService.isLogginStarted && currentRoutingEntry.data.ignorIfLoggedIn) {\r\n this.router.navigateByUrl('/Home');\r\n }\r\n\r\n //check if a route is in the logged out area\r\n if (\r\n this.routingInfo.isLoggedOutPath(config.url) &&\r\n this.authService.isLogginStarted &&\r\n (!currentRoutingEntry.data || !currentRoutingEntry.data.stopAutoLoggout)\r\n ) {\r\n this.authService.disconnect();\r\n }\r\n\r\n const user = this.userService.getUser();\r\n if (user && user.mustChangePassword) {\r\n this.router.navigateByUrl(this.config.changePasswordUrl);\r\n }\r\n });\r\n\r\n //if user must change passwort redirect to change password screen\r\n this.eventBus.on(ActionEvents.userLoaded, (user: any) => {\r\n if (user && user.mustChangePassword) {\r\n this.router.navigateByUrl(this.config.changePasswordUrl);\r\n }\r\n });\r\n\r\n //handle unkown errors\r\n this.eventBus.on(ActionEvents.unknownError, (e: any) => {\r\n console.error('An unkown error occured! [InitWorkflowService.constructor]', e);\r\n this.loader.stopAll();\r\n this.messages.addMessage({\r\n type: MessageType.error,\r\n text: __i18n('An unknown error occured!', 'global.message.unknown.error')\r\n });\r\n });\r\n\r\n this.eventBus.on(ActionEvents.disconnect, () => {\r\n //delete all caches adter disconnect\r\n CachedPromiseManager.removeFullCache();\r\n });\r\n\r\n this.eventBus.on(ActionEvents.activatePlant, () => {\r\n //trigger tab login event after the plant was activated\r\n this.tabEventBus.trigger(TabEvents.login);\r\n this.tabEventBus.trigger(TabEvents.plantActivated);\r\n });\r\n\r\n this.tabEventBus.on(TabEvents.plantActivated, async() => {\r\n await this.privilegesLoadingService.refreshPrivileges();\r\n this.router.navigateByUrl('Administration/Plants');\r\n });\r\n\r\n this.tabEventBus.on(TabEvents.refresh, async() => {\r\n location.reload();\r\n });\r\n\r\n this.tenant.onTenantChange.subscribe((tenant) => {\r\n const configFromSnapshot = this.routingInfo.getRouterConfigFromSnapshot(this.router.routerState.snapshot);\r\n if (configFromSnapshot && configFromSnapshot.data && configFromSnapshot.data.redirectRouteOnTenantSwitch){\r\n this.router.navigateByUrl(configFromSnapshot.data.redirectRouteOnTenantSwitch);\r\n }\r\n });\r\n\r\n window.addEventListener('unload', () => {\r\n localStorage.removeItem('_lastroute_' + this.config.instanceId);\r\n });\r\n }\r\n\r\n public webInit(){\r\n setTimeout(() => {\r\n this.addIframeListener();\r\n }, 3000);\r\n }\r\n\r\n private iframeElement;\r\n private async addIframeListener(){\r\n\r\n this.iframeElement = document.querySelector('iframe');\r\n if(this.iframeElement){\r\n this.iframeElement.addEventListener('load', () => {\r\n this.iframeElement.contentWindow.document.body.addEventListener('click', () => {\r\n this.checkUserTimeout();\r\n });\r\n })\r\n }\r\n }\r\n\r\n private userTimeout: any;\r\n private isThemeLoaded: boolean = false;\r\n private isLoggedIn: boolean = false;\r\n private isTenantReady: boolean = false;\r\n\r\n private checkLogOutTimeout() {\r\n const currentTime = new Date().getTime();\r\n const lastActivity = Number(localStorage.getItem('_lastActivity'));\r\n if (currentTime - this.config.services.auth.inActiveTimeout >= lastActivity) {\r\n this.authService.disconnect({timedOut: true});\r\n } else {\r\n clearTimeout(this.userTimeout);\r\n this.userTimeout = setTimeout(\r\n this.checkLogOutTimeout.bind(this),\r\n this.config.services.auth.inActiveTimeout\r\n );\r\n }\r\n }\r\n\r\n private checkUserTimeout(){\r\n localStorage.setItem('_lastActivity', String(new Date().getTime()));\r\n //check user activity\r\n clearTimeout(this.userTimeout);\r\n this.checkLogOutTimeout();\r\n }\r\n\r\n public onReady: EventEmitter = new EventEmitter();\r\n\r\n //Checks if the app is ready to start\r\n @StateListener([States.themeLoaded, States.isLoggedIn, States.tenant], { init : true})\r\n public checkIfReady(value: any){\r\n if(value.themeLoaded && value.isLoggedIn && value.tenant){\r\n this.onReady.next(true);\r\n }\r\n }\r\n\r\n /**\r\n * checks if the user has to change his password, if so it redirects to the change password page\r\n */\r\n @StateListener([States.userMustChangePassword], { init: true, unsubscribeTruthy: true })\r\n public checkMustChangePassword(values: any) {\r\n if (values.mustChangePassword === true) {\r\n this.router.navigateByUrl(this.config.changePasswordUrl);\r\n }else if(values.mustChangePassword === false){\r\n this.tabEventBus.trigger(TabEvents.login);\r\n return true;\r\n }\r\n }\r\n\r\n //check if user must register\r\n @StateListener([States.currentRouteUrl, States.userMustRegister], { init: true, unsubscribeTruthy: true })\r\n public checkRegistration(values: any) {\r\n this.addIframeListener()\r\n if (values.currentRouteUrl === '/Login' && values.userMustRegister === true) {\r\n this.router.navigateByUrl('/ExtLoginRegistrationInfo');\r\n }\r\n\r\n if (values.userMustRegister === false) {\r\n return true;\r\n }\r\n }\r\n\r\n //check if user must enter a verification code\r\n @StateListener([States.isLoginable, States.userMustEnterVerificationCode], { init: true, unsubscribeTruthy: true })\r\n public checkIfLoginable(values: any) {\r\n if (values.isLoginable && !values.userMustEnterVerificationCode) {\r\n return true;\r\n } else if (values.isLoginable && values.userMustEnterVerificationCode) {\r\n this.router.navigateByUrl('/VerificationCode');\r\n }\r\n }\r\n\r\n private navigationTimer: any;\r\n\r\n //check if the user must activate a plant\r\n @StateListener([\r\n States.isLoggedIn,\r\n States.userMustActivatePlant,\r\n States.user,\r\n States.routingStarted,\r\n States.isRedirectedAfterLogin,\r\n States.userMustChangePassword,\r\n States.currentRouteUrl\r\n ], { init: true, unsubscribeTruthy: true })\r\n public mustActivatePlant(values: any) {\r\n if (\r\n values.isLoggedIn\r\n && values.userMustActivatePlant\r\n && !values.userMustChangePassword\r\n && !values.routingStarted\r\n && values.currentRouteUrl !== '/ActivatePlant'\r\n ) {\r\n clearTimeout(this.navigationTimer);\r\n this.navigationTimer = setTimeout(() => this.router.navigateByUrl('/ActivatePlant'), 20);\r\n }\r\n\r\n if(values.isLoggedIn && values.user && !values.userMustActivatePlant){\r\n // do not remove listener to avoid problems with relogin\r\n //return true;\r\n }\r\n }\r\n\r\n //check which outlet should be active\r\n @StateListener([States.isLoggedIn, States.isLoggedOutPath, States.themeIsLoading, States.tenant], { init: true })\r\n public checkCurrentOutlet(values: any) {\r\n if(values.themeIsLoading){\r\n this.stateService.change(States.isLoggedOutOutlet, null);\r\n return;\r\n }\r\n if (values.isLoggedOutPath) {\r\n this.stateService.change(States.isLoggedOutOutlet, true);\r\n } else if (values.isLoggedIn && !values.isLoggedOutPath && States.tenant) {\r\n this.stateService.change(States.isLoggedOutOutlet, false);\r\n }else{\r\n this.stateService.change(States.isLoggedOutOutlet, null);\r\n }\r\n }\r\n\r\n private isLoadingTheme: string;\r\n //check the initial Theme loading\r\n @StateListener([\r\n States.isLoggedIn,\r\n States.themeConfig,\r\n States.tenant,\r\n States.isLoggedOutPath,\r\n States.domainPatternFileIsLoaded\r\n ])\r\n public async checkLoginAndLoadTheme(values: any){\r\n\r\n //check theme loading only if the logged-in check is ready\r\n if(values.isLoggedIn === undefined){\r\n return;\r\n }\r\n\r\n let themeToLoad = this.theme.getInitialTheme(values.isLoggedIn, values.isLoggedOutPath);\r\n if(values.tenant && values.isLoggedIn && values.isLoggedOutPath === false){\r\n //if tenant is loaded, load the tenant theme\r\n themeToLoad = values.tenant.themeName || this.theme.defaultTheme;\r\n }\r\n if(this.isLoadingTheme === themeToLoad){\r\n return;\r\n }\r\n\r\n //if the theme is allready loaded stop loading\r\n if(values.themeConfig && values.themeConfig.name === themeToLoad){\r\n return;\r\n }\r\n\r\n this.stateService.change(States.themeIsLoading, true);\r\n this.isLoadingTheme = themeToLoad;\r\n const result = await this.theme.loadTheme(themeToLoad);\r\n this.stateService.change(States.showCookieNotification, result.cookieNotice);\r\n this.stateService.change(States.themeIsLoading, false);\r\n }\r\n\r\n //check if the the site should be refreshed\r\n @StateListener([States.refreshPage, States.isTokenRefreshing])\r\n public async checkPageRefresh(values: any){\r\n if(values.refreshPage && !values.isTokenRefreshing){\r\n const refreshTimeLimit = 20000;\r\n this.stateService.change(States.refreshPage, false);\r\n const lastReload = parseInt(localStorage.getItem('_lastreload'), 10) || new Date().getTime();\r\n let reloadCounter = parseInt(localStorage.getItem('_reloadcounter'), 10);\r\n\r\n //checks if there where more then 5 reloads in the last 20 seconds\r\n if(!reloadCounter || (lastReload + refreshTimeLimit < new Date().getTime())){\r\n reloadCounter = 1;\r\n localStorage.setItem('_reloadcounter', String(reloadCounter));\r\n }\r\n\r\n if(reloadCounter < 6){\r\n localStorage.setItem('_lastreload', String(new Date().getTime()));\r\n localStorage.setItem('_reloadcounter', String(++reloadCounter));\r\n console.info('Reload [InitWorkflowService.checkPageRefresh]');\r\n location.reload();\r\n }else{\r\n console.info('To much reloads [InitWorkflowService.checkPageRefresh]');\r\n localStorage.setItem('_reloadcounter', String(0));\r\n }\r\n }\r\n }\r\n\r\n //check if tracking is allowed, if so add the tracking scripts\r\n @StateListener([States.trackingAllowed], { init : true, unsubscribeFalsy: true })\r\n public async checkIfTrackingIsAllowed(values: any){\r\n const win = window as any;\r\n if(values.trackingAllowed){\r\n //if tracking is allowed add tracking pixel\r\n const trackingScriptConfig = document.createElement('script');\r\n trackingScriptConfig.setAttribute('type', 'text/javascript');\r\n trackingScriptConfig.setAttribute('src', 'https://w3.siemens.com/ote/ote_config.js');\r\n const trackingScript = document.createElement('script');\r\n trackingScript.setAttribute('type', 'text/javascript');\r\n trackingScript.setAttribute('src', 'https://w3.siemens.com/osspad3/ote/regions/ote.js');\r\n trackingScript.onload = () => {\r\n this.stateService.change(States.trackingLoaded, true);\r\n }\r\n document.querySelector('html').appendChild(trackingScriptConfig);\r\n document.querySelector('html').appendChild(trackingScript);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n\r\n //check if tenant has changed\r\n @StateListener([States.tenantChanged])\r\n public async onTenantChanged(tenant){\r\n const params = this.routingInfo.getCurrentRoutingParams();\r\n if(!Object.keys(params).length){\r\n return;\r\n }\r\n let config = this.routingInfo.getCurrentConfig();\r\n let lastChecked;\r\n while(config){\r\n if(!config.path.includes(':')){\r\n if(!lastChecked) {\r\n lastChecked = config;\r\n }\r\n }else{\r\n lastChecked = null;\r\n }\r\n config = config.parent;\r\n }\r\n\r\n if(lastChecked){\r\n const path = this.routingInfo.getFullPathFromConfig(lastChecked);\r\n if(path){\r\n this.router.navigateByUrl(path);\r\n }\r\n }\r\n }\r\n\r\n // set the operating landing pages for the tenant\r\n private lastOperatingLandingPageOption : any;\r\n @StateListener([States.tenant])\r\n public async checkTenantNaviation(tenant) {\r\n if(tenant?.tenant?.operatingLandingPageOption !== this.lastOperatingLandingPageOption) {\r\n this.routingModifiyer.setPlantAndSystemRedirects(tenant?.tenant?.operatingLandingPageOption)\r\n this.lastOperatingLandingPageOption = tenant?.tenant?.operatingLandingPageOption;\r\n }\r\n }\r\n\r\n @StateListener([States.isLoggedIn])\r\n public async checkLogin(data){\r\n if(!data.isLoggedIn) {\r\n // reset routing origins\r\n this.routingModifiyer.resetOrigins();\r\n this.fullsScreenService.normalScreen()\r\n // if the current theme is not the default theme refresh\r\n const currentTheme = this.themeService.currentThemeConfig?.themeName;\r\n const detectedTheme = this.config.serverConfig.DOMAIN_THEME;\r\n if(currentTheme && detectedTheme && detectedTheme !== currentTheme){\r\n // reload because themes are different\r\n this.loader.start();\r\n const appEls = document.getElementsByTagName('cl-app');\r\n if (appEls.length > 0) {\r\n (appEls[0] as HTMLElement).style.display = 'none'\r\n }\r\n location.reload();\r\n }\r\n }\r\n }\r\n\r\n @StateListener([States.currentRoutingConfig])\r\n public async checkPageLyout(data) {\r\n if(data?.currentRoutingConfig?.pageLayout) {\r\n document.body.setAttribute('layout', data.currentRoutingConfig.pageLayout);\r\n }else{\r\n document.body.removeAttribute('layout');\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { InitWorkflowService } from './init.workflow.service';\r\nimport { RouteActionsService, RouteAction } from './routeactions.service';\r\nimport { ExternalActionsService } from './external.actions.service';\r\nimport { ExternalAction, ExternalActionData } from './external.action.interface';\r\nimport { DeletePlantActions } from './external-actions/delete.plant.action';\r\nimport { DeleteUserActions } from './external-actions/delete.user.action';\r\nimport { WorkflowMessagesService } from './workflow.messages';\r\n\r\n@NgModule({\r\n providers : [\r\n InitWorkflowService,\r\n RouteActionsService,\r\n ExternalActionsService,\r\n DeletePlantActions,\r\n DeleteUserActions,\r\n WorkflowMessagesService\r\n ]\r\n})\r\nexport class WorkflowModule {}\r\n\r\nexport {\r\n InitWorkflowService,\r\n RouteActionsService,\r\n RouteAction,\r\n ExternalActionsService,\r\n ExternalActionData,\r\n ExternalAction,\r\n WorkflowMessagesService\r\n}","import { Injectable } from '@angular/core';\r\nimport { ThemeService } from '@themes';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot, CanActivate, Router } from '@angular/router';\r\nimport { Observable } from 'rxjs';\r\nimport { StateService, States } from '@state';\r\n\r\n@Injectable()\r\nexport class PreregisterNavigationAccessService implements CanActivate {\r\n constructor(\r\n private stateService: StateService\r\n ) {}\r\n\r\n public canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot):\r\n boolean | Promise | Observable {\r\n return new Promise(async(resolve, reject) => {\r\n this.stateService.value(States.themeConfig).subscribe((themeConfig: any) => {\r\n if(!themeConfig) {\r\n return false;\r\n }\r\n resolve(themeConfig.showPreRegister);\r\n return true;\r\n }, true).while.falsy();\r\n });\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { __i18n } from '@localisation';\r\nimport { AuthHttp } from '@http';\r\nimport { Config } from '@config';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { DataChangesHandlerService } from '@check';\r\nimport { lastValueFrom } from 'rxjs';\r\n\r\n\r\n@Component({\n selector: 'preregister',\n templateUrl: './preregister.template.html',\n standalone: false\n})\r\nexport class PreregisterComponent {\r\n\r\n constructor(\r\n private messages: MessagesService,\r\n private http: AuthHttp,\r\n private config: Config,\r\n private urlEnhancer: UrlEnhancerService,\r\n private changesService: DataChangesHandlerService\r\n ){}\r\n\r\n public activationKeys: string;\r\n\r\n public async activate(){\r\n if(!this.activationKeys || !this.activationKeys.trim()){\r\n this.messages.addMessage({\r\n type: MessageType.error,\r\n text: __i18n('Activation keys not provided.', 'administration.preregister.error.message.keys-not-provided')\r\n });\r\n }else{\r\n let activationKeys = this.activationKeys.split(/[,|\\n]/gm);\r\n activationKeys = activationKeys.filter((current) => !!current.trim());\r\n activationKeys = activationKeys.map((current) => current.trim());\r\n\r\n try {\r\n const result = await lastValueFrom(this.http.postJSON(\r\n this.urlEnhancer.replaceParams(this.config.services.preregister.preregister),\r\n {\r\n activationKeys\r\n }\r\n ));\r\n this.changesService.markAsClean();\r\n const messageGroupId = Math.random() + '_group';\r\n if(result.successMessage){\r\n this.messages.addMessage({\r\n type: MessageType.success,\r\n text: result.successMessage,\r\n group: messageGroupId\r\n });\r\n }\r\n\r\n if(result.infoMessage){\r\n this.messages.addMessage({\r\n type: MessageType.info,\r\n text: result.infoMessage,\r\n group: messageGroupId\r\n });\r\n }\r\n\r\n if(result.errorMessage){\r\n this.messages.addMessage({\r\n type: MessageType.error,\r\n text: result.errorMessage,\r\n group: messageGroupId\r\n });\r\n }\r\n\r\n }catch(e){\r\n this.messages.addMessage({\r\n type: MessageType.error,\r\n text: e.message\r\n })\r\n }\r\n }\r\n }\r\n}","\r\n Pre-register multiple plants\r\n\r\n\r\n

Pre-register multiple plants

\r\n \r\n Activation keys (commas seperated or one per line)\r\n \r\n \r\n
","import { NgModule } from '@angular/core';\r\n\r\nimport { PreregisterNavigationAccessService } from './preregister-navigation-access.service';\r\nimport { PreregisterComponent } from './preregister.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CxFormsModule } from '@forms';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n CxFormsModule\r\n ],\r\n declarations: [PreregisterComponent],\r\n exports: [PreregisterComponent],\r\n providers: [\r\n PreregisterNavigationAccessService\r\n ]\r\n})\r\nexport class PreregisterModule {}\r\n\r\nexport {\r\n PreregisterNavigationAccessService,\r\n PreregisterComponent\r\n}\r\n","import { Routes } from '@angular/router';\r\n\r\nexport const RedirectedRoutes: Routes = [\r\n {\r\n path : 'SystemAdministration/User/Settings',\r\n redirectTo: 'Administration/User/Settings',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/User/Details/:userid',\r\n redirectTo: 'Administration/User/:userid/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/User/Settings/:username',\r\n redirectTo: 'Administration/User/Settings/:username',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path: 'Site/ApplicationSet/Details/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path: 'Site/ApplicationSet/CopyApplicationSet/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/CopyApplicationSet',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path: 'Site/ApplicationSet/Settings',\r\n redirectTo : 'ApplicationSet/Plant/CreateNewApplicationSet',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationSet/Settings/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path: 'Site/CloudFile/Settings/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/CloudFile',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path: 'Site/CloudFile/Details/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/CloudFile/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path: 'Site/ApplicationSet/:applicationid/SiteFiles/CloudFile/Details',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/CloudFile/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationFile/Settings/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/ApplicationFile',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationFile/Details/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/ApplicationFile/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationSet/:applicationid/SiteFiles/ApplicationFile/Details',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/ApplicationFile/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/UcfFile/Settings/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/UcfFile',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/UcfFile/Details/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/UcfFile/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationSet/:applicationid/SiteFiles/UcfFile/Details',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/UcfFile/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationSet/MiscFiles/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/MiscFiles',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationSet/SiteFiles/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/MiscFile/Details/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/MiscFiles/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationSet/:applicationid/SiteFiles/MiscFiles/Details',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/SiteFiles/MiscFiles/Details',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/MiscFile/Settings/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/MiscFiles/Settings',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path: 'Site/ApplicationSet/CreateNewApplicationSetVersion/:applicationid',\r\n redirectTo : 'ApplicationSet/Plant/:applicationid/:applicationid/CreateNewApplicationSetVersion',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/ActivatingSite',\r\n redirectTo : 'Administration/Plants/ActivatingSite',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/Details/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/Users/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/Users',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/SiteUser/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/Users',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/SiteAlarms/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/Alarms',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/Alarms/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/Alarms',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/Settings/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/Settings',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/ConfirmDelete/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/ConfirmDelete',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/Settings/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/Settings',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration',\r\n redirectTo : 'Administration/Plants',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/ReplacingSite/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/Settings/ReplacingSite',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/AssignUnassignSite/:plantid',\r\n redirectTo : 'Administration/Plants/:plantid/Settings/AssignUnassignSite',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'Site/Site/WebAccess/:plantid',\r\n redirectTo : '/Operating/Plants/:plantid/WebAccess',\r\n pathMatch: 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/User',\r\n redirectTo : '/Administration/User',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/User/List',\r\n redirectTo : '/Administration/User',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/Tenant/Settings/:tenantid',\r\n redirectTo : '/Administration/TenantsOld/:tenantid/Settings',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/Tenant/Details/:tenantid',\r\n redirectTo : '/Administration/TenantsOld/:tenantid/Settings',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/Tenant/Settings',\r\n redirectTo : '/Administration/TenantsOld/Add',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/Tenant/CreateTenantFromTemplate',\r\n redirectTo : '/Administration/TenantsOld/CreateFromTemplate',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/Tenant',\r\n redirectTo : '/Administration/TenantsOld',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/UserRole/Settings/:plantroleid',\r\n redirectTo : '/Administration/PlantRoles/:plantroleid/Settings',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/UserRole/Details/:plantroleid',\r\n redirectTo : 'Administration/UserRoles/:plantroleid/Details',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/UserRole',\r\n redirectTo : 'Administration/UserRoles',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/Notification',\r\n redirectTo : 'Administration/Notifications',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/Site/Details/:plantid',\r\n redirectTo : 'Operating/Plants/:plantid',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/Site/Documentation/:plantid',\r\n redirectTo : 'Operating/Plants/:plantid/Files',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Operating/Plants/:plantid/Documentation',\r\n redirectTo : 'Operating/Plants/:plantid/Files',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Operating/Plants/:plantid/Documentation/Add',\r\n redirectTo : 'Operating/Plants/:plantid/Files/Add',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Operating/Plants/:plantid/Documentation/:fileid/Details',\r\n redirectTo : 'Operating/Plants/:plantid/Files/:fileid',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/Site/Alarms/:plantid',\r\n redirectTo : 'Operating/Plants/:plantid/Alarms',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/Site/WebPicture/:plantid',\r\n redirectTo : 'Operating/Plants/:plantid/WebPicture',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/BillingProduct/Settings/:billingid',\r\n redirectTo : 'Administration/BillingProduct/:billingid/Settings',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/BillingProduct/Details/:billingid',\r\n redirectTo : 'Administration/BillingProduct/:billingid/Settings',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/BillingProduct',\r\n redirectTo : 'Administration/BillingProduct:_rest',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/BillingNotificationTemplate/Settings/:billingnotficationid',\r\n redirectTo : 'SystemAdministration/BillingNotificationTemplate/:billingnotficationid/Settings/',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'SystemAdministration/BillingNotificationTemplate/Details/:billingnotficationid',\r\n redirectTo : 'SystemAdministration/BillingNotificationTemplate/:billingnotficationid/Settings/',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/Site/SiteFile/:plantid',\r\n redirectTo : '/Operating/Plants/:plantid/Documentation/Add',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/Site/Tasks/:plantid',\r\n redirectTo : '/Operating/Plants/:plantid/Tasks',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Home/Trend/:tileid/:dashboardid',\r\n redirectTo : '/Home/Dashboards/:dashboardid/Trend/:tileid',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/SiteAdministration/List',\r\n redirectTo : '/Administration/Plants',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Account/Manage',\r\n redirectTo : '/Account/Profile',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/Site',\r\n redirectTo : '/Operating/Plants',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'HomePage/:dashboardid',\r\n redirectTo : '/Home/Dashboards/:dashboardid',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'HomePage',\r\n redirectTo : '/Home/HomePage',\r\n pathMatch : 'full'\r\n },\r\n {\r\n path : 'Site/ApplicationSet/List',\r\n redirectTo: '/ApplicationSet',\r\n pathMatch : 'full'\r\n }\r\n];\r\n","import { WinFormsContentScreen } from '@winforms';\r\nimport { SubnaviDropDownService } from '@navigation';\r\nimport { __asyncI18n } from '@localisation';\r\nimport { RoutingEntry } from '@routing';\r\nimport { DummySiteComponent } from '@site-info';\r\nimport { ApplicationSetNaviExtension, getRoutes } from '@application-sets';\r\n\r\n\r\nexport function getApplicationSetRoutes(type) : Array {\r\n return [\r\n {\r\n path: 'CreateNewApplicationSet',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Create new Application', 'subnavi.application.settings'),\r\n\r\n contentRoute: (type === 'System')\r\n ? '/Site/ApplicationSet/Settings?isSystemApplicationSet=true'\r\n : (type === 'Tenant')\r\n ? '/Site/ApplicationSet/Settings?isTenantApplicationSet=true'\r\n : '/Site/ApplicationSet/Settings',\r\n\r\n testId: 'sidenavigation.link.create-new-applications-set',\r\n dontShowInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: 'CreateApplicationSetFromTemplate',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Create from template', 'subnavi.application.create-from-template'),\r\n contentRoute: (type === 'System')\r\n ? '/Site/ApplicationSet/CreateApplicationSetFromTemplate?isSystemApplicationSet=true'\r\n : (type === 'Tenant')\r\n ? '/Site/ApplicationSet/CreateApplicationSetFromTemplate?isTenantApplicationSet=true'\r\n : '/Site/ApplicationSet/CreateApplicationSetFromTemplate',\r\n\r\n testId: 'sidenavigation.link.create-applications-set-from-template',\r\n dontShowInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: ':applicationsetid',\r\n data: {\r\n title: ':applicationsetid | applicationSetIdToName',\r\n dontShowInSubNavigation: true,\r\n showSubNaviLevel: 3,\r\n //showChildrenAsSecondLevel: true,\r\n breadCrumbDropDown: SubnaviDropDownService,\r\n dynamicChildren: ApplicationSetNaviExtension,\r\n favouritesRouteColor: 'natural-green-light',\r\n favouritesRouteCaption: '[ApplicationSetName] / [PageName]',\r\n redirectTo: 'ApplicationSet/' + type + '/:applicationsetid/*firstChild'\r\n // redirectTo: '/Site/ApplicationSet'\r\n },\r\n\r\n children: [\r\n {\r\n path: '',\r\n component: DummySiteComponent,\r\n data: {\r\n title: ':applicationsetid | applicationSetIdToName',\r\n showSubNaviLevel: 3,\r\n dontShowInSubNavigation: true,\r\n breadCrumbDropDown: SubnaviDropDownService,\r\n dynamicChildren: ApplicationSetNaviExtension,\r\n favouritesRouteColor: 'natural-green-light',\r\n redirectTo: 'ApplicationSet/' + type + '/:applicationsetid/*firstChild',\r\n favouritesRouteCaption: '[ApplicationSetName] / [PageName]',\r\n }\r\n },\r\n {\r\n path : ':version',\r\n data : {\r\n title: 'version',\r\n showChildrenAsSecondLevel: true,\r\n dontShowInSubNavigation: true,\r\n redirectTo: 'ApplicationSet/' + type + '/:applicationsetid/:applicationsetid/*firstChild',\r\n showSubNaviLevel: 3\r\n },\r\n children: [...getRoutes(':applicationsetid')]\r\n }\r\n ]\r\n }\r\n ];\r\n}\r\n\r\n","import { Observable, BehaviorSubject } from 'rxjs';\r\n\r\nexport class UpgradeProcess {\r\n constructor(\r\n public buttonText: string,\r\n public action: () => Promise,\r\n public commandId: number,\r\n public testIdButton?: string,\r\n public testIdLabel?: string\r\n ){}\r\n\r\n public commandResult$: Observable;\r\n\r\n public success: boolean;\r\n\r\n public error: boolean;\r\n\r\n public state: string;\r\n\r\n public styleClass: string;\r\n\r\n public subject: BehaviorSubject;\r\n\r\n public async exec(){\r\n this.success = false;\r\n this.error = false;\r\n this.styleClass = 'right-aligned process-text';\r\n this.state = 'loading';\r\n this.subject = new BehaviorSubject({\r\n message: 'wird durchgeführt ...',\r\n payload: null,\r\n status: 5\r\n });\r\n this.commandResult$ = this.subject.asObservable();\r\n const result = await this.action();\r\n if(result) {\r\n this.subject.next(result);\r\n /*\r\n const subscription = action$.subscribe((value: any) => {\r\n sub.next(value);\r\n if(value.status === 4 || value.status === 0){\r\n setTimeout(() => subscription.unsubscribe());\r\n }\r\n });*/\r\n }else{\r\n this.subject.next({\r\n message: '',\r\n payload: null,\r\n status: 7\r\n });\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, Subject, BehaviorSubject, lastValueFrom } from 'rxjs';\r\nimport { UpgradeInfo, SiteFile } from './upgrade.info.interface';\r\nimport { UpgradeProcess } from './upgrade.process';\r\nimport { AuthHttp } from '@http';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { Config } from '@config';\r\nimport { RoutingInfoService } from '@routing';\r\nimport { custom } from 'devextreme/ui/dialog';\r\nimport { map } from 'rxjs/operators';\r\nimport { TenantService } from '@tenant';\r\nimport { __i18n } from '@localisation';\r\nimport { SerializedPollService } from 'modules/tools-module/serialized-poll.service';\r\n\r\n\r\nexport enum UpgradeCommands {\r\n restartcontroller = 'restartcontroller',\r\n stopcontrollerapplication = 'stopcontrollerapplication',\r\n startcontrollerapplication = 'startcontrollerapplication',\r\n startupgrade = 'startupgrade',\r\n uploadcloudmapping = 'uploadcloudmapping',\r\n scheduleautomaticupgrade = 'scheduleautomaticupgrade',\r\n uploadbacnetfile = 'uploadbacnetfile',\r\n createanduploadparameterfile = 'createanduploadparameterfile',\r\n createanduploadcontrollertracefile = 'createanduploadcontrollertracefile',\r\n sendfiletocontroller = 'sendfiletocontroller',\r\n sendparameterfiletocontroller = 'sendparameterfiletocontroller'\r\n}\r\n\r\n@Injectable()\r\nexport class UpgradeService {\r\n\r\n public upgradeInfoStream: Subject = new Subject();\r\n\r\n public upgradeInfo: Observable = this.upgradeInfoStream.asObservable();\r\n\r\n public siteFilesStream: Subject = new BehaviorSubject([]);\r\n\r\n public siteFiles: Observable = this.siteFilesStream.asObservable();\r\n\r\n constructor(\r\n protected authHttp: AuthHttp,\r\n protected urlEnhancerService: UrlEnhancerService,\r\n protected config: Config,\r\n private routingInfoService: RoutingInfoService,\r\n private tenantService: TenantService\r\n ) {}\r\n\r\n private async wait(time){\r\n return new Promise((resolve, reject) => {\r\n setTimeout(resolve, time);\r\n });\r\n }\r\n\r\n public async isPlantOnline(){\r\n const plantId = this.routingInfoService.getCurrentRoutingParams().plantid;\r\n const data = new FormData();\r\n data.append('ids[0]', plantId);\r\n const status: any = await lastValueFrom(this.authHttp\r\n .post(this.config.services.status.plantOnlineStatusUrl + this.tenantService.getCurrentTenantId(), data)\r\n .pipe(map((res) => res.json()))\r\n );\r\n\r\n return (status[plantId] === true) ? true : false;\r\n }\r\n\r\n public clearSendFileCache(){\r\n this.sendFileActions = {};\r\n }\r\n\r\n private sendFileActions: any = {};\r\n public getSendFileAction(siteFile: any){\r\n const actionName = siteFile.deviceFriendlyName + 'send';\r\n\r\n if(!this.sendFileActions[actionName]){\r\n this.sendFileActions[actionName] = new UpgradeProcess(actionName, async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really send to plant controller?', 'upgrade.confirm.action.send-to-controller.text')\r\n )) {\r\n\r\n const destination = siteFile.fileName\r\n const source = siteFile.associatedFile.id;\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.upgrade.sendFile, {\r\n commandname : UpgradeCommands.sendparameterfiletocontroller,\r\n filename : source,\r\n destinationfilename : destination,\r\n\r\n });\r\n const result = await lastValueFrom(this.authHttp.post(url, {}));\r\n return result.json();\r\n\r\n }\r\n return false;\r\n }, 20);\r\n }\r\n return this.sendFileActions[actionName];\r\n }\r\n\r\n public getDownloadFileAction(siteFile: any){\r\n const actionName = siteFile.deviceFriendlyName + 'download';\r\n\r\n if(!this.sendFileActions[actionName]){\r\n this.sendFileActions[actionName] = new UpgradeProcess(actionName, async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really upload from plant controller?', 'upgrade.confirm.action.download-from-controller.text')\r\n )) {\r\n\r\n const destination = siteFile.fileName\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.upgrade.downloadFileFromController, {\r\n destinationfilename : destination\r\n\r\n });\r\n const result = await lastValueFrom(this.authHttp.post(url, {}));\r\n return result.json();\r\n\r\n }\r\n return false;\r\n }, 20);\r\n }\r\n return this.sendFileActions[actionName];\r\n }\r\n\r\n public parameterFileAction(parameterBox: any, actionName: string){\r\n if(!this.sendFileActions[actionName]){\r\n this.sendFileActions[actionName] = new UpgradeProcess(actionName, async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really send to plant controller?', 'upgrade.confirm.action.dialog.send-to-controller.text')\r\n )) {\r\n const siteFile = parameterBox.getSelectedEntry();\r\n const fileName = (actionName === 'parameter') ? 'R:CSLPARA.BIN' : 'F:BACNET.CSV' ;\r\n let url = this.getParameterFileUrlActionName(actionName);\r\n url = this.urlEnhancerService.replaceParams(url, {\r\n commandname : UpgradeCommands.sendparameterfiletocontroller,\r\n filename : this.getFileName(siteFile),\r\n destinationfilename : fileName,\r\n\r\n })\r\n const result = await lastValueFrom(this.authHttp.post(url, {}));\r\n return result.json();\r\n }\r\n return false;\r\n }, 30);\r\n }\r\n return this.sendFileActions[actionName];\r\n }\r\n\r\n private getParameterFileUrlActionName(actionName){\r\n return (actionName === 'parameter') ? this.config.services.upgrade.sendParameterFile : this.config.services.upgrade.sendFile;\r\n }\r\n\r\n private getFileName(siteFile){\r\n return (siteFile) ? siteFile.SiteFileId || siteFile.id : null;\r\n }\r\n\r\n public async openConfirmDialog(title: string, text: string){\r\n return new Promise(async(resolve, reject) => {\r\n const dialog = custom({\r\n title,\r\n message: text,\r\n buttons: [\r\n {\r\n text: __i18n('Yes', 'form.data.has.changed.dialog.button.yes'),\r\n onClick: () => {\r\n dialog.hide();\r\n resolve(true);\r\n }\r\n },\r\n {\r\n text: __i18n('No', 'form.data.has.changed.dialog.button.no'),\r\n accessKey: 'esc',\r\n onClick: () => {\r\n dialog.hide();\r\n resolve(false);\r\n }\r\n }\r\n ]\r\n });\r\n\r\n try {\r\n await dialog.show();\r\n }catch(e) {\r\n dialog.hide();\r\n resolve(false);\r\n }\r\n });\r\n }\r\n\r\n public pollTime = 5000;\r\n\r\n public pollService: SerializedPollService = new SerializedPollService(async() => {\r\n await this.getData();\r\n }, this.pollTime)\r\n\r\n\r\n public subject : BehaviorSubject = new BehaviorSubject({});\r\n public observable = this.subject.asObservable();\r\n\r\n public async startStream(){\r\n this.pollService.start();\r\n return this.observable;\r\n }\r\n\r\n public stopStream(){\r\n this.pollService.stop();\r\n }\r\n\r\n public async getData(){\r\n const result = await this.getUpgradeInfos();\r\n this.subject.next(result);\r\n }\r\n\r\n public async getUpgradeInfos(){\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.upgrade.fileInfo);\r\n return lastValueFrom(this.authHttp.getJSON(url));\r\n }\r\n\r\n public async executeCommand(command: UpgradeCommands, data = {}){\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.upgrade.command, {\r\n commandname : command\r\n })\r\n return lastValueFrom(this.authHttp.postJSON(url, data));\r\n }\r\n\r\n public getActions() {\r\n return [\r\n new UpgradeProcess(__i18n('Restart controller', 'upgrade.action.restart.text'), async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really reset the plant controller?', 'upgrade.confirm.action.dialog.restart-controller.text')\r\n )) {\r\n const result = await this.executeCommand(UpgradeCommands.restartcontroller);\r\n return result;\r\n }\r\n return false;\r\n },\r\n 3,\r\n 'operatingupgrade.button.resetcontroller',\r\n 'operatingupgrade.label.resetcontrollerstatus'\r\n ),\r\n\r\n new UpgradeProcess(__i18n('Stop application', 'upgrade.action.stop.text'), async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really stop the application?', 'upgrade.confirm.action.dialog.stop-application.text')\r\n )) {\r\n const result = await this.executeCommand(UpgradeCommands.stopcontrollerapplication);\r\n return result;\r\n }\r\n return false;\r\n },\r\n 4,\r\n 'operatingupgrade.button.stopapplication',\r\n 'operatingupgrade.label.stopapplicationstatus'\r\n ),\r\n\r\n new UpgradeProcess(__i18n('Start upgrade process', 'upgrade.action.start-upgrade.text'), async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really start the upgrade for the plant controller?', 'upgrade.confirm.action.dialog.start-upgrade-process.text')\r\n )) {\r\n const result = await this.executeCommand(UpgradeCommands.startupgrade);\r\n return result;\r\n }\r\n return false;\r\n },\r\n 7,\r\n 'operatingupgrade.button.startupgrade',\r\n 'operatingupgrade.label.startupgradestatus'\r\n ),\r\n\r\n new UpgradeProcess(__i18n('Start application', 'upgrade.action.start-application.text'), async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really start the application?', 'upgrade.confirm.action.dialog.start-application.text')\r\n )) {\r\n const result = await this.executeCommand(UpgradeCommands.startcontrollerapplication);\r\n return result;\r\n }\r\n return false;\r\n },\r\n 5,\r\n 'operatingupgrade.button.startapplication',\r\n 'operatingupgrade.label.startapplicationstatus'\r\n ),\r\n\r\n new UpgradeProcess(__i18n('Upload cloud mapping', 'upgrade.action.upload-cloud-mapping.text'), async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really upload the description?', 'upgrade.confirm.action.dialog.upload-cloud-mapping.text')\r\n )) {\r\n const result = await this.executeCommand(UpgradeCommands.uploadcloudmapping);\r\n return result;\r\n }\r\n return false;\r\n },\r\n 9,\r\n 'operatingupgrade.button.uploaddescription',\r\n 'operatingupgrade.label.uploaddescriptionstatus'\r\n ),\r\n\r\n new UpgradeProcess(\r\n __i18n('Create controller trace', 'upgrade.action.create-controller-trace.text'),\r\n async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really create controller trace file?', 'upgrade.confirm.action.dialog.create-controller-trace.text')\r\n )) {\r\n const result = await this.executeCommand(UpgradeCommands.createanduploadcontrollertracefile);\r\n return result;\r\n }\r\n return false;\r\n },\r\n 10,\r\n 'operatingupgrade.button.createtracefile',\r\n 'operatingupgrade.label.createtracefilestatus'\r\n ),\r\n\r\n new UpgradeProcess(\r\n __i18n('Create parameter file', 'upgrade.action.create-parameter-file.text'),\r\n async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n('Really create parameter file?', 'upgrade.confirm.action.dialog.create-parameter-file.text')\r\n )) {\r\n const result = await this.executeCommand(UpgradeCommands.createanduploadparameterfile);\r\n return result;\r\n }\r\n return false;\r\n },\r\n 11,\r\n 'operatingupgrade.button.createparameterfile',\r\n 'operatingupgrade.label.createparameterfilestatus'\r\n ),\r\n\r\n new UpgradeProcess(__i18n('Create BACnet file', 'upgrade.action.create-bacnet-file.text'), async() => {\r\n if(await this.openConfirmDialog(\r\n __i18n('Confirm', 'upgrade.confirm.action.dialog.topic'),\r\n __i18n(\r\n 'Really upload the BACnet file?',\r\n 'upgrade.confirm.action.dialog.create-bacnet-file.text'\r\n )\r\n )) {\r\n /*\r\n const utcDiff = new Date().getTimezoneOffset();\r\n const commandResult = await upgradeResource.proxy.uploadBacNetConfigFile(\r\n tenantId, plantId, utcDiff\r\n );*/\r\n const result = await this.executeCommand(UpgradeCommands.uploadbacnetfile);\r\n return result;\r\n \r\n }\r\n return false;\r\n },\r\n 12,\r\n 'operatingupgrade.button.createbacnetfile',\r\n 'operatingupgrade.label.createbacnetfilestatus'\r\n )\r\n ];\r\n }\r\n\r\n public reset(){\r\n this.sendFileActions = {};\r\n this.stopStream();\r\n }\r\n\r\n public async startUpgrade(data: any) {\r\n const result = await this.executeCommand(UpgradeCommands.scheduleautomaticupgrade, data);\r\n return result;\r\n }\r\n\r\n\r\n public acknowlegeUpgradPriority() {\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.upgrade.acknowledgeUpgradePrio);\r\n return lastValueFrom(this.authHttp.putJSON(url, {}));\r\n }\r\n\r\n}\r\n","import { Component, ViewChild, HostBinding, Input, ElementRef, Renderer2 } from '@angular/core';\r\nimport { UpgradeService } from './upgrade.service';\r\nimport ArrayStore from 'devextreme/data/array_store';\r\nimport { __i18n, LocalisationService } from '@localisation';\r\n\r\n@Component({\n selector: 'parameter-window',\n templateUrl: './parameter-window.template.html',\n standalone: false\n})\r\nexport class ParameterWindowComponent {\r\n constructor(\r\n public localisation: LocalisationService\r\n ){}\r\n\r\n @ViewChild('slider', { static : false})\r\n public slider: any;\r\n\r\n @ViewChild('upgradeGrid', { static : false})\r\n public upgradeGrid: any;\r\n\r\n @ViewChild('plantGrid', { static : false})\r\n public plantGrid: any;\r\n\r\n @ViewChild('applicationSetGrid', { static : false})\r\n public applicationSetGrid: any;\r\n\r\n @ViewChild('backupPersistentGrid', { static : false})\r\n public backupPersistentGrid: any;\r\n\r\n @ViewChild('backupGrid', { static : false})\r\n public backupGrid: any;\r\n\r\n @Input()\r\n public selector: any;\r\n\r\n public innerData: any;\r\n\r\n @Input()\r\n public addCurrentEntry: boolean = false;\r\n\r\n @Input()\r\n public set data(data: any){\r\n if(JSON.stringify(data) === JSON.stringify(this.innerData)){\r\n return;\r\n }\r\n this.innerData = data;\r\n this.plantData = new ArrayStore({\r\n key: 'SiteFileId',\r\n data: (data?.parameterFileNames?.length)\r\n ? data.parameterFileNames.filter((current) => !current.IsDeviceUpload) : []\r\n });\r\n\r\n this.upgradeData = new ArrayStore({\r\n key: 'SiteFileId',\r\n data: (() => {\r\n const entries = (data?.parameterFileNames?.length)\r\n ? data.parameterFileNames.filter((current) => current.IsDeviceUpload) : [];\r\n if(this.addCurrentEntry){\r\n entries.unshift({\r\n SiteFileId: null,\r\n FileName : __i18n('', 'upgrade.use-current.text')\r\n });\r\n }\r\n return entries;\r\n })()\r\n });\r\n\r\n\r\n this.applicationData = new ArrayStore({\r\n key: 'id',\r\n data: (data.applicationSetParameterFile) ? [data.applicationSetParameterFile] : null\r\n });\r\n this.selectRows();\r\n }\r\n\r\n public get data(){\r\n return this.innerData;\r\n }\r\n\r\n public selectedRowKeys: any;\r\n\r\n public selectionFilter: any;\r\n\r\n public plantData: any;\r\n\r\n public upgradeData: any;\r\n\r\n public applicationData: any;\r\n\r\n public selectedEntry: any;\r\n\r\n public selectEntry(e){\r\n this.selectedEntry = e.data;\r\n if(this.innerData.parameterFileUuid === e.data.id || this.innerData.parameterFileUuid.SiteFileId){\r\n this.selector.selectEntry(__i18n('', 'upgrade.use-application-set.text'));\r\n }else{\r\n this.selector.selectEntry(e.data.FileName || e.data.fileName);\r\n }\r\n }\r\n\r\n public deSelectEntries(selected){\r\n for(const grid of this.grids){\r\n grid.grid.deselectAll();\r\n }\r\n }\r\n\r\n private selectUuid() {\r\n this.plantGrid.selectRows([this.innerData.parameterFileUuid]);\r\n this.upgradeGrid.selectRows([this.innerData.parameterFileUuid]);\r\n if(this.innerData.applicationSetParameterFile) {\r\n this.applicationSetGrid.selectRows([this.innerData.parameterFileUuid]);\r\n }\r\n this.selector.selectEntry(__i18n('', 'upgrade.use-application-set.text'));\r\n this.selectedEntry = {\r\n SiteFileId : this.innerData.parameterFileUuid\r\n // Version : this.innerData.\r\n };\r\n }\r\n\r\n private selectParameterFileNames() {\r\n if(this.innerData.parameterFileNames.length){\r\n this.plantGrid.selectRows([this.innerData.parameterFileNames[0].SiteFileId]);\r\n this.upgradeGrid.selectRows([this.innerData.parameterFileNames[0].SiteFileId]);\r\n this.selector.selectEntry(this.innerData.parameterFileNames[0].FileName);\r\n this.selectedEntry = this.innerData.parameterFileNames[0];\r\n }\r\n }\r\n\r\n\r\n public selectRows(){\r\n if(this.addCurrentEntry){\r\n //this.upgradeGrid.selectRows(['--00--']);\r\n this.selector.selectEntry(__i18n('', 'upgrade.use-current.text'));\r\n this.selectedEntry = null;\r\n }else{\r\n if(this.upgradeGrid){\r\n if(this.innerData.parameterFileUuid){\r\n this.selectUuid();\r\n }else{\r\n this.selectParameterFileNames();\r\n }\r\n this.slideToSelected();\r\n }\r\n }\r\n }\r\n\r\n private selectSelected(){\r\n if(!this.selectedEntry){\r\n return;\r\n }\r\n for(const grid of this.grids){\r\n if(this.selectedEntry.SiteFileId) {\r\n grid.grid.selectRows([this.selectedEntry.SiteFileId]);\r\n }else if(this.selectedEntry.id){\r\n grid.grid.selectRows([this.selectedEntry.id]);\r\n }else{\r\n grid.grid.deselectAll();\r\n }\r\n }\r\n }\r\n\r\n public slideToSelected() {\r\n this.selectSelected();\r\n if(this.selectedEntry) {\r\n for(const grid of this.grids){\r\n if(grid.instance.getSelectedRowsData().find((current) => {\r\n const result = this.selectedEntry\r\n && (\r\n this.selectedEntry.SiteFileId && (this.selectedEntry.SiteFileId === current.SiteFileId)\r\n || this.selectedEntry.SiteFileId && (this.selectedEntry.SiteFileId === current.id)\r\n || this.selectedEntry.id && (this.selectedEntry.id === current.id)\r\n || this.selectedEntry.id && (this.selectedEntry.id === current.SiteFileId)\r\n );\r\n return result;\r\n })){\r\n this.slider.slideToName(grid.name);\r\n }else{\r\n grid.grid.deselectAll();\r\n }\r\n }\r\n }\r\n }\r\n\r\n public getSelectedEntry(){\r\n return this.selectedEntry;\r\n }\r\n\r\n public grids: any[] = [];\r\n\r\n public ngAfterViewInit(){\r\n\r\n setTimeout(() => {\r\n this.grids.push({\r\n name : 'upgrade',\r\n instance : this.upgradeGrid.dxDataGrid.instance,\r\n grid : this.upgradeGrid\r\n });\r\n this.grids.push({\r\n name : 'plant',\r\n instance : this.plantGrid.dxDataGrid.instance,\r\n grid : this.plantGrid\r\n });\r\n this.grids.push({\r\n name : 'application-set',\r\n instance : this.applicationSetGrid.dxDataGrid.instance,\r\n grid : this.applicationSetGrid\r\n });\r\n this.grids.push({\r\n name : 'backup-persistent',\r\n instance : this.backupPersistentGrid.dxDataGrid.instance,\r\n grid : this.backupPersistentGrid\r\n });\r\n this.grids.push({\r\n name : 'backup',\r\n instance : this.backupGrid.dxDataGrid.instance,\r\n grid : this.backupGrid\r\n });\r\n this.selectRows();\r\n this.selector.onOpen.subscribe(() => {\r\n setTimeout(() => this.slideToSelected(), 100);\r\n });\r\n });\r\n }\r\n}\r\n","\r\n
    \r\n Upgrade\r\n Plant\r\n Application Set\r\n Backup persistent\r\n Backup\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, ViewChild, Input } from '@angular/core';\r\nimport ArrayStore from 'devextreme/data/array_store';\r\nimport { __i18n, LocalisationService } from '@localisation';\r\n\r\n\r\n\r\n@Component({\n selector: 'bacnet-parameter-window',\n templateUrl: './bac-net.parameter-window.template.html',\n standalone: false\n})\r\nexport class BacNetParameterWindowComponent {\r\n constructor(\r\n public localisation: LocalisationService\r\n ){}\r\n\r\n @ViewChild('slider', { static : false})\r\n public slider: any;\r\n\r\n @ViewChild('upgradeGrid', { static : false})\r\n public upgradeGrid: any;\r\n\r\n @ViewChild('applicationSetGrid', { static : false})\r\n public applicationSetGrid: any;\r\n\r\n @Input()\r\n public selector: any;\r\n\r\n private innerData: any;\r\n\r\n @Input()\r\n private addCurrentEntry: boolean = false;\r\n\r\n @Input()\r\n public set data(data: any){\r\n if(JSON.stringify(data) === JSON.stringify(this.innerData)){\r\n return;\r\n }\r\n this.innerData = data;\r\n this.upgradeData = new ArrayStore({\r\n key: 'SiteFileId',\r\n data: (() => {\r\n if(!data?.bacnetFiles?.length){\r\n return [];\r\n }\r\n let entries = [ ...data.bacnetFiles ];\r\n if(this.addCurrentEntry){\r\n entries = entries || [];\r\n entries.unshift({\r\n SiteFileId: null,\r\n FileName : __i18n('', 'upgrade.use-current.text')\r\n });\r\n }\r\n return entries;\r\n })()\r\n });\r\n this.applicationSetData = new ArrayStore({\r\n key: 'id',\r\n data: (data.applicationSetBacnetFile) ? [data.applicationSetBacnetFile] : null\r\n });\r\n\r\n this.selectRows();\r\n }\r\n\r\n public get data(){\r\n return this.innerData;\r\n }\r\n\r\n private selectRows(){\r\n if(this.addCurrentEntry){\r\n this.selector.selectEntry(__i18n('', 'upgrade.use-current.text'));\r\n this.selectedEntry = null;\r\n }else{\r\n if(this.upgradeGrid){\r\n if(this.innerData.bacnetFileUuid){\r\n this.upgradeGrid.selectRows([this.innerData.bacnetFileUuid]);\r\n if(this.innerData.applicationSetBacnetFile) {\r\n this.applicationSetGrid.selectRows([this.innerData.bacnetFileUuid]);\r\n }\r\n this.selector.selectEntry(__i18n('', 'upgrade.use-application-set.text'));\r\n this.selectedEntry = {\r\n SiteFileId : this.innerData.bacnetFileUuid\r\n };\r\n }else{\r\n if(this.innerData.bacnetFiles.length){\r\n this.upgradeGrid.selectRows([this.innerData.bacnetFiles[0].SiteFileId]);\r\n this.applicationSetGrid.selectRows([this.innerData.bacnetFiles[0].SiteFileId]);\r\n this.selector.selectEntry(this.innerData.bacnetFiles[0].FileName);\r\n this.selectedEntry = this.innerData.bacnetFiles[0];\r\n }\r\n }\r\n this.slideToSelected();\r\n }\r\n }\r\n }\r\n\r\n private grids: any[] = [];\r\n\r\n private selectSelected(){\r\n if(!this.selectedEntry){\r\n return;\r\n }\r\n for(const grid of this.grids){\r\n if(this.selectedEntry.SiteFileId) {\r\n grid.grid.selectRows([this.selectedEntry.SiteFileId]);\r\n }else if(this.selectedEntry.id){\r\n grid.grid.selectRows([this.selectedEntry.id]);\r\n }else{\r\n grid.grid.deselectAll();\r\n }\r\n }\r\n }\r\n\r\n private slideToSelected() {\r\n if(this.selectedEntry) {\r\n this.selectSelected();\r\n let isSlided = false;\r\n for(const grid of this.grids){\r\n if(grid.instance.getSelectedRowsData().find((current) => {\r\n const result = this.selectedEntry\r\n && (\r\n this.selectedEntry.SiteFileId && (this.selectedEntry.SiteFileId === current.SiteFileId)\r\n || this.selectedEntry.SiteFileId && (this.selectedEntry.SiteFileId === current.id)\r\n || this.selectedEntry.id && (this.selectedEntry.id === current.id)\r\n || this.selectedEntry.id && (this.selectedEntry.id === current.SiteFileId)\r\n );\r\n return result;\r\n })){\r\n if(!isSlided) {\r\n this.slider.slideToName(grid.name);\r\n isSlided = true;\r\n }\r\n }else{\r\n grid.grid.deselectAll();\r\n }\r\n }\r\n }\r\n }\r\n\r\n public applicationSetData: any;\r\n\r\n public upgradeData: any;\r\n\r\n private selectedEntry: any;\r\n\r\n public selectEntry(e){\r\n this.selectedEntry = e.data;\r\n if(this.innerData.bacnetFileUuid === e.data.id || this.innerData.bacnetFileUuid.SiteFileId){\r\n this.selector.selectEntry(__i18n('', 'upgrade.use-application-set.text'));\r\n }else{\r\n this.selector.selectEntry(e.data.FileName || e.data.fileName);\r\n }\r\n }\r\n\r\n public getSelectedEntry(){\r\n return this.selectedEntry;\r\n }\r\n\r\n public ngAfterViewInit(){\r\n setTimeout(() => {\r\n this.grids.push({\r\n name : 'upgrade',\r\n instance : this.upgradeGrid.dxDataGrid.instance,\r\n grid : this.upgradeGrid\r\n });\r\n \r\n this.grids.push({\r\n name : 'application-set',\r\n instance : this.applicationSetGrid.dxDataGrid.instance,\r\n grid : this.applicationSetGrid\r\n });\r\n \r\n this.selectRows();\r\n \r\n this.selector.onOpen.subscribe(() => {\r\n setTimeout(() => this.slideToSelected(), 100);\r\n });\r\n });\r\n\r\n }\r\n}\r\n","\r\n
    \r\n Upgrade\r\n Application Set\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, ViewChild, Input } from '@angular/core';\r\nimport ArrayStore from 'devextreme/data/array_store';\r\nimport { __i18n, LocalisationService } from '@localisation';\r\nimport { ParameterWindowComponent } from './parameter-window.component';\r\n\r\n@Component({\n selector: 'mapping-window',\n templateUrl: './mapping-window.template.html',\n standalone: false\n})\r\nexport class MappingWindowComponent extends ParameterWindowComponent {\r\n constructor(\r\n public localisation: LocalisationService\r\n ){\r\n super(localisation)\r\n }\r\n\r\n @ViewChild('slider', { static : false})\r\n public slider: any;\r\n\r\n @ViewChild('plantGrid', { static : false})\r\n public plantGrid: any;\r\n\r\n @ViewChild('applicationSetGrid', { static : false})\r\n public applicationSetGrid: any;\r\n\r\n\r\n @Input()\r\n public set data(data: any){\r\n if(JSON.stringify(data) === JSON.stringify(this.innerData)){\r\n return;\r\n }\r\n this.innerData = data;\r\n this.plantData = new ArrayStore({\r\n key: 'SiteFileId',\r\n data: (data?.objectHandlerMappingFileNames?.length)\r\n ? data.objectHandlerMappingFileNames : []\r\n });\r\n\r\n this.applicationData = new ArrayStore({\r\n key: 'id',\r\n data: (data.applicationSetObjectHandlerMappingFile) ? [data.applicationSetObjectHandlerMappingFile] : null\r\n });\r\n this.selectRows();\r\n }\r\n\r\n public get data(){\r\n return this.innerData;\r\n }\r\n\r\n public selectRows(){\r\n if(this.addCurrentEntry){\r\n this.selector.selectEntry(__i18n('', 'upgrade.use-application-set.text'));\r\n this.selectedEntry = null;\r\n }\r\n }\r\n\r\n public ngAfterViewInit(){\r\n\r\n setTimeout(() => {\r\n this.grids.push({\r\n name : 'plant',\r\n instance : this.plantGrid.dxDataGrid.instance,\r\n grid : this.plantGrid\r\n });\r\n this.grids.push({\r\n name : 'application-set',\r\n instance : this.applicationSetGrid.dxDataGrid.instance,\r\n grid : this.applicationSetGrid\r\n });\r\n this.selectRows();\r\n this.selector.onOpen.subscribe(() => {\r\n setTimeout(() => this.slideToSelected(), 100);\r\n });\r\n });\r\n }\r\n}\r\n","
    \r\n Plant\r\n Application Set\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, Input, ViewChild } from '@angular/core';\r\nimport { UserService } from '@user';\r\nimport { UpgradeService } from './upgrade.service';\r\nimport { MessagesComponent, MessagesService, MessageType } from '@ui-messages';\r\nimport { PlantService } from '@plants';\r\nimport { __i18n } from '@localisation';\r\nimport { ButtonStates, ClxButtonComponent } from '@forms/clx-forms/controls/clx.button.component';\r\n\r\n@Component({\n selector: 'upgrade-configuration',\n templateUrl: './upgrade-configuration.template.html',\n standalone: false\n})\r\nexport class UpgradeConfigurationComponent {\r\n constructor(\r\n public user: UserService,\r\n public upgradeService: UpgradeService,\r\n public messageService: MessagesService,\r\n public plantService: PlantService\r\n ){\r\n this.notify = user.getUser().username || '';\r\n }\r\n\r\n public notify: string;\r\n\r\n @ViewChild('parameter', { static : false })\r\n public parameterFile: any;\r\n\r\n @ViewChild('bacnetParameter', { static : false })\r\n public bacnetParameterFile: any;\r\n\r\n @ViewChild('mapping', { static : false })\r\n public mappingFile: any;\r\n\r\n @ViewChild('savebutton', { static : false })\r\n public saveButton: ClxButtonComponent;\r\n\r\n public innerResource: any;\r\n\r\n @Input()\r\n public set resource(resource: any){\r\n this.innerResource = resource;\r\n if(resource?.objectHandlerMappingFileNames?.length){\r\n this.showMappingFile = true;\r\n }\r\n }\r\n\r\n public get resource(){\r\n return this.innerResource;\r\n }\r\n\r\n public isVisible: boolean = false;\r\n\r\n public showMappingFile: boolean = false;\r\n\r\n public currentDate() {\r\n return this.now;\r\n }\r\n\r\n public async send(data){\r\n this.saveButton.state = ButtonStates.loading;\r\n this.saveButton.disabled = true;\r\n const parameter = (this.parameterFile) ? this.parameterFile.getSelectedEntry() : null;\r\n const bacnetParameterFile = (this.bacnetParameterFile) ? this.bacnetParameterFile.getSelectedEntry() : null;\r\n const mappingFile = (this.mappingFile) ? this.mappingFile.getSelectedEntry() : null;\r\n const output = {\r\n startTime : this.now,\r\n scopeConfigFileName : null,\r\n fileDownloadTimeout : data.FileDownloadTimeout,\r\n applicationShutdownTimeout : data.ApplicationShutdownTimeout,\r\n retryCount : data.RetryCount,\r\n notificationRecipients : data.NotificationRecipients,\r\n parameterFileName : (parameter && (parameter.SiteFileId || parameter.id))\r\n ? parameter.SiteFileId || parameter.id\r\n : null,\r\n bacnetFileName : (bacnetParameterFile && (bacnetParameterFile.SiteFileId || bacnetParameterFile.id))\r\n ? bacnetParameterFile.SiteFileId || bacnetParameterFile.id\r\n : null,\r\n mappingFileName : (mappingFile && mappingFile.SiteFileId)\r\n ? mappingFile.SiteFileId\r\n : null,\r\n comment : data.Comment\r\n };\r\n\r\n const result = await this.upgradeService.startUpgrade(output);\r\n if(result.status === 4) {\r\n this.messageService.addMessage({\r\n text : result.message,\r\n type : MessageType.error\r\n });\r\n }\r\n\r\n const currentPlant = await this.plantService.getCurrentPlant();\r\n this.messageService.addMessage({\r\n type : MessageType.success,\r\n text : __i18n('Upgrade process for plant [plantName] scheduled.', 'upgrade.task.scheduled.message').replace('[plantName]', currentPlant.name)\r\n });\r\n this.close();\r\n this.saveButton.state = null;\r\n this.saveButton.disabled = null;\r\n }\r\n\r\n public now: number = Date.now();\r\n\r\n public initValue : number;\r\n\r\n public open(){\r\n this.isVisible = true;\r\n this.now = Date.now();\r\n\r\n }\r\n\r\n public close(){\r\n this.isVisible = false;\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n Schedule\r\n \r\n \r\n \r\n \r\n \r\n \r\n Download timeout(minutes)\r\n \r\n \r\n \r\n Application shutdown timeout(minutes)\r\n \r\n \r\n \r\n Retries\r\n \r\n \r\n \r\n Notify\r\n \r\n \r\n \r\n Mapping File\r\n \r\n \r\n \r\n \r\n \r\n Parameter\r\n \r\n \r\n \r\n \r\n \r\n BACnet\r\n \r\n \r\n \r\n \r\n \r\n Comment\r\n \r\n \r\n \r\n Ok\r\n Cancel\r\n \r\n \r\n","import { Component, AfterViewInit, OnDestroy, ViewChild } from '@angular/core';\r\nimport { Config } from '@config';\r\nimport { UpgradeService } from './upgrade.service';\r\nimport { SiteFile } from './upgrade.info.interface';\r\nimport { RoutingInfoService } from '@routing';\r\nimport { TenantService } from '@tenant';\r\nimport { __i18n } from '@localisation';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { UpgradeProcess } from './upgrade.process';\r\nimport { Comparator, copy } from '@tools';\r\nimport { Subject } from 'rxjs';\r\nimport { ClxButtonComponent, ButtonStates } from '@forms/clx-forms/controls/clx.button.component';\r\nimport { DialogService, DialogType } from '@ui-dialog';\r\n\r\n@Component({\n selector: 'upgrade',\n templateUrl: './upgrade.template.html',\n standalone: false\n})\r\nexport class UpgradeComponent implements AfterViewInit, OnDestroy {\r\n public upgradeResource: any;\r\n public actions: UpgradeProcess[];\r\n\r\n constructor(\r\n public upgradeService: UpgradeService,\r\n private config: Config,\r\n private routingInfoService: RoutingInfoService,\r\n private tenantService: TenantService,\r\n private urlEnhancer: UrlEnhancerService,\r\n private comparator: Comparator,\r\n private dialogService: DialogService\r\n ){\r\n const dataObservable = this.dataSubject.asObservable();\r\n this.upgradeResource = {\r\n model$ : dataObservable\r\n }\r\n }\r\n\r\n public dataSubject : Subject = new Subject();\r\n\r\n @ViewChild('parameter', { static : false})\r\n public parameter: any;\r\n\r\n @ViewChild('bacnetParameter', { static : false})\r\n public bacnetParameter: any;\r\n\r\n @ViewChild('acknowledgeButton', { static : false})\r\n public acknowledgeButton: ClxButtonComponent;\r\n\r\n public useApplicationSetText: string = __i18n('use application set', 'upgrade.user-application-set.text');\r\n\r\n public chooseFileText: string = __i18n('choose file', 'upgrade.choose-file.text');\r\n\r\n public upgradeButtonState: boolean = null;\r\n\r\n private subscriptions: any[] = [];\r\n\r\n public getVersionCellStyle(siteFile: SiteFile){\r\n if(siteFile.associatedFile){\r\n if(siteFile.uuidDevice) {\r\n if(\r\n (siteFile.associatedFile.fileUuid === siteFile.uuidDevice)\r\n || (\r\n siteFile.associatedFile.fileUuid === this.config.emptyGuid\r\n && (this.hasEmptyGuid(siteFile.uuidDevice))\r\n )\r\n ){\r\n return 'success-background inverted-font-color';\r\n }else{\r\n return 'error-background inverted-font-color';\r\n }\r\n }else{\r\n return 'grey-background inverted-font-color';\r\n }\r\n }else{\r\n return 'success-background inverted-font-color';\r\n }\r\n }\r\n\r\n public getLocalCellStyle(siteFile: SiteFile){\r\n if(siteFile.associatedFile){\r\n if(siteFile.uuidFile) {\r\n if(\r\n (siteFile.associatedFile.fileUuid === siteFile.uuidFile)\r\n || (\r\n siteFile.associatedFile.fileUuid === this.config.emptyGuid\r\n && (this.hasEmptyGuid(siteFile.uuidFile))\r\n )\r\n ){\r\n return 'success-background inverted-font-color';\r\n }\r\n return 'error-background inverted-font-color';\r\n }else{\r\n if(\r\n (siteFile.uuidDevice === siteFile.associatedFile.fileUuid\r\n || (\r\n siteFile.associatedFile.fileUuid === this.config.emptyGuid\r\n && this.hasEmptyGuid(siteFile.uuidDevice))\r\n )\r\n ){\r\n return 'dark-yellow-background inverted-font-color';\r\n }\r\n return 'error-background inverted-font-color';\r\n }\r\n }else{\r\n return 'success-background inverted-font-color';\r\n }\r\n }\r\n\r\n public hasEmptyGuid(value: string){\r\n if(\r\n value\r\n && (\r\n value === 'ffffffff-ffff-ffff-ffff-ffffffffffff'\r\n || value === this.config.emptyGuid\r\n )\r\n ){\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n public currentApplicationSet: string;\r\n\r\n public oldData : any = null;\r\n\r\n public async ngAfterViewInit() {\r\n const plantId = this.routingInfoService.getCurrentRoutingParams().plantid;\r\n const tenantId = this.tenantService.getCurrentTenantId();\r\n const observable = await this.upgradeService.startStream();\r\n this.subscriptions.push(\r\n observable.subscribe((data) => {\r\n if(this.changesPredicted(this.oldData, data)){\r\n this.updateData(data);\r\n this.dataSubject.next(data);\r\n this.oldData = copy(data);\r\n }\r\n })\r\n )\r\n\r\n this.actions = this.upgradeService.getActions();\r\n const status = await this.upgradeService.isPlantOnline();\r\n if(status){\r\n this.upgradeButtonState = null;\r\n }\r\n }\r\n\r\n public updateData(current){\r\n if(current && current.ctrlTraceFiles && current.ctrlTraceFiles.length) {\r\n current.traceSelect = current.ctrlTraceFiles.map((current) => {\r\n return {\r\n text : current.FileName,\r\n value : current.SiteFileId\r\n };\r\n });\r\n if(!current.traceSelect.find((current) => current.selected)){\r\n current.traceSelect[0].selected = true;\r\n }\r\n }\r\n if(current && current.applicationSetId !== this.currentApplicationSet){\r\n this.upgradeService.clearSendFileCache();\r\n this.currentApplicationSet = current.applicationSetId;\r\n }\r\n }\r\n\r\n\r\n public changesPredicted(oldModel, newModel){\r\n if(newModel && newModel.ctrlTraceFiles && newModel.ctrlTraceFiles.length) {\r\n newModel.traceSelect = newModel.ctrlTraceFiles.map((current) => {\r\n return {\r\n text : current.FileName,\r\n value : current.SiteFileId\r\n };\r\n });\r\n }\r\n return !this.comparator.areEqual(oldModel, newModel, ['selected']);\r\n }\r\n\r\n\r\n public convertParameterValue(value: any){\r\n return value.map((current) => {\r\n return {\r\n text : current.FileName, value : current.SiteFileId\r\n };\r\n });\r\n }\r\n\r\n public getTestName(siteFile) {\r\n let name = siteFile.deviceFriendlyName || siteFile.deviceName;\r\n name = name.replace(/ /gm, '-');\r\n return name.toLowerCase();\r\n }\r\n\r\n public download(file: string){\r\n switch(file) {\r\n case 'parameter':\r\n file = (this.parameter.selectedEntry)\r\n ? this.parameter.selectedEntry.SiteFileId || this.parameter.selectedEntry.id : '';\r\n break;\r\n case 'bacnetParameter':\r\n file = (this.bacnetParameter.selectedEntry)\r\n ? this.bacnetParameter.selectedEntry.SiteFileId || this.bacnetParameter.selectedEntry.id : '';\r\n break;\r\n case 'releaseNotes':\r\n file = 'releaseNotesFile'\r\n break;\r\n\r\n }\r\n if(file) {\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.downloadFile)\r\n + '?filename=' + encodeURI(file);\r\n\r\n const element = document.createElement('a');\r\n element.setAttribute('href', url);\r\n element.setAttribute('download', file);\r\n element.style.display = 'none';\r\n document.body.appendChild(element);\r\n element.click();\r\n document.body.removeChild(element);\r\n }else{\r\n console.info('File not defined!')\r\n }\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.subscriptions.forEach((current) => {\r\n if(current && current.unsubscribe){\r\n current.unsubscribe();\r\n }\r\n });\r\n this.upgradeService.reset();\r\n this.oldData = null;\r\n }\r\n\r\n public downloadFile(siteFile: SiteFile){\r\n if(siteFile && siteFile.associatedFile && siteFile.associatedFile.fileUuid){\r\n this.download(siteFile.associatedFile.id);\r\n }\r\n }\r\n\r\n public getStateText(commandResult: any, commandId: number){\r\n switch(commandResult.status){\r\n case 0:\r\n return __i18n('OK', 'upgrade.command.result.status.0');\r\n case 4:\r\n return commandResult.message;\r\n case 5:\r\n return __i18n('in progress...', 'upgrade.command.result.status.5');\r\n case 6:\r\n return __i18n('Timeout!', 'upgrade.command.result.status.6');\r\n case 999:\r\n return ''\r\n }\r\n return commandResult.message;\r\n }\r\n\r\n public resetStateTexts(){\r\n this.actions.forEach((current) => {\r\n if(current.subject){\r\n if(current.subject.getValue().status === 0){\r\n current.subject.next({\r\n message: '',\r\n payload: null,\r\n status: 999\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n public fileStates: any = {};\r\n\r\n public getFileState(deviceFriendlyName: string){\r\n return this.fileStates[deviceFriendlyName];\r\n }\r\n\r\n\r\n public realeasNotesStatus: string = 'ok';\r\n\r\n public async acknowledgeReleasNotes() {\r\n\r\n const result = await this.dialogService.show({\r\n type: DialogType.yesNo,\r\n title: __i18n('Acknowlege notification', 'operating.upgrade.dialog.title.acknowlege-notificatio'),\r\n message: __i18n('You really want to acknowlege the notification?', 'operating.upgrade.dialog.text.acknowlege-notification')\r\n });\r\n\r\n if(result) {\r\n this.acknowledgeButton.state = ButtonStates.loading;\r\n await this.upgradeService.acknowlegeUpgradPriority()\r\n }else{\r\n this.acknowledgeButton.state = null;\r\n }\r\n }\r\n}\r\n","\r\n
\r\n \r\n Application set:\r\n {{resource.applicationSetName}}\r\n \r\n \r\n Version:\r\n {{resource.applicationSetVersion}}\r\n \r\n
\r\n\r\n\r\n \r\n

Application Set files

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n 1 && resource.releaseNotesFile\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
TypeDeviceLocal LoadedApplication setActions
{{siteFile.deviceFriendlyName || siteFile.deviceName}}{{(siteFile.versionDevice) ? 'V ' + siteFile.versionDevice : '---' }}\r\n Not stored\r\n V {{siteFile.versionFile}}\r\n V --.--\r\n ---\r\n \r\n V {{siteFile.associatedFile.version}}\r\n No file available\r\n \r\n \r\n \r\n \r\n
\r\n {{siteFile.uuidDevice}}\r\n \r\n {{(hasEmptyGuid(siteFile.uuidFile)) ? '---' : siteFile.uuidFile}}\r\n \r\n {{(hasEmptyGuid(siteFile.associatedFile.fileUuid)) ? '---' : siteFile.associatedFile.fileUuid}}\r\n \r\n \r\n {{getStateText(commandResult, upgradeService.getDownloadFileAction(siteFile).commandId)}}\r\n \r\n \r\n {{getStateText(commandResult, upgradeService.getSendFileAction(siteFile).commandId)}}\r\n \r\n
Release notes\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Acknowledge notification\r\n
\r\n\r\n \r\n Start Upgrade\r\n \r\n \r\n\r\n

Site files

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
TypeCreated site filesActions
Parameters\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {{getStateText(commandResult, upgradeService.parameterFileAction(parameter, 'parameter').commandId)}}\r\n \r\n
BACnet\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {{getStateText(commandResult, upgradeService.parameterFileAction(bacnetParameter, 'bacnetParameter').commandId)}}\r\n \r\n
Controller-protocol\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n

Site files

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Command progressCommand
\r\n \r\n {{getStateText(commandResult, action.commandId)}}\r\n \r\n \r\n {{action.buttonText}}\r\n
\r\n
\r\n
","\r\nimport { Injectable } from '@angular/core';\r\nimport { Subject, Observable } from 'rxjs';\r\nimport { PlantUpgradeStatusService, PlantUpgradeStatusServiceData, PlantUpgradeStatus } from '@plants';\r\nimport { SerializedPollService } from 'modules/tools-module/serialized-poll.service';\r\n\r\n\r\n\r\n@Injectable()\r\nexport class BatchUpgradeStatusService implements PlantUpgradeStatusService{\r\n\r\n constructor(){\r\n this.setData()\r\n this.poller.start();\r\n }\r\n\r\n public pollingTime : number = 5000;\r\n\r\n private poller: SerializedPollService = new SerializedPollService(async() => {\r\n await this.setData();\r\n }, this.pollingTime)\r\n\r\n public subject: Subject = new Subject();\r\n\r\n public onData : Observable = this.subject.asObservable();\r\n\r\n public async setData(){\r\n this.subject.next({\r\n '5cddab71-625f-4183-9896-de9ae6effec9' : {\r\n status : PlantUpgradeStatus.scheduled\r\n },\r\n '747e12f7-0005-4e41-8873-0af577d44554' : {\r\n status : PlantUpgradeStatus.succeeded\r\n },\r\n '7d85dbd8-329f-4d70-aabe-f68bfd7858f3' : {\r\n status : PlantUpgradeStatus.failed,\r\n message : 'An Error occurred! (500)'\r\n },\r\n '45713d1f-a48c-45ca-b2e4-8dc0f754ebcb' : {\r\n status : PlantUpgradeStatus.running\r\n },\r\n '62693484-84f7-4796-b513-94b17cc9138d' : {\r\n status : PlantUpgradeStatus.timedout\r\n }\r\n })\r\n }\r\n\r\n}","import { inject, Injectable } from '@angular/core';\r\nimport { CachedPromise } from '@cache';\r\nimport { Config } from '@config';\r\nimport { AuthHttp } from '@http';\r\nimport { DevExtremeDataSourceAdapter } from '@tools';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { lastValueFrom } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class BatchUpgradeService {\r\n\r\n #devExtremeAdaper: DevExtremeDataSourceAdapter = inject(DevExtremeDataSourceAdapter);\r\n \r\n constructor(\r\n private http: AuthHttp,\r\n private config: Config,\r\n private urlEnhancer: UrlEnhancerService\r\n ){}\r\n\r\n public async scheduleBatchUpgrade(data: any) {\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgrades);\r\n return lastValueFrom(this.http.postJSON(url, data));\r\n }\r\n\r\n public getBatchUprade(upgradeId: string) {\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgrade, {\r\n upgradeid : upgradeId\r\n });\r\n return lastValueFrom(this.http.getJSON(url));\r\n }\r\n\r\n public async updateBatchUpgrade(upgradeId: string, data: any) {\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgrade, {\r\n upgradeid : upgradeId\r\n });\r\n return lastValueFrom(this.http.putJSON(url, data));\r\n }\r\n\r\n public async deleteBatchUpgrade(upgradeId: string) {\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgrade, {\r\n upgradeid : upgradeId\r\n });\r\n return lastValueFrom(this.http.delete(url));\r\n }\r\n\r\n\r\n public async cancelBatchUpgrade(upgradeId: string) {\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.cancelBatchUpgrade, {\r\n upgradeid : upgradeId\r\n });\r\n return lastValueFrom(this.http.putJSON(url, {}));\r\n }\r\n\r\n\r\n // settings.data.isAssigned = (showAssigend) ? 't' : 'f';\r\n // settings.data.tenantId = tenantId;\r\n // settings.data.locale = locale;\r\n // settings.data.isAdministrationPage = true;\r\n public async getUnsuccessfulPlantsByBatchUpgradeId(batchUpgradeId: string, tenantId: string, locale: string) {\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgradePlantList, {tenantId, batchUpgradeId: batchUpgradeId});\r\n const options = {\r\n key: 'SiteId',\r\n data: {\r\n locale,\r\n tenantId,\r\n batchUpgradeId\r\n }\r\n };\r\n const allBatchUpgradePlants = await this.#devExtremeAdaper.remoteDataSource(url, options);\r\n\r\n const unsuccessfulBatchUpgradePlants = allBatchUpgradePlants.data.filter(current => current.batchUpgradeStatus !== \"Succeeded\");\r\n return unsuccessfulBatchUpgradePlants;\r\n }\r\n\r\n public async getAvailablePlants(tenantId: string, locale: string) {\r\n const url = this.urlEnhancer.replaceParams(this.config.services.plant.plantList);\r\n const options = {\r\n key: 'SiteId',\r\n data: {\r\n locale,\r\n tenantId,\r\n isAdministrationPage: true,\r\n showAssigned: 't'\r\n }\r\n };\r\n const data = await this.#devExtremeAdaper.remoteDataSource(url, options);\r\n\r\n return data?.data;\r\n }\r\n\r\n}","import { Component, Input, ViewChild } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { ClxFormComponent } from '@forms';\r\nimport { __i18n } from '@localisation';\r\nimport { PlantService } from '@plants';\r\nimport { MessagesComponent, MessagesService, MessageType } from '@ui-messages';\r\nimport { UserService } from '@user';\r\nimport { UpgradeConfigurationComponent } from '../upgrade-configuration.component';\r\nimport { UpgradeService } from '../upgrade.service';\r\nimport { BatchUpgradeService } from './batch-upgrade.service';\r\n\r\n@Component({\n selector: 'batch-upgrade-configuration',\n templateUrl: './batch-upgrade-configuration.template.html',\n standalone: false\n})\r\nexport class BatchUpgradeConfigurationComponent extends UpgradeConfigurationComponent{\r\n constructor(\r\n public user: UserService,\r\n public upgradeService: UpgradeService,\r\n public messageService: MessagesService,\r\n public plantService: PlantService,\r\n private batchUpgradeService: BatchUpgradeService,\r\n private router: Router\r\n ){\r\n super(user, upgradeService, messageService, plantService);\r\n }\r\n\r\n public start: number = Date.now();\r\n\r\n public end: number = Date.now();\r\n\r\n @Input()\r\n public set resource(resource: any){\r\n this.innerResource = resource;\r\n }\r\n\r\n public get resource(){\r\n return this.innerResource;\r\n }\r\n\r\n @Input()\r\n public selectedPlants: any = [];\r\n\r\n @ViewChild(ClxFormComponent)\r\n public upgradeForm: ClxFormComponent;\r\n\r\n @ViewChild('messageBox')\r\n public messageBox: MessagesComponent\r\n\r\n public async send(data){\r\n if(this.upgradeForm.validate()){\r\n data.plantIds = this.selectedPlants;\r\n data.startDate = new Date(data.startTime);\r\n data.endDate = new Date(data.endTime);\r\n data.userTimezoneOffsetStart = -data.startDate.getTimezoneOffset();\r\n data.userTimezoneOffsetEnd = -data.endDate.getTimezoneOffset();\r\n await this.batchUpgradeService.scheduleBatchUpgrade(data);\r\n const url = '/Administration/Upgrade';\r\n this.messageService.addMessage({\r\n text: __i18n('Batch upgrade successfully scheduled', 'operating.plants.batch-upgrade.success.message'),\r\n type: MessageType.success\r\n })\r\n\r\n\r\n this.router.navigateByUrl(url);\r\n\r\n this.isVisible = false;\r\n }\r\n }\r\n\r\n\r\n public open(){\r\n this.messageBox.messages = [];\r\n this.isVisible = true;\r\n this.now = Date.now();\r\n this.start = Date.now() + 60000;\r\n this.end = Date.now() + 240000;\r\n }\r\n\r\n\r\n public showMappingFile: boolean = true;\r\n\r\n}","\r\n \r\n \r\n \r\n Name\r\n \r\n \r\n \r\n \r\n \r\n Start\r\n \r\n \r\n \r\n \r\n \r\n \r\n End\r\n \r\n \r\n \r\n \r\n \r\n \r\n Use plant's time zone\r\n \r\n \r\n When checked, the plants will be updated in the timespan of their respective local time zone. Otherwise, your local time will be applied to all plants.\r\n \r\n \r\n \r\n Download timeout(minutes)\r\n \r\n \r\n \r\n Application shutdown timeout(minutes)\r\n \r\n \r\n \r\n Retries\r\n \r\n \r\n \r\n Notify\r\n \r\n \r\n \r\n Mapping File\r\n \r\n use applicationset\r\n use plantfile\r\n \r\n \r\n \r\n Parameter\r\n \r\n use current\r\n use applicationset\r\n \r\n \r\n \r\n BACnet\r\n \r\n use current\r\n use applicationset\r\n \r\n \r\n \r\n Comment\r\n \r\n \r\n \r\n Ok\r\n Cancel\r\n \r\n \r\n","import { Component, inject, ViewChild } from '@angular/core';\r\nimport { Config } from '@config';\r\nimport { TenantService } from '@tenant';\r\nimport { DxAspNetDataXsrfAwareService } from '@tools';\r\nimport { UrlEnhancerService } from '@url';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { __i18n } from '@localisation';\r\nimport { LanguageService } from '@localisation';\r\nimport { UserService } from '@user';\r\nimport { RoutePrivilegeNames } from '@route-privilege-names';\r\nimport { PrivilegesService } from '@privileges';\r\nimport { PrivilegesLoadingService } from '@auth';\r\nimport { ClxFormComponent } from '@forms';\r\nimport { PlantService } from '@plants';\r\nimport { PlantListComponent } from 'modules/plants-module/operating/plant-list.component';\r\nimport { BatchUpgradeStatusService } from './batch-upgrade-status.service';\r\nimport { RoutingInfoService } from '@routing';\r\nimport { BatchUpgradeService } from './batch-upgrade.service';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'batch-upgrade-schedule-list',\r\n templateUrl: './batch-upgrade-schedule-list.template.html',\r\n standalone: false\r\n})\r\nexport class BatchUpgradeScheduleListComponent {\r\n #routingInfoService: RoutingInfoService = inject(RoutingInfoService);\r\n #batchUpgradeService: BatchUpgradeService = inject(BatchUpgradeService);\r\n\r\n constructor(\r\n private dxAspNetXsrfAwareService: DxAspNetDataXsrfAwareService,\r\n private urlEnhancer: UrlEnhancerService,\r\n private config: Config,\r\n private tenantService: TenantService,\r\n private plantService: PlantService,\r\n private messageService: MessagesService,\r\n private languageService: LanguageService,\r\n private userService: UserService,\r\n private privilegeLoadingService: PrivilegesLoadingService,\r\n private privilegeService: PrivilegesService,\r\n public batchUpgradeStatusService: BatchUpgradeStatusService\r\n ) { }\r\n\r\n public isProxyTenant: boolean = false;\r\n\r\n #availablePlants: any;// [{ plantId: string, name: string }];\r\n\r\n public async ngOnInit() {\r\n\r\n\r\n this.allPlantIds = await this.getAllPlantIds();\r\n this.assignedSource = this.setDataSource(true);\r\n\r\n const tenant = await this.tenantService.getCurrentTenant();\r\n this.isProxyTenant = tenant.isProxy;\r\n this.applicationSets = await this.plantService.getBatchUpgradeApplicationSets();\r\n if (this.applicationSets && this.applicationSets.length >= 1) {\r\n this.applicationSets[0].selected = true;\r\n }\r\n\r\n const tenantId = this.tenantService.getCurrentTenantId();\r\n const locale = this.languageService.language;\r\n \r\n this.selectedPlants = [];\r\n this.#availablePlants = await this.#batchUpgradeService.getAvailablePlants(tenantId, locale);\r\n\r\n\r\n const routingParams = this.#routingInfoService.getCurrentRoutingParams();\r\n const batchUpgradeId = routingParams.batchupgradeid;\r\n if (batchUpgradeId) {\r\n const unsuccessfulPlants = await this.#batchUpgradeService.getUnsuccessfulPlantsByBatchUpgradeId(batchUpgradeId, tenantId, locale);\r\n // this.#availablePlants = unsuccessfulPlants.map(current => {\r\n // return {\r\n // plantId: current.siteId, name: current.name\r\n // }\r\n // });\r\n const plantIds = unsuccessfulPlants.map(current => current.siteId);\r\n this.selectedPlants = plantIds;\r\n }\r\n // this.selectedPlantNames = availablePlants.data.map(current => { return { plantId: current.siteId, name: current.name} });\r\n }\r\n\r\n public remoteOperations: any = {\r\n paging: true, filtering: true, sorting: true, grouping: true, summary: true, groupPaging: true\r\n };\r\n\r\n public applicationSets: any[];\r\n\r\n public assignedSource: DataSource;\r\n\r\n public tenant: any;\r\n\r\n public subTenants: any[];\r\n\r\n public hasSystemPrivilege: boolean = false;\r\n\r\n public isInitialized: boolean = false;\r\n\r\n public allPlantIds: string[] = [];\r\n\r\n public showUpgradeStatus: any;\r\n\r\n @ViewChild(PlantListComponent)\r\n public grid: PlantListComponent\r\n\r\n\r\n public filterByAppplicationSet(value) {\r\n this.generateFilter(value)\r\n }\r\n\r\n\r\n private async getAllPlantIds(filter?) {\r\n const dataSource: any = this.setDataSource(true);\r\n dataSource.select(['SiteId']);\r\n dataSource.paginate(false);\r\n if (filter) {\r\n dataSource.filter(filter);\r\n }\r\n\r\n const result = await dataSource.load();\r\n\r\n return result.map((current) => {\r\n return current.SiteId;\r\n })\r\n }\r\n\r\n private filter: any;\r\n\r\n private async generateFilter(value) {\r\n const output = [];\r\n if (value?.length) {\r\n value.forEach((current, index) => {\r\n output.push(['ApplicationSetName', '=', current])\r\n if (index + 1 < value.length) {\r\n output.push('or');\r\n }\r\n })\r\n }\r\n if (output.length) {\r\n this.grid.grid.dxDataGrid.instance.filter(output);\r\n } else {\r\n this.grid.grid.dxDataGrid.instance.filter(null);\r\n }\r\n\r\n this.updateSelectedPlants(output);\r\n }\r\n\r\n private async updateSelectedPlants(filter?) {\r\n this.allPlantIds = await this.getAllPlantIds(filter);\r\n this.plantSelectionChange(this.selectedPlants.filter((current) => {\r\n return this.allPlantIds.includes(current);\r\n }));\r\n }\r\n\r\n public async ngAfterViewInit() {\r\n this.tenant = await this.tenantService.getCurrentTenant();\r\n await this.privilegeLoadingService.waitForPrivileges();\r\n this.privileges = this.privilegeService.getPrivileges();\r\n\r\n this.hasSystemPrivilege = this.privileges.find(p => p.name === RoutePrivilegeNames.Systems) !== undefined;\r\n const canAssignPlants = this.privileges.find(p => p.name === RoutePrivilegeNames.PlantAssign) !== undefined;\r\n\r\n try {\r\n this.subTenants = canAssignPlants ? await this.tenantService.getSubtenantsForAssignPlant() : [];\r\n if (this.subTenants && this.subTenants.length) {\r\n this.showMoveToSubTenant = true;\r\n this.subTenants[0].selected = true;\r\n }\r\n } catch (e) {\r\n this.subTenants = [];\r\n }\r\n this.isInitialized = true;\r\n }\r\n\r\n public setDataSource(showAssigend) {\r\n const tenantId = this.tenantService.getCurrentTenantId();\r\n const locale = this.languageService.language;\r\n const url = this.urlEnhancer.replaceParams(this.config.services.plant.plantList);\r\n return new DataSource({\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: url,\r\n loadMethod: 'POST',\r\n key: 'SiteId',\r\n onBeforeSend: (op, settings) => {\r\n settings.data.isAssigned = (showAssigend) ? 't' : 'f';\r\n settings.data.tenantId = tenantId;\r\n settings.data.locale = locale;\r\n settings.data.isAdministrationPage = true;\r\n }\r\n })\r\n })\r\n }\r\n\r\n public plantTenant: string;\r\n\r\n public selectedPlant: string;\r\n\r\n public mainTenantValue: boolean = false;\r\n\r\n public subTenant: any;\r\n\r\n public showMoveToSubTenant: boolean = false;\r\n\r\n public showActivateButton: boolean = true;\r\n\r\n private privileges: any[];\r\n\r\n\r\n // batch upgrade\r\n @ViewChild('upgradeForm')\r\n public upgradeForm: ClxFormComponent;\r\n\r\n public openBatchUpgrade() {\r\n this.showBatchPopUp = true;\r\n }\r\n\r\n public closeBatchUpgrade() {\r\n this.showBatchPopUp = false;\r\n }\r\n public showBatchPopUp: boolean = false;\r\n\r\n\r\n public selectedPlantNames: any = [];\r\n public innerSelectedPlants: string[] = [];\r\n\r\n public set selectedPlants(value: string[]) {\r\n this.innerSelectedPlants = value;\r\n\r\n if(this.#availablePlants) {\r\n const selectedPlantNames = this.#availablePlants\r\n .filter(availablePlant => value.some(currentValue => currentValue === availablePlant.siteId));\r\n console.log(selectedPlantNames);\r\n this.selectedPlantNames = selectedPlantNames;\r\n }\r\n }\r\n\r\n public get selectedPlants() {\r\n return this.innerSelectedPlants;\r\n }\r\n\r\n\r\n public plantSelectionChange(data) {\r\n this.selectedPlants = data;\r\n }\r\n\r\n public deselectPlant(plantId: string) {\r\n this.selectedPlants = this.selectedPlants.filter(current => current !== plantId);\r\n }\r\n\r\n}","\r\n \r\n Filter by Application Sets:\r\n \r\n {{ entry.name }}\r\n \r\n \r\n \r\n Schedule batch upgrade\r\n \r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n","import { Component, ViewChild, ViewChildren, QueryList } from '@angular/core';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { CSVService } from '@tools';\r\nimport { DxAspNetDataXsrfAwareService, UuidService } from '@tools';\r\nimport { Config } from '@config';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { AuthHttp } from '@http';\r\nimport { LanguageService, __i18n } from '@localisation';\r\nimport { TenantService } from '@tenant';\r\nimport { lastValueFrom, Subject } from 'rxjs';\r\nimport { TimeDateConverterService } from '@converter';\r\nimport { ChangeDetectorRef } from '@angular/core';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { ClxCheckBoxComponent } from '@forms/clx-forms/controls/clx.checkbox.component';\r\nimport { ClxButtonComponent } from '@forms/clx-forms/controls/clx.button.component';\r\nimport { ClxDateTimeComponent } from '@forms/clx-forms/controls/clx.datetime.component';\r\n\r\n@Component({\r\n selector: 'batch-upgrade-list',\r\n templateUrl: './batch-upgrade-list.template.html',\r\n standalone: false\r\n})\r\nexport class BatchUpgradeListComponent {\r\n\r\n constructor(\r\n private dxAspNetXsrfAwareService: DxAspNetDataXsrfAwareService,\r\n private urlEnhancer: UrlEnhancerService,\r\n private config: Config,\r\n private tenantService: TenantService,\r\n private languageService: LanguageService,\r\n private urlEnhancerService: UrlEnhancerService,\r\n private http: AuthHttp,\r\n private csvService: CSVService,\r\n private timeDateConverterService:TimeDateConverterService,\r\n private ref: ChangeDetectorRef,\r\n private uuidService: UuidService,\r\n private messagesService: MessagesService,\r\n ){}\r\n\r\n @ViewChild('ExportButton')\r\n private clxButton: ClxButtonComponent;\r\n\r\n @ViewChild('changeAllBox')\r\n public changeAllBox: ClxCheckBoxComponent;\r\n\r\n @ViewChild('startTime')\r\n public startTimeUIControl: ClxDateTimeComponent;\r\n\r\n @ViewChildren('batchCheckboxes')\r\n public batchCheckboxes: QueryList;\r\n\r\n public testId: string = 'batch-upgrade.list';\r\n public id: string = 'batch-update-list';\r\n public exportTestId: string = 'batch-upgrade-export.list';\r\n public exportId: string = 'batch-update-export-list';\r\n\r\n public exportButtonDisabled: boolean = true;\r\n\r\n private allBatchesDataSource: DataSource;\r\n public source: DataSource\r\n public exportSource: DataSource\r\n\r\n public exportDialogVisible: boolean = false\r\n public exportDialogMinDateTime: Date = new Date()\r\n\r\n public exportButtonText: string = 'Export';\r\n\r\n public async ngOnInit() {\r\n this.source = this.setDataSource();\r\n this.allBatchesDataSource = this.setAllBatchIdsDataSource();\r\n await this.allBatchesDataSource.load(); \r\n this.exportButtonDisabled = true;\r\n }\r\n\r\n public selectAllBatches : boolean = false;\r\n\r\n public allBatchUpgradeIds: any[] = [];\r\n\r\n// select=[\"SiteBatchUpgradeId\"]&requireTotalCount=true&tenantId=d262d3df-fe70-4824-91b0-43246aa31136&locale=en-US&_=1734614862039\r\n\r\n public setDataSource() {\r\n const tenantId = this.tenantService.getCurrentTenantId();\r\n const locale = this.languageService.language;\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgradeList)\r\n\r\n return new DataSource({\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: url,\r\n loadMethod: 'POST',\r\n key: 'SiteBatchUpgradeId',\r\n onBeforeSend: (op, settings) => {\r\n settings.data.tenantId = tenantId;\r\n settings.data.locale = locale;\r\n },\r\n })\r\n })\r\n }\r\n\r\n public setAllBatchIdsDataSource() {\r\n const tenantId = this.tenantService.getCurrentTenantId();\r\n const locale = this.languageService.language;\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgradeList)\r\n\r\n return new DataSource({\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: url,\r\n loadMethod: 'POST',\r\n key: 'SiteBatchUpgradeId',\r\n onBeforeSend: (op, settings) => {\r\n settings.data.tenantId = tenantId;\r\n settings.data.locale = locale;\r\n settings.data.skip = 0;\r\n settings.data.take = undefined;\r\n settings.data.select = \"[\\\"SiteBatchUpgradeId\\\"]\";\r\n settings.data.requireTotalCount = true;\r\n },\r\n onLoaded:(result) =>\r\n {\r\n this.allBatchUpgradeIds = result.map((current)=>{return current.SiteBatchUpgradeId});\r\n }\r\n })\r\n })\r\n }\r\n\r\n public remoteOperations: any = {\r\n paging: true, filtering: true, sorting: true, grouping: true, summary: true, groupPaging: true\r\n };\r\n\r\n public exportRemoteOperations: any = {\r\n paging: true, filtering: true, sorting: true, grouping: true, summary: true, groupPaging: true\r\n };\r\n\r\n public async showExportDialog()\r\n { \r\n this.exportDialogVisible = !this.exportDialogVisible;\r\n if (this.exportDialogVisible && this.exportSource == null)\r\n {\r\n this.exportSource = this.setDataSource(); \r\n }\r\n this.changeAllBatchesSelection(false);\r\n }\r\n\r\n public async exportSelectorChanged()\r\n {\r\n if (this.startTimeUIControl) this.startTimeUIControl.value = \"\";\r\n this.changeAllBatchesSelection(false); \r\n this.exportButtonText = 'Export';\r\n this.exportButtonDisabled = true;\r\n this.ref.markForCheck();\r\n \r\n }\r\n\r\n public exportStartDateTimeChanged(event)\r\n { \r\n if (!isNaN (this.startTimeUIControl.value) && this.startTimeUIControl.value != undefined && this.startTimeUIControl.value != \"\") \r\n {\r\n this.exportButtonDisabled = false\r\n }\r\n else\r\n {\r\n this.exportButtonDisabled = true\r\n }\r\n \r\n // this.exportButtonDisabled = (event == undefined) || (event == null) || (isNaN(event)) || event == \"\";\r\n this.exportButtonText = 'Export';\r\n this.ref.markForCheck();\r\n }\r\n\r\n public changeAllBatchesSelection(value : boolean)\r\n {\r\n this.selectAllBatches = value;\r\n this.changeAllBox.setValue(value)\r\n this.selectedBatches = value ? this.allBatchUpgradeIds : [];\r\n this.oldSelectAllBatches = value;\r\n this.batchCheckboxes.forEach((control) => control.value = value)\r\n \r\n if (value === true)\r\n {\r\n this.exportButtonDisabled = false;\r\n }\r\n else\r\n {\r\n this.exportButtonDisabled = true;\r\n }\r\n this.updateExportButtonLabelCounter();\r\n this.ref.markForCheck();\r\n }\r\n\r\n private updateExportButtonLabelCounter()\r\n {\r\n this.exportButtonText = 'Export (' + this.innerSelectedBatches.length + '/' + this.allBatchUpgradeIds.length + ')';\r\n }\r\n\r\n private oldSelectAllBatches : boolean = false;\r\n public selectBatch(id, batchId, field){ \r\n if(id) {\r\n if(!this.selectedBatches.includes(batchId)) {\r\n this.selectedBatches.push(batchId);\r\n }\r\n }else{\r\n this.selectedBatches = this.selectedBatches.filter((current) => current !== batchId)\r\n this.oldSelectAllBatches = false;\r\n this.selectAllBatches = false;\r\n this.changeAllBox.setValue(false)\r\n }\r\n if (this.innerSelectedBatches.length > 0)\r\n {\r\n this.exportButtonDisabled = false\r\n }\r\n else\r\n {\r\n this.exportButtonDisabled = true\r\n }\r\n this.updateExportButtonLabelCounter();\r\n this.ref.markForCheck();\r\n }\r\n\r\n private innerSelectedBatches : string[] = [];\r\n\r\n public set selectedBatches(value: string[]) {\r\n this.innerSelectedBatches = value;\r\n }\r\n\r\n public get selectedBatches(){\r\n return this.innerSelectedBatches;\r\n }\r\n \r\n public async doExport(event)\r\n {\r\n const tenantId = this.tenantService.getCurrentTenantId();\r\n \r\n if (event.values.exportCriteria === 'DateTime')\r\n { \r\n const date = new Date(event.values.startTime);\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.plant.batchUpgradeExportByDate,{\r\n tenantId: tenantId,\r\n startDate: this.timeDateConverterService.convertFormat(date, \"YYYY-MM-DD HH:mm:ss\")\r\n });\r\n try\r\n { \r\n let JsonResult = await lastValueFrom(this.http.get(url));\r\n if (JsonResult.body == \"[]\")\r\n {\r\n this.exportDialogVisible = false;\r\n this.ref.markForCheck();\r\n this.messagesService.addMessage({\r\n text: $localize`:@@plant.batchupgrade.status.export.success:no rows to export!`,\r\n type: MessageType.error\r\n });\r\n }\r\n else\r\n {\r\n let csvResult = this.csvService.objectArrayToCSV(JSON.parse(JsonResult.body),\",\");\r\n this.downloadStringAsFile(\"BatchUpgradeStatus-T\" + tenantId + \"-\" + this.timeDateConverterService.convertFormat(new Date(), \"YYYY-MM-DD HH.mm.ss\") +\".csv\", csvResult);\r\n this.exportDialogVisible = false; \r\n this.ref.markForCheck();\r\n this.messagesService.addMessage({\r\n text: $localize`:@@plant.batchupgrade.status.export.success:export successful`,\r\n type: MessageType.success\r\n });\r\n }\r\n }\r\n catch\r\n {\r\n this.exportDialogVisible = false;\r\n this.ref.markForCheck();\r\n this.messagesService.addMessage({\r\n text: $localize`:@@plant.batchupgrade.status.export.error:an unexpected error occurred`,\r\n type: MessageType.error\r\n });\r\n }\r\n }\r\n if (event.values.exportCriteria === 'GuidList')\r\n { \r\n if (this.allBatchUpgradeIds.length > 0)\r\n {\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.plant.batchUpgradeExportByIdList,{\r\n tenantId: tenantId\r\n });\r\n try\r\n {\r\n let JsonResult = await lastValueFrom(this.http.postJSON(url, this.innerSelectedBatches)); \r\n if (Array.isArray(JsonResult) && JsonResult.length === 0)\r\n {\r\n this.exportDialogVisible = false;\r\n this.ref.markForCheck();\r\n this.messagesService.addMessage({\r\n text: $localize`:@@plant.batchupgrade.status.export.norows:no rows to export!`,\r\n type: MessageType.error\r\n });\r\n }\r\n else\r\n {\r\n let csvResult = this.csvService.objectArrayToCSV(JsonResult,\",\");\r\n \r\n this.downloadStringAsFile(\"BatchUpgradeStatus-T\" + tenantId + \"-\" + this.timeDateConverterService.convertFormat(new Date(), \"YYYY-MM-DD hh.mm.ss\") +\".csv\", csvResult);\r\n this.exportDialogVisible = false;\r\n this.ref.markForCheck();\r\n this.messagesService.addMessage({\r\n text: $localize`:@@plant.batchupgrade.status.export.success:export successful`,\r\n type: MessageType.success\r\n });\r\n }\r\n }\r\n catch\r\n {\r\n this.exportDialogVisible = false;\r\n this.ref.markForCheck();\r\n this.messagesService.addMessage({\r\n text: $localize`:@@plant.batchupgrade.status.export.error:an unexpected error occurred`,\r\n type: MessageType.error\r\n }); \r\n }\r\n }\r\n }\r\n }\r\n private downloadStringAsFile(filename: string, content: string) {\r\n const blob = new Blob([content], { type: 'text/plain' });\r\n const url = URL.createObjectURL(blob);\r\n const a = document.createElement('a');\r\n a.href = url;\r\n a.download = filename;\r\n document.body.appendChild(a);\r\n a.click();\r\n }\r\n}","\r\n New Batch upgrade\r\n Export\r\n\r\n\r\n\r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LT'}}\r\n \r\n \r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LT'}}\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Scheduled\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n  Running\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Succeeded\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Failed\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Cancelled\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Skipped\r\n \r\n \r\n\r\n\r\n\r\n
\r\n \r\n \r\n Criteria:\r\n \r\n Date/Time\r\n list of batches \r\n \r\n \r\n \r\n Export batch upgrades after (utc)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Select all batches\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LT'}}\r\n \r\n \r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LT'}}\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Scheduled\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n  Running\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Succeeded\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Failed\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Cancelled\r\n \r\n \r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n \r\n   Skipped\r\n \r\n \r\n \r\n \r\n \r\n \r\n Cancel\r\n {{exportButtonText}}\r\n \r\n \r\n
\r\n","import { Component, inject, ViewChild } from '@angular/core';\r\nimport { LanguageService, __i18n } from '@localisation';\r\nimport { custom } from 'devextreme/ui/dialog';\r\nimport DataSource from 'devextreme/data/data_source';\r\n\r\nimport { DxAspNetDataXsrfAwareService } from '@tools';\r\nimport { Config } from '@config';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { TenantService } from '@tenant';\r\nimport { BatchUpgradeStatusService } from './batch-upgrade-status.service';\r\nimport { RoutingInfoService } from '@routing';\r\nimport { BatchUpgradeService } from './batch-upgrade.service';\r\nimport { PlantListComponent } from 'modules/plants-module/operating/plant-list.component';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { Router } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'batch-upgrade-details',\r\n templateUrl: './batch-upgrade-details.template.html',\r\n standalone: false\r\n})\r\nexport class BatchUpgradeDetailsComponent {\r\n\r\n constructor(\r\n private dxAspNetXsrfAwareService: DxAspNetDataXsrfAwareService,\r\n private urlEnhancer: UrlEnhancerService,\r\n private config: Config,\r\n private tenantService: TenantService,\r\n private languageService: LanguageService,\r\n public batchUpgradeStatusService: BatchUpgradeStatusService,\r\n public batchUpgradeService: BatchUpgradeService,\r\n private routingInfoService: RoutingInfoService,\r\n private messageService: MessagesService,\r\n private router: Router\r\n ){}\r\n\r\n\r\n @ViewChild(PlantListComponent)\r\n public plantList: PlantListComponent;\r\n\r\n public testId: string = 'batch-upgrade-detail.list';\r\n\r\n public id: string = 'batch-upgrade-detail-list';\r\n\r\n public source: DataSource\r\n\r\n public batchUpgradeId: string;\r\n\r\n public data: any;\r\n\r\n public showCreateNewButton: boolean = false;\r\n\r\n public disableCancelButton: boolean = true;\r\n\r\n public async ngOnInit() {\r\n const routingParams = this.routingInfoService.getCurrentRoutingParams();\r\n this.batchUpgradeId = routingParams.batchupgradeid;\r\n this.source = this.setDataSource(this.batchUpgradeId);\r\n this.data = await this.batchUpgradeService.getBatchUprade(this.batchUpgradeId);\r\n if(this.data.scheduledSites + this.data.runningSites > 0){\r\n this.disableCancelButton = false;\r\n }\r\n }\r\n\r\n public setDataSource(batchUpgradeId: string) {\r\n const tenantId = this.tenantService.getCurrentTenantId();\r\n const locale = this.languageService.language;\r\n const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgradePlantList, {tenantId, batchUpgradeId});\r\n return new DataSource({\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: url,\r\n loadMethod: 'POST',\r\n key: 'SiteId',\r\n onBeforeSend: (op, settings) => {\r\n settings.data.tenantId = tenantId;\r\n settings.data.locale = locale;\r\n settings.data.batchUpgradeId = batchUpgradeId;\r\n settings.data.isAdministrationPage = true;\r\n }\r\n })\r\n })\r\n }\r\n\r\n\r\n private statusInterval: any;\r\n public async ngAfterViewInit(){\r\n this.statusInterval = setInterval(() => {\r\n this.plantList.grid.dxDataGrid.instance.refresh();\r\n }, 3000);\r\n\r\n this.showCreateNewButton = await this.batchUpgradeService.getUnsuccessfulPlantsByBatchUpgradeId(this.batchUpgradeId, this.tenantService.getCurrentTenantId(), this.languageService.language);\r\n // ///////////////////////////////\r\n // const tenantId = this.tenantService.getCurrentTenantId();\r\n // const url = this.urlEnhancer.replaceParams(this.config.services.upgrade.batchUpgradePlantList, {tenantId, batchUpgradeId: this.batchUpgradeId});\r\n \r\n // // key: string;\r\n // // take?: number;\r\n // // page?: number;\r\n // // dataFilter? : DataFilter;\r\n // // locale?: string;\r\n // // tenantId?: string;\r\n // // data? : {\r\n // // [key: string] : string | boolean | number;\r\n \r\n // const options = {\r\n \r\n // key: 'SiteId',\r\n // data: {\r\n // locale: this.languageService.language,\r\n // tenantId: tenantId,\r\n // batchUpgradeId: this.batchUpgradeId\r\n // }\r\n // };\r\n // const data = await this.#devExtremeAdaper.remoteDataSource(url, options);\r\n // this.showCreateNewButton = data.data.some(current => current.batchUpgradeStatus !== \"Succeeded\");\r\n // console.log(data);\r\n }\r\n\r\n public ngOnDestroy(){\r\n clearInterval(this.statusInterval)\r\n }\r\n\r\n public remoteOperations: any = {\r\n paging: true,\r\n filtering: true,\r\n sorting: true,\r\n grouping: true,\r\n summary: true,\r\n groupPaging: true\r\n };\r\n\r\n public name: string = '';\r\n\r\n public async confirmUpgradeAction(title, message) {\r\n return new Promise(async(resolve, reject) => {\r\n const dialog = custom({\r\n title,\r\n message,\r\n buttons: [\r\n {\r\n text: __i18n('Yes', 'batch-upgrade.details.confirm.cancel.yes.button'),\r\n onClick: () => {\r\n dialog.hide();\r\n resolve(true);\r\n }\r\n },\r\n {\r\n text: __i18n('No', 'batch-upgrade.details.confirm.cancel.no.button'),\r\n accessKey: 'esc',\r\n onClick: () => {\r\n dialog.hide();\r\n resolve(false);\r\n }\r\n }\r\n ]\r\n });\r\n\r\n try {\r\n await dialog.show();\r\n }catch(e) {\r\n dialog.hide();\r\n resolve(false);\r\n }\r\n });\r\n }\r\n\r\n public async cancelUpgrade(){\r\n if(await this.confirmUpgradeAction(\r\n __i18n('Cancel Upgrade?', 'batch-upgrade.details.confirm.cancel.title'),\r\n __i18n('Are you really want to cancel the upgrade?', 'batch-upgrade.details.confirm.cancel.message')\r\n )) {\r\n await this.batchUpgradeService.cancelBatchUpgrade(this.batchUpgradeId);\r\n this.disableCancelButton = true;\r\n this.messageService.addMessage({\r\n text: __i18n('upgrade successfully cancelled', 'batch-upgrade.detail.success.message.cancelled'),\r\n type: MessageType.success,\r\n })\r\n this.plantList.grid.dxDataGrid.instance.refresh();\r\n this.ngOnInit();\r\n }\r\n }\r\n\r\n\r\n public async deleteUpgrade() {\r\n if(await this.confirmUpgradeAction(\r\n __i18n('Delete Upgrade?', 'batch-upgrade.details.confirm.delete.title'),\r\n __i18n('Are you really want to delete the upgrade?', 'batch-upgrade.details.confirm.delete.message')\r\n )) {\r\n await this.batchUpgradeService.deleteBatchUpgrade(this.batchUpgradeId);\r\n const url = '/Administration/Upgrade';\r\n this.messageService.addMessage({\r\n text: __i18n('upgrade successfully deleted', 'batch-upgrade.detail.success.message.deleted'),\r\n type: MessageType.success,\r\n location: url\r\n })\r\n\r\n this.router.navigateByUrl(url);\r\n }\r\n }\r\n}","\r\n Retry batch upgrade\r\n Cancel batch upgrade\r\n Delete batch upgrade\r\n\r\n\r\n","import { Pipe, Injectable } from '@angular/core';\r\nimport { TitleService } from '@title-manager';\r\nimport { BatchUpgradeService } from './batch-upgrade.service';\r\n\r\n@Injectable()\r\n@Pipe({\n name: 'batchUpgradeIdToName',\n standalone: false\n})\r\nexport class BatchIdToNamePipe implements TitleService {\r\n constructor(private service: BatchUpgradeService) { }\r\n\r\n public name: string = 'batchUpgradeIdToName';\r\n\r\n public transform(id: string): Promise {\r\n return new Promise( async(resolve, reject) => {\r\n try {\r\n const upgrade = await this.service.getBatchUprade(id);\r\n resolve(upgrade.name);\r\n } catch (e) {\r\n console.error('Error while transforming Batch id to name! [BatchIdToNamePipe.transform]', e);\r\n resolve('');\r\n }\r\n });\r\n }\r\n}\r\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { DxDataGridModule } from 'devextreme-angular/ui/data-grid';\r\n\r\nimport { CxFormsModule } from '@forms';\r\nimport { UiDialogModule, DxPopupModule } from '@ui-dialog';\r\nimport { UserModule } from '@user';\r\n\r\nimport { UpgradeService } from './upgrade.service';\r\nimport { UpgradeComponent } from './upgrade.component';\r\nimport { ParameterWindowComponent } from './parameter-window.component';\r\nimport { BacNetParameterWindowComponent } from './bac-net.parameter-window.component';\r\nimport { UpgradeConfigurationComponent } from './upgrade-configuration.component';\r\nimport { PrivilegesModule } from '@privileges';\r\nimport { PlantIdToNamePipe, PlantsModule } from '@plants';\r\nimport { BatchUpgradeScheduleListComponent } from './batch-upgrade/batch-upgrade-schedule-list.component';\r\nimport { RouterModule } from '@angular/router';\r\nimport { BatchUpgradeConfigurationComponent } from './batch-upgrade/batch-upgrade-configuration.component';\r\nimport { BatchUpgradeStatusService } from './batch-upgrade/batch-upgrade-status.service';\r\nimport { ToolsModule } from '@tools';\r\nimport { BatchUpgradeListComponent } from './batch-upgrade/batch-upgrade-list.component';\r\nimport { BatchUpgradeDetailsComponent } from './batch-upgrade/batch-upgrade-details.component';\r\nimport { UiMessagesModule } from '@ui-messages';\r\nimport { BatchUpgradeService } from './batch-upgrade/batch-upgrade.service';\r\nimport { ConverterModule } from '@converter';\r\nimport { TitleManager, TitleManagerModule } from '@title-manager';\r\nimport { BatchIdToNamePipe } from './batch-upgrade/batch-uprade.id-to-name.pipe';\r\nimport { MappingWindowComponent } from './mapping-window.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n FormsModule,\r\n CxFormsModule,\r\n CommonModule,\r\n UiDialogModule,\r\n UserModule,\r\n PrivilegesModule,\r\n DxPopupModule,\r\n PlantsModule,\r\n RouterModule,\r\n ToolsModule,\r\n UiMessagesModule,\r\n ConverterModule,\r\n TitleManagerModule\r\n ],\r\n declarations: [\r\n UpgradeComponent,\r\n ParameterWindowComponent,\r\n BacNetParameterWindowComponent,\r\n UpgradeConfigurationComponent,\r\n BatchUpgradeScheduleListComponent,\r\n BatchUpgradeConfigurationComponent,\r\n BatchUpgradeListComponent,\r\n BatchUpgradeDetailsComponent,\r\n MappingWindowComponent\r\n ],\r\n exports: [\r\n UpgradeComponent,\r\n ParameterWindowComponent,\r\n BacNetParameterWindowComponent,\r\n UpgradeConfigurationComponent,\r\n BatchUpgradeScheduleListComponent,\r\n BatchUpgradeConfigurationComponent,\r\n BatchUpgradeListComponent,\r\n BatchUpgradeDetailsComponent,\r\n MappingWindowComponent\r\n ],\r\n providers: [\r\n UpgradeService,\r\n BatchUpgradeStatusService,\r\n BatchUpgradeService,\r\n BatchIdToNamePipe\r\n ],\r\n schemas : [\r\n CUSTOM_ELEMENTS_SCHEMA\r\n ]\r\n})\r\nexport class UpgradeModule {\r\n constructor(private titleManager: TitleManager) {\r\n this.titleManager.register(BatchIdToNamePipe);\r\n }\r\n}\r\n\r\nexport {\r\n UpgradeComponent,\r\n UpgradeService,\r\n ParameterWindowComponent,\r\n BacNetParameterWindowComponent,\r\n UpgradeConfigurationComponent,\r\n BatchUpgradeScheduleListComponent,\r\n BatchUpgradeConfigurationComponent,\r\n BatchUpgradeStatusService,\r\n BatchUpgradeListComponent,\r\n BatchUpgradeDetailsComponent,\r\n PlantIdToNamePipe,\r\n MappingWindowComponent\r\n};\r\n","import { Pipe, PipeTransform, Injectable, SecurityContext } from '@angular/core';\r\nimport { NumberFormatService } from '@converter';\r\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\r\n\r\n@Injectable()\r\n@Pipe({\n name: 'formatNumericValue',\n standalone: false\n})\r\nexport class FormatNumericValuePipe implements PipeTransform {\r\n constructor(private formatService: NumberFormatService, private domSanitizer: DomSanitizer) { }\r\n\r\n private replacer: RegExp = /\\{\\{value\\}\\}/g;\r\n\r\n public async transform(formatString: string, input: number | string, representation: number, trustHtml: boolean = true): Promise {\r\n const sanitized = this.domSanitizer.sanitize(SecurityContext.HTML, formatString);\r\n if ((typeof input !== 'number' && typeof input !== 'string') || (representation !== 1 && representation !== 2)) {\r\n return trustHtml\r\n ? this.domSanitizer.bypassSecurityTrustHtml(sanitized)\r\n : sanitized;\r\n }\r\n const content = sanitized.replace(this.replacer,\r\n '' +\r\n this.domSanitizer.sanitize(SecurityContext.HTML, await this.formatService.format(input, representation === 2, true)) +\r\n '');\r\n return trustHtml\r\n ? this.domSanitizer.bypassSecurityTrustHtml(content)\r\n : content;\r\n }\r\n}\r\n","import { Component, Input, ViewChild, ChangeDetectorRef } from '@angular/core';\r\nimport { DxAspNetDataXsrfAwareService } from '@tools';\r\n\r\nimport DataSource from 'devextreme/data/data_source';\r\n\r\nimport { LanguageService, __i18n } from '@localisation';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { ClxDataGridComponent } from '@forms';\r\nimport * as moment from 'moment';\r\nimport { NumberFormatService } from '@converter';\r\n\r\n@Component({\n selector: 'history-list',\n templateUrl: './history-list.template.html',\n standalone: false\n})\r\nexport class HistoryListComponent {\r\n\r\n constructor(\r\n private dxAspNetXsrfAwareService: DxAspNetDataXsrfAwareService,\r\n private urlEnhancer: UrlEnhancerService,\r\n private changeDetectorRef: ChangeDetectorRef\r\n ){\r\n }\r\n\r\n public source: any;\r\n\r\n @ViewChild(ClxDataGridComponent, { static: false })\r\n public grid: ClxDataGridComponent;\r\n\r\n @Input()\r\n public url: string;\r\n\r\n @Input()\r\n public id: string;\r\n\r\n @Input()\r\n public testId: string;\r\n\r\n public remoteOperations = {\r\n paging: true, filtering: true, sorting: true, grouping: true, summary: true, groupPaging: true\r\n };\r\n\r\n public ngAfterViewInit(){\r\n let url = this.url;\r\n url = this.urlEnhancer.replaceParams(url);\r\n\r\n this.source = new DataSource({\r\n paginate: true,\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: url,\r\n loadMethod: 'POST',\r\n key: 'Id'\r\n })\r\n });\r\n\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n public async refresh(){\r\n await this.source.reload();\r\n }\r\n}\r\n","\r\n\r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LTS'}}\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {{data.value}}\r\n \r\n \r\n\r\n","import { Component, AfterViewInit, OnInit, OnDestroy, ViewChild } from '@angular/core';\r\nimport { Config } from '@config';\r\nimport { StateService, States, StateSubscription } from '@state';\r\nimport { RoutePrivilegeNames } from '@route-privilege-names';\r\nimport { HistoryListComponent } from './history-list.component';\r\n\r\n@Component({\n selector: 'history-page',\n templateUrl: './history.template.html',\n standalone: false\n})\r\nexport class HistoryComponent implements OnInit, OnDestroy {\r\n showDatapointHistory: boolean = false;\r\n showCommandHistory: boolean = false;\r\n\r\n private datapointHistoryComponent: HistoryListComponent\r\n\r\n @ViewChild('datapointHistory', {static: false})\r\n set datapointHistoryGrid(component: HistoryListComponent) {\r\n this.datapointHistoryComponent = component;\r\n }\r\n\r\n private commandHistoryComponent: HistoryListComponent\r\n\r\n @ViewChild('commandHistory', {static: false})\r\n set commandHistoryGrid(component: HistoryListComponent) {\r\n this.commandHistoryComponent = component;\r\n }\r\n\r\n constructor(\r\n public config: Config,\r\n private stateService: StateService\r\n ){\r\n }\r\n\r\n private privilegesChanged(privileges: {name: string, type: string}[]) {\r\n this.showDatapointHistory = !!privileges?.find(p => p.type === 'plant' && p.name === RoutePrivilegeNames.ChangeDataPoints);\r\n this.showCommandHistory = !!privileges?.find(p => p.type === 'plant' && p.name === RoutePrivilegeNames.PlantUpgrade);\r\n }\r\n\r\n public refresh() {\r\n if (this.datapointHistoryComponent !== null) {\r\n this.datapointHistoryComponent.refresh();\r\n }\r\n if (this.commandHistoryComponent !== null) {\r\n this.commandHistoryComponent.refresh();\r\n }\r\n }\r\n\r\n private privilegesSubscription: StateSubscription;\r\n\r\n ngOnInit(): void {\r\n this.privilegesSubscription = this.stateService.value(States.privileges).subscribe(privileges => this.privilegesChanged(privileges), true);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateService.unsubscribe(this.privilegesSubscription);\r\n }\r\n}\r\n","
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n","import { Component } from '@angular/core';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { DxAspNetDataXsrfAwareService } from '@tools';\r\nimport { Config } from '@config';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { AuthHttp } from '@http';\r\nimport { confirm } from 'devextreme/ui/dialog';\r\nimport { __i18n } from '@localisation';\r\nimport { lastValueFrom } from 'rxjs';\r\n\r\n@Component({\n selector: 'task-list',\n templateUrl: './task-list.template.html',\n standalone: false\n})\r\nexport class TaskListComponent {\r\n constructor(\r\n private dxAspNetXsrfAwareService: DxAspNetDataXsrfAwareService,\r\n private config: Config,\r\n private urlEnhancer: UrlEnhancerService,\r\n private http: AuthHttp\r\n ){}\r\n\r\n public ngOnInit(){\r\n this.activeTasksSource = new DataSource({\r\n paginate: true,\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: this.urlEnhancer.replaceParams(this.config.services.task.active),\r\n loadMethod: 'POST',\r\n key: 'TaskId'\r\n })\r\n });\r\n\r\n this.taskHistorySource = new DataSource({\r\n paginate: true,\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: this.urlEnhancer.replaceParams(this.config.services.task.history),\r\n loadMethod: 'POST',\r\n key: 'TaskId'\r\n })\r\n })\r\n }\r\n\r\n public remoteOperations = {\r\n paging: true, filtering: true, sorting: true, grouping: true, summary: true, groupPaging: true\r\n };\r\n\r\n public activeTasksSource: DataSource;\r\n\r\n public taskHistorySource: DataSource;\r\n\r\n public refresh(){\r\n this.activeTasksSource.reload();\r\n this.taskHistorySource.reload();\r\n }\r\n\r\n\r\n public async cancelTask(taskId : string){\r\n if(\r\n await confirm(\r\n __i18n('Really want to cancel this task?', 'task.list.active-tasks.cancel.confirm.message'),\r\n __i18n('Please confirm', 'task.list.active-tasks.cancel.confirm.title'),\r\n )\r\n ){\r\n await lastValueFrom(this.http.putJSON(this.urlEnhancer.replaceParams(this.config.services.task.cancelTask, {\r\n taskid : taskId\r\n }), {}));\r\n this.refresh()\r\n }\r\n }\r\n\r\n}","
\r\n \r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LTS'}}\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LTS'}}\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LTS'}}\r\n \r\n \r\n\r\n \r\n \r\n","import { DataPointDropDownService, WebPictureNaviExtensionService } from '@datapoints';\r\nimport {\r\n PlantManageUsersAccessService,\r\n PlantNotificationsAccessService,\r\n PlantSettingsAccessService,\r\n PlantOnlineIconComponent,\r\n PlantAlarmIconComponent,\r\n PlantTaskIconComponent,\r\n PlantUpgradeFilePriorityIconComponent,\r\n PlantUpgradeSubnavigationIconsComponent\r\n} from '@plants';\r\nimport { SubnaviDropDownService } from '@navigation';\r\nimport { __asyncI18n } from '@localisation';\r\nimport { PlantDashboardNaviExtension, PlantDashboardDropdownService, PlantDashboardComponent } from '@dashboards';\r\nimport { RoutingEntry, RoutingLoadableFiles } from '@routing';\r\nimport { PlantApplicationSetNaviExtension } from '@plants';\r\nimport { RoutePrivilegeNames } from './routeprivilegenames';\r\nimport { DummySiteComponent } from '@site-info';\r\nimport { UpgradeComponent } from '@upgrade';\r\nimport { AlarmComponent } from '@alarm';\r\nimport { WebAccessScreen, WebAccessDynamicExternalLink } from '@web-access';\r\nimport { HistoryComponent } from '@history';\r\nimport { TaskListComponent } from '@task';\r\nimport { SchedulerComponent } from '@scheduler';\r\nimport { PlantFileListComponent, PlantFileDetails } from '@files';\r\nimport { CanActivateWithCurrentTenant } from '@plants';\r\n\r\nexport const PlantOperatingRoutes: Array = [\r\n {\r\n path: ':plantid',\r\n data: {\r\n title: ':plantid | plantIdToName',\r\n dontShowInSubNavigation: true,\r\n breadCrumbDropDown: SubnaviDropDownService,\r\n favouritesRouteTitle: '[SiteName]',\r\n //lastSubNaviLevel : true,\r\n redirectTo: [\r\n 'Operating/Plants/:plantid/PlantDashboard/*firstChild',\r\n 'Operating/Plants/:plantid/DataPoints',\r\n 'Operating/Plants/:plantid/Alarms',\r\n 'Operating/Plants/:plantid/WebAccess',\r\n 'Operating/Plants/:plantid/WebPicture',\r\n 'Operating/Plants/:plantid/Upgrade',\r\n 'Operating/Plants/:plantid/History',\r\n 'Operating/Plants/:plantid/Scheduler',\r\n 'Operating/Plants/:plantid/Tasks',\r\n 'Operating/Plants/:plantid/Documentation',\r\n 'Operating/Plants/:plantid/PlantSettings',\r\n 'Operating/Plants/:plantid/PlantUsers',\r\n 'Operating/Plants/:plantid/PlantNotifications'\r\n ]\r\n },\r\n children: [\r\n {\r\n path: '',\r\n canActivate: [CanActivateWithCurrentTenant],\r\n component: DummySiteComponent,\r\n data: {\r\n title: ':plantid | plantIdToName',\r\n dontShowInSubNavigation: true,\r\n breadCrumbDropDown: SubnaviDropDownService,\r\n favouritesRouteTitle: '[SiteName]',\r\n //lastSubNaviLevel : true,\r\n redirectTo: [\r\n 'Operating/Plants/:plantid/PlantDashboard/*firstChild',\r\n 'Operating/Plants/:plantid/DataPoints',\r\n 'Operating/Plants/:plantid/Alarms',\r\n 'Operating/Plants/:plantid/WebAccess',\r\n 'Operating/Plants/:plantid/WebPicture',\r\n 'Operating/Plants/:plantid/Upgrade',\r\n 'Operating/Plants/:plantid/History',\r\n 'Operating/Plants/:plantid/Scheduler',\r\n 'Operating/Plants/:plantid/Tasks',\r\n 'Operating/Plants/:plantid/Documentation',\r\n 'Operating/Plants/:plantid/PlantSettings',\r\n 'Operating/Plants/:plantid/PlantUsers',\r\n 'Operating/Plants/:plantid/PlantNotifications'\r\n ]\r\n }\r\n },\r\n {\r\n path: 'PlantDashboard',\r\n data: {\r\n title: __asyncI18n('Plant dashboard', 'subnavi.operating.plantdashboard'),\r\n hideWithoutChildren: true,\r\n dynamicChildren: PlantDashboardNaviExtension,\r\n showChildrenAsSecondLevel: true,\r\n breadCrumbDropDown: PlantDashboardDropdownService,\r\n redirectTo: 'Operating/Plants/:plantid/PlantDashboard/*firstChild',\r\n testId: 'sidenavigation.link.plantdashboard',\r\n privileges: [RoutePrivilegeNames.PlantDashboard]\r\n },\r\n children: [\r\n {\r\n path: ':dashboardid',\r\n data: {\r\n title: ':dashboardid | plantDashboardIdToName',\r\n contentRoute: '/Site/Site/Dashboard/:plantid/?pageId=:dashboardid&tas=:tas',\r\n contentRouteParams : {\r\n tas : '->isTenantDashboard:plantid:dashboardid'\r\n },\r\n \r\n dontShowInSubNavigation: true,\r\n hideWithoutChildren: true,\r\n favouritesCaption: '[PlantDashboardName]'\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: PlantDashboardComponent,\r\n data: {\r\n title: ':dashboardid | plantDashboardIdToName',\r\n contentRoute: '/Site/Site/Dashboard/:plantid?pageId=:dashboardid&tas=:tas',\r\n contentRouteParams : {\r\n tas : '->isTenantDashboard:plantid:dashboardid'\r\n },\r\n dontShowInSubNavigation: true,\r\n hideWithoutChildren: true,\r\n favouritesCaption: '[PlantDashboardName]'\r\n }\r\n },\r\n {\r\n path: 'Trend',\r\n data: {\r\n title: __asyncI18n('Trend', 'subnavi.operating.plantdashboard.trend'),\r\n dontShowInSubNavigation: true,\r\n showSubNaviLevel: 3,\r\n dontShowInBreadCrumb: true\r\n },\r\n children: [\r\n {\r\n path: ':tileid',\r\n loadChildren: () => import('../modules/viewnodes-module/index').then(m => m.ViewNodesModule),\r\n data: {\r\n title: ':tileid | plantTileIdToName',\r\n dontShowInSubNavigation: true,\r\n lazyRedirectTo: 'Operating/Plants/:plantid/PlantDashboard/:dashboardid/Trend/:tileid/PlantView',\r\n showSubNaviLevel: 4\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'DataPoints',\r\n loadChildren: () => import('../modules/viewnodes-module/index').then(m => m.ViewNodesModule),\r\n data: {\r\n title: __asyncI18n('Data points', 'subnavi.operating.datapoints'),\r\n statusService: {\r\n component: PlantOnlineIconComponent,\r\n parameter: {\r\n plantId: ':plantid'\r\n }\r\n },\r\n breadCrumbDropDown: DataPointDropDownService,\r\n testId: 'sidenavigation.link.datapoints',\r\n favouritesRouteColor: 'stone',\r\n privileges: [ RoutePrivilegeNames.CloudItem ]\r\n }\r\n },\r\n {\r\n path: 'Alarms',\r\n component: AlarmComponent,\r\n data: {\r\n title: __asyncI18n('Alarms', 'subnavi.operating.alarms'),\r\n statusService: {\r\n component: PlantAlarmIconComponent,\r\n parameter: {\r\n plantId: ':plantid'\r\n }\r\n },\r\n testId: 'sidenavigation.link.alarms',\r\n privileges: [RoutePrivilegeNames.PlantAlarm]\r\n }\r\n },\r\n {\r\n path: 'WebAccess',\r\n data: {\r\n title: __asyncI18n('Web access', 'subnavi.operating.webaccess'),\r\n testId: 'sidenavigation.link.webaccess',\r\n privileges: [RoutePrivilegeNames.WebAccess],\r\n redirectTo: 'Operating/Plants/:plantid/WebAccess/false',\r\n externalLink: WebAccessDynamicExternalLink\r\n },\r\n children: [\r\n {\r\n path: ':openEnergyIndicatorPage',\r\n component: WebAccessScreen,\r\n data: {\r\n title: __asyncI18n('Web access', 'subnavi.operating.webaccess'),\r\n privileges: [RoutePrivilegeNames.WebAccess],\r\n dontShowInSubNavigation: true,\r\n dontShowInBreadCrumb: true,\r\n showSubNaviLevel: 3\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: 'WebPicture',\r\n data: {\r\n title: __asyncI18n('Web graphic', 'subnavi.operating.webpicture'),\r\n hideWithoutChildren: true,\r\n dynamicChildren: WebPictureNaviExtensionService,\r\n showChildrenAsSecondLevel: true,\r\n redirectTo: 'Operating/Plants/:plantid/WebPicture/*firstChild',\r\n testId: 'sidenavigation.link.webpicture',\r\n privileges: [RoutePrivilegeNames.PlantGraphic]\r\n },\r\n children: [\r\n {\r\n path: ':webpictureid',\r\n data: {\r\n title: ':webpictureid',\r\n redirectTo: 'Operating/Plants/:plantid/WebPicture/:webpictureid/View',\r\n lazyRedirectTo: 'Operating/Plants/:plantid/WebPicture/:webpictureid/View',\r\n dontShowInSubNavigation: true,\r\n dontShowInBreadCrumb: true,\r\n hideWithoutChildren: true,\r\n },\r\n children: [\r\n {\r\n path: 'View',\r\n component: DummySiteComponent,\r\n data: {\r\n title: 'View',\r\n redirectTo: 'Operating/Plants/:plantid/WebPicture/*firstChild',\r\n dontShowInSubNavigation: true,\r\n dontShowInBreadCrumb: true,\r\n showSubNaviLevel : 4,\r\n favouritesType: 'webpicture'\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'Upgrade',\r\n component: UpgradeComponent,\r\n data: {\r\n title: __asyncI18n('Upgrade', 'subnavi.operating.upgrade'),\r\n testId: 'sidenavigation.link.upgrade',\r\n privileges: [RoutePrivilegeNames.PlantUpgrade],\r\n statusService: {\r\n component: PlantUpgradeSubnavigationIconsComponent,\r\n parameter: {\r\n plantId: ':plantid'\r\n }\r\n },\r\n }\r\n },\r\n {\r\n path: 'History',\r\n component: HistoryComponent,\r\n data: {\r\n title: __asyncI18n('History', 'subnavi.operating.history'),\r\n testId: 'sidenavigation.link.history',\r\n privileges: [RoutePrivilegeNames.PlantHistory]\r\n }\r\n },\r\n {\r\n path: 'Scheduler',\r\n component: SchedulerComponent,\r\n data: {\r\n title: __asyncI18n('Scheduler', 'subnavi.operating.scheduler'),\r\n files: [\r\n { path: '/bundles/ba/scheduler', type: RoutingLoadableFiles.js }\r\n ],\r\n testId: 'sidenavigation.link.scheduler',\r\n privileges: [RoutePrivilegeNames.PlantScheduler]\r\n }\r\n },\r\n {\r\n path: 'Tasks',\r\n component: TaskListComponent,\r\n data: {\r\n title: __asyncI18n('Tasks', 'subnavi.operating.task'),\r\n contentRoute: '/Site/Site/Tasks/:plantid',\r\n testId: 'sidenavigation.link.tasks',\r\n privileges: [RoutePrivilegeNames.PlantTasks],\r\n statusService: {\r\n component: PlantTaskIconComponent,\r\n parameter: {\r\n plantId: ':plantid'\r\n }\r\n }\r\n }\r\n },\r\n {\r\n path: 'Files',\r\n data: {\r\n title: __asyncI18n('Files', 'subnavi.operating.systems.files'),\r\n testId: 'sidenavigation.link.systemfiles',\r\n privileges: [\r\n RoutePrivilegeNames.PlantFileAccess,\r\n RoutePrivilegeNames.PlantFileManage\r\n ]\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: PlantFileListComponent,\r\n data: {\r\n title: __asyncI18n('Files', 'subnavi.operating.systems.files'),\r\n showSubNaviLevel: 3\r\n }\r\n },\r\n {\r\n path: 'Add',\r\n data: {\r\n title: __asyncI18n('Add file', 'subnavi.operating.systems.file.add'),\r\n showSubNaviLevel: 3,\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: PlantFileDetails,\r\n data: {\r\n title: __asyncI18n('Add file', 'subnavi.operating.systems.file.add'),\r\n showSubNaviLevel: 3\r\n }\r\n },\r\n {\r\n path: ':type',\r\n component: PlantFileDetails,\r\n data: {\r\n title: __asyncI18n('Add Parameter file', 'subnavi.operating.systems.file.add.parameterfile'),\r\n showSubNaviLevel: 3,\r\n dontShowInBreadCrumb: true\r\n\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: ':fileid',\r\n data: {\r\n title: ':fileid | fileIdToName',\r\n dontShowInSubNavigation: true,\r\n showSubNaviLevel: 3,\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: PlantFileDetails,\r\n data: {\r\n title: ':fileid | fileIdToName',\r\n dontShowInSubNavigation: true,\r\n showSubNaviLevel: 3,\r\n favouritesCaption: '[ParentPageName] / [PageName]'\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'PlantSettings',\r\n component: DummySiteComponent,\r\n canActivate: [ PlantSettingsAccessService ],\r\n data: {\r\n redirectTo: '/Administration/Plants/:plantid/Settings',\r\n title: __asyncI18n('Plant settings', 'subnavi.operating.plantsettings'),\r\n testId: 'sidenavigation.link.plantsettings',\r\n }\r\n },\r\n {\r\n path: 'PlantUsers',\r\n component: DummySiteComponent,\r\n canActivate: [ PlantManageUsersAccessService ],\r\n data: {\r\n redirectTo: 'Administration/Plants/:plantid/Users',\r\n title: __asyncI18n('Plant users', 'subnavi.administration.plant.plant.users'),\r\n testId: 'sidenavigation.link.plantusers'\r\n }\r\n },\r\n {\r\n path: 'PlantNotifications',\r\n component: DummySiteComponent,\r\n canActivate: [ PlantNotificationsAccessService ],\r\n data: {\r\n redirectTo: 'Administration/Plants/:plantid/Alarms',\r\n dynamicSiblings: PlantApplicationSetNaviExtension,\r\n title: __asyncI18n('Plant notifications', 'subnavi.administration.plant.alarms'),\r\n testId: 'sidenavigation.link.plantnotifications'\r\n }\r\n }\r\n\r\n ]\r\n }\r\n];\r\n","import { WinFormsContentScreen } from '@winforms';\r\nimport { __asyncI18n } from '@localisation';\r\nimport { RoutingEntry } from '@routing';\r\nimport { DummySiteComponent } from '@site-info';\r\n\r\nexport const TenantRoutes: Array = [\r\n {\r\n path : '',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Tenants', 'subnavi.administration.tenants'),\r\n contentRoute : '/SystemAdministration/Tenant/List',\r\n showSubNaviLevel: 1\r\n }\r\n },\r\n {\r\n path : 'Add',\r\n component: WinFormsContentScreen,\r\n data : {\r\n title : __asyncI18n('Add tenant', 'subnavi.administration.add-tenat'),\r\n contentRoute : '/SystemAdministration/Tenant/Settings/',\r\n showSubNaviLevel: 1\r\n }\r\n },\r\n {\r\n path : 'AddSub/:parentId',\r\n component: WinFormsContentScreen,\r\n data : {\r\n title : __asyncI18n('Add sub-tenant', 'subnavi.administration.add-sub-tenat'),\r\n contentRoute : '/SystemAdministration/Tenant/Settings?parentId=:parentId',\r\n showSubNaviLevel: 1\r\n }\r\n },\r\n {\r\n path : 'CreateFromTemplate',\r\n component : WinFormsContentScreen,\r\n data : {\r\n title : __asyncI18n('Create from template', 'subnavi.administration.create-tenant-from-template'),\r\n contentRoute : '/SystemAdministration/Tenant/CreateTenantFromTemplate?parentId=:parentId',\r\n showSubNaviLevel: 1\r\n }\r\n },\r\n {\r\n path : ':selectedtenantid',\r\n data : {\r\n title : ':selectedtenantid | tenantIdToName',\r\n showSubNaviLevel: 1,\r\n redirectTo : '/Administration/Tenants/:selectedtenantid/Settings',\r\n favouritesRouteCaption: '[MainPageName]'\r\n },\r\n children : [\r\n {\r\n path : '',\r\n component : DummySiteComponent,\r\n data : {\r\n title : ':selectedtenantid | tenantIdToName',\r\n showSubNaviLevel: 1,\r\n redirectTo : '/Administration/Tenants/:selectedtenantid/Settings'\r\n }\r\n },\r\n {\r\n path : 'Settings',\r\n component: WinFormsContentScreen,\r\n data : {\r\n title : ':selectedtenantid | tenantIdToName',\r\n showSubNaviLevel: 1,\r\n contentRoute : '/SystemAdministration/Tenant/Settings/:selectedtenantid',\r\n dontShowInBreadCrumb : true,\r\n favouritesTitle: '[ParentParentPageName]'\r\n }\r\n }\r\n ]\r\n }\r\n];\r\n","import { Injectable } from '@angular/core';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { Config } from '@config';\r\nimport { AuthHttp } from '@http';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport Store from 'devextreme/data/custom_store';\r\nimport { LoaderService } from '@loader';\r\nimport { __i18n } from '@localisation';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { M2MDeviceDetails } from './m2m-device-details';\r\nimport { lastValueFrom } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class M2MDataStore {\r\n private lastErrorMessageId: string = null;\r\n\r\n constructor(\r\n private urlEnhancerService: UrlEnhancerService,\r\n private config: Config,\r\n private http: AuthHttp,\r\n private loaderService: LoaderService,\r\n private messagesService: MessagesService) {}\r\n\r\n private collectNegativeFilterValues(filter: any[]): any {\r\n const result = {\r\n name: null,\r\n values: []\r\n };\r\n if (Array.isArray(filter[0])) {\r\n for (let i = 0; i < filter.length; i += 2) {\r\n const subRes = this.collectNegativeFilterValues(filter[i]);\r\n if (subRes !== null) {\r\n result.name = subRes.name;\r\n result.values = result.values.concat(subRes.values);\r\n }\r\n }\r\n } else if (filter.length === 3) {\r\n result.name = filter[0];\r\n result.values.push(filter[2]);\r\n }\r\n return result.name ? result : null;\r\n }\r\n\r\n private parseFilters(availableHeaderFilterValues: any, filterArr: any[]): string {\r\n let result: string = '';\r\n if (Array.isArray(filterArr[0])) {\r\n for (let i = 0; i < filterArr.length; i += 2) {\r\n result += this.parseFilters(availableHeaderFilterValues, filterArr[i]);\r\n }\r\n } else if (filterArr.length === 3) {\r\n const values = filterArr[2].split(/\\s*[,;\\s]\\s*/).filter((v) => !!v);\r\n switch (filterArr[0]) {\r\n case 'iccid':\r\n case 'imsi':\r\n for (let j = 0; j < values.length; j++) {\r\n result += '&' + filterArr[0] + 's%5B%5D=' +\r\n encodeURIComponent(values[j].replace(/^\\s+/, '').replace(/\\s+$/, ''));\r\n }\r\n break;\r\n\r\n case 'state':\r\n for (let j = 0; j < values.length; j++) {\r\n result += '&deviceStates%5B%5D=' +\r\n encodeURIComponent(values[j].replace(/^\\s+/, '').replace(/\\s+$/, ''));\r\n }\r\n break;\r\n }\r\n } else if (filterArr.length === 2 && filterArr[0] === '!' && Array.isArray(filterArr[1])) {\r\n const negFilter = this.collectNegativeFilterValues(filterArr[1]);\r\n if (negFilter !== null) {\r\n if (availableHeaderFilterValues && Array.isArray(availableHeaderFilterValues[negFilter.name])) {\r\n const posValues = availableHeaderFilterValues[negFilter.name].filter((el) => {\r\n return negFilter.values.indexOf(el.value) < 0;\r\n });\r\n if (posValues.length > 0) {\r\n for (let j = 0; j < posValues.length; j++) {\r\n result += '&deviceStates%5B%5D=' +\r\n encodeURIComponent(posValues[j].value.replace(/^\\s+/, '').replace(/\\s+$/, ''));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n public getStore(config: any): Store {\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.tenant.m2mDevices);\r\n return new CustomStore({\r\n key: 'iccid',\r\n load: (loadOptions: any) => {\r\n let params = '?';\r\n\r\n params += 'pageOffset=';\r\n params += loadOptions.skip || 0;\r\n params += '&pageSize=';\r\n params += loadOptions.take || 20;\r\n if(loadOptions.sort && loadOptions.sort.length === 1) {\r\n const sort = loadOptions.sort[0];\r\n\r\n params += '&sortField=';\r\n params += sort.selector;\r\n params += '&sortOrder=';\r\n params += sort.desc ? 'descending' : 'ascending';\r\n }\r\n if (loadOptions.filter && loadOptions.filter.length) {\r\n params += this.parseFilters(config ? config.availableHeaderFilterValues : null, loadOptions.filter);\r\n }\r\n\r\n const loaderId = this.loaderService.start();\r\n this.loaderService.setText(__i18n('loading data', 'm2mrouter.loader.text.loadingdata'));\r\n return new Promise((resolve, reject) => {\r\n if (this.lastErrorMessageId !== null) {\r\n this.messagesService.deleteMessage(this.lastErrorMessageId);\r\n this.lastErrorMessageId = null;\r\n }\r\n lastValueFrom(this.http.getJSON(url + params))\r\n .then((data: any) => {\r\n resolve({\r\n data: data.items,\r\n totalCount: data.totalCount\r\n });\r\n })\r\n .catch((error: any) => {\r\n this.lastErrorMessageId = this.messagesService.addMessage({\r\n type: MessageType.error,\r\n text: error && error.error && error.error.error &&\r\n typeof(error.error.error.errorText === 'string')\r\n ? error.error.error.errorText.replace('The request is invalid: ', '')\r\n : 'Failed to load data.'\r\n });\r\n\r\n resolve({\r\n data: [],\r\n totalCount: 0\r\n });\r\n })\r\n .finally(() => {\r\n this.loaderService.stop(loaderId);\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n public async getDeviceDetails(deviceId: string): Promise {\r\n const url = this.urlEnhancerService.replaceParams(\r\n this.config.services.tenant.m2mDeviceDetail, {deviceid: deviceId});\r\n\r\n const loaderId = this.loaderService.start();\r\n this.loaderService.setText(__i18n('loading data', 'm2mrouter.details.loader.text.loadingdata'));\r\n return new Promise((resolve, reject) => {\r\n if (this.lastErrorMessageId !== null) {\r\n this.messagesService.deleteMessage(this.lastErrorMessageId);\r\n this.lastErrorMessageId = null;\r\n }\r\n lastValueFrom(this.http.getJSON(url))\r\n .then((data: any) => {\r\n resolve(data);\r\n })\r\n .catch((error: any) => {\r\n if (error.status === 404) {\r\n reject(error.status);\r\n return;\r\n }\r\n this.lastErrorMessageId = this.messagesService.addMessage({\r\n type: MessageType.error,\r\n text: error && error.error && error.error.error &&\r\n typeof(error.error.error.errorText === 'string')\r\n ? error.error.error.errorText.replace('The request is invalid: ', '')\r\n : 'Failed to load data.'\r\n });\r\n\r\n resolve(null);\r\n })\r\n .finally(() => {\r\n this.loaderService.stop(loaderId);\r\n });\r\n });\r\n}\r\n}\r\n","import { Injectable, PipeTransform, Pipe } from '@angular/core';\r\nimport { __i18n } from '@localisation';\r\n\r\n@Injectable()\r\nexport class M2MDeviceStateTranslationService {\r\n private states: object = {\r\n ActiveLive: __i18n('Active live', 'deviceState.activeLive'),\r\n ActiveReady: __i18n('Active ready', 'deviceState.activeReady'),\r\n ActiveSleep: __i18n('Active sleep', 'deviceState.activeSleep'),\r\n ActiveStandby: __i18n('Active standby', 'deviceState.activeStandby'),\r\n ActiveSuspend: __i18n('Active suspend', 'deviceState.activeSuspend'),\r\n ActiveTest: __i18n('Active test', 'deviceState.activeTest'),\r\n Inactive: __i18n('Inactive', 'deviceState.inactive'), // obsolete\r\n InactiveNew: __i18n('Inactive new', 'deviceState.inactiveNew'), // obsolete\r\n InactiveStopped: __i18n('Inactive stopped', 'deviceState.inactiveStopped'),\r\n InactiveTransformed: __i18n('Inactive transformed', 'deviceState.inactiveTransformed'),\r\n MigratedFromOtherGdspEnvironment: __i18n('Migrated from other GDSP environment',\r\n 'deviceState.migratedFromOtherGdspEnvironment'),\r\n MigratedToOtherGdspEnvironment: __i18n('Migrated to other GDSP environment',\r\n 'deviceState.migratedToOtherGdspEnvironment'),\r\n NotProvisioned: __i18n('Not provisioned', 'deviceState.notProvisioned'),\r\n SuspendRegulatory: __i18n('Suspend regulatory', 'deviceState.suspendRegulatory'),\r\n Terminated: __i18n('Terminated', 'deviceState.terminated') // obsolete\r\n };\r\n\r\n public getLocalizedDeviceState(state: string): string {\r\n return this.states[state] || state;\r\n }\r\n}\r\n\r\n@Pipe({\n name: 'translateM2MDeviceState',\n standalone: false\n})\r\n@Injectable()\r\nexport class TranslateM2MDeviceStatePipe implements PipeTransform {\r\n constructor(\r\n private m2MDeviceStateTranslationService: M2MDeviceStateTranslationService) {\r\n // Nothing to do here.\r\n }\r\n\r\n public transform(value: string): string {\r\n return this.m2MDeviceStateTranslationService.getLocalizedDeviceState(value);\r\n }\r\n}\r\n\r\nexport function m2MDeviceStateTranslationsFactory() {\r\n return new M2MDeviceStateTranslationService();\r\n}\r\n\r\nexport const M2MDeviceStateTranslationsProvider = {\r\n provide: M2MDeviceStateTranslationService,\r\n useFactory: m2MDeviceStateTranslationsFactory,\r\n deps: []\r\n};\r\n","import { Component, OnInit } from '@angular/core';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { M2MDataStore } from './m2m-data-store';\r\nimport { __i18n } from '@localisation';\r\nimport { M2MDeviceStateTranslationService } from './m2m-device-state-translation.service';\r\n\r\n@Component({\n templateUrl: './m2m-router.template.html',\n standalone: false\n})\r\nexport class M2MRouterComponent implements OnInit {\r\n\r\n private deviceStateHeaderFilterValues: any[];\r\n public dataSource: DataSource;\r\n public equalFilter: string[] = ['='];\r\n public deviceStateHeaderFilterConfig: any;\r\n\r\n public constructor(\r\n private m2MDataStore: M2MDataStore,\r\n public m2MDeviceStateTranslationService: M2MDeviceStateTranslationService\r\n ) {\r\n this.deviceStateHeaderFilterValues = [\r\n 'ActiveLive',\r\n 'ActiveReady',\r\n 'ActiveSleep',\r\n 'ActiveStandby',\r\n 'ActiveSuspend',\r\n 'ActiveTest',\r\n //'InactiveNew', // obsolete\r\n 'InactiveStopped',\r\n 'InactiveTransformed',\r\n //'MigratedFromOtherGdspEnvironment',\r\n //'MigratedToOtherGdspEnvironment',\r\n //'NotProvisioned',\r\n 'SuspendRegulatory',\r\n //'Terminated' // obsolete\r\n ].map((v) => {\r\n return {\r\n text: m2MDeviceStateTranslationService.getLocalizedDeviceState(v),\r\n value: v\r\n };\r\n });\r\n this.deviceStateHeaderFilterConfig = {\r\n dataSource: this.deviceStateHeaderFilterValues\r\n };\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.dataSource = new DataSource({\r\n paginate: true,\r\n store: this.m2MDataStore.getStore({\r\n availableHeaderFilterValues: {\r\n state: this.deviceStateHeaderFilterValues\r\n }\r\n })\r\n });\r\n }\r\n}\r\n","\r\n \r\n \r\n {{cell.data.iccid}}\r\n \r\n\r\n \r\n \r\n {{cell.data.state | translateM2MDeviceState}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\r\nimport { __i18n } from '@localisation';\r\n\r\n@Injectable()\r\nexport class M2MInformationItemNameTranslationService {\r\n private names: object = {\r\n customerOrderNumber: __i18n('Customer order number', 'm2m.informationitemname.customerordernumber'),\r\n simProfile: __i18n('SIM profile', 'm2m.informationitemname.simprofile'),\r\n ragStatus: __i18n('RAG status', 'm2m.informationitemname.ragstatus'),\r\n provisioningStatus: __i18n('Provisioning status', 'm2m.informationitemname.provisioningstatus'),\r\n provisionedAtTimestamp: __i18n('Provisioned at', 'm2m.informationitemname.provisionedat'),\r\n lastChangeTimestamp: __i18n('Last change', 'm2m.informationitemname.lastchange'),\r\n firstUsedTimestamp: __i18n('First used', 'm2m.informationitemname.firstused'),\r\n iccid: __i18n('Iccid', 'm2m.informationitemname.iccid'),\r\n targetState: __i18n('Target state', 'm2m.informationitemname.targetstate'),\r\n startedActiveTest: __i18n('Started active test', 'm2m.informationitemname.startedactivetest'),\r\n hasBeenActiveTest: __i18n('Has been active test', 'm2m.informationitemname.hasbeenactivetest'),\r\n hasBeenActiveLive: __i18n('Has been active live', 'm2m.informationitemname.hasbeenactivelive'),\r\n sessionActive: __i18n('Session active', 'm2m.informationitemname.sessionactive'),\r\n sessionLastIpAddress: __i18n('Session last IP address', 'm2m.informationitemname.sessionlastipaddress'),\r\n sessionLastStartedTimestamp: __i18n('Session last started', 'm2m.informationitemname.sessionlaststarted'),\r\n sessionLastUpdatedTimestamp: __i18n('Session last updated', 'm2m.informationitemname.sessionlastupdated'),\r\n sessionLastTerminatedTimestamp: __i18n('Session last terminated',\r\n 'm2m.informationitemname.sessionlastterminated'),\r\n sessionLastDataTransmittedTimestamp: __i18n('Session last data transmitted',\r\n 'm2m.informationitemname.sessionlastdatatransmitted'),\r\n sessionLastCellId: __i18n('Session last cell id', 'm2m.informationitemname.sessionlastcellid'),\r\n sessionBytesIn: __i18n('Session bytes in', 'm2m.informationitemname.sessionbytesin'),\r\n sessionBytesOut: __i18n('Session bytes out', 'm2m.informationitemname.sessionbytesout'),\r\n sessionLastNotificationFailureTimestamp: __i18n('Session last notification failure',\r\n 'm2m.informationitemname.sessionlastnotificationfailure'),\r\n sessionLastNotificationFailureReason: __i18n('Session last notification failure reason',\r\n 'm2m.informationitemname.sessionlastnotificationfailurereason'),\r\n sessionPreviousNormalTimestamp: __i18n('Session previous normal',\r\n 'm2m.informationitemname.sessionpreviousnormal'),\r\n sessionLastAuthFailureTimestamp: __i18n('Session last authentication failure',\r\n 'm2m.informationitemname.sessionlastauthfailure'),\r\n sessionLastAuthFailureReason: __i18n('Session last authentication failure reason',\r\n 'm2m.informationitemname.sessionlastauthfailurereason'),\r\n lastWakeupRequestTimestamp: __i18n('Last wakeup request', 'm2m.informationitemname.lastwakeuprequest'),\r\n lastWakeupRequestType: __i18n('Last wakeup request type', 'm2m.informationitemname.lastwakeuprequesttype'),\r\n lastDetectedImei: __i18n('Last detected IMEI', 'm2m.informationitemname.lastdetectedimei'),\r\n lastDetectedImeiTimestamp: __i18n('Last detected IMEI timestamp',\r\n 'm2m.informationitemname.lastdetectedimeitimestamp'),\r\n };\r\n\r\n public getLocalizedInformationItemName(name: string): string {\r\n return this.names[name] || name;\r\n }\r\n}\r\n\r\n@Pipe({\n name: 'translateM2MInformationItemName',\n standalone: false\n})\r\n@Injectable()\r\nexport class TranslateM2MInformationItemNamePipe implements PipeTransform {\r\n constructor(\r\n private m2MInformationItemNameTranslationService: M2MInformationItemNameTranslationService) {\r\n // Nothing to do here.\r\n }\r\n\r\n public transform(value: string): string {\r\n return this.m2MInformationItemNameTranslationService.getLocalizedInformationItemName(value);\r\n }\r\n}\r\n\r\nexport function m2MInformationItemNameTranslationsFactory() {\r\n return new M2MInformationItemNameTranslationService();\r\n}\r\n\r\nexport const M2MInformationItemNameTranslationsProvider = {\r\n provide: M2MInformationItemNameTranslationService,\r\n useFactory: m2MInformationItemNameTranslationsFactory,\r\n deps: []\r\n};\r\n","import { Pipe, PipeTransform, Injectable } from '@angular/core';\r\nimport { __i18n } from '@localisation';\r\nimport { NumberFormatService, TimeDateConverterService } from '@converter';\r\n\r\n@Injectable()\r\n@Pipe({\n name: 'formatM2MInformationItemValue',\n standalone: false\n})\r\nexport class FormatM2MInformationItemValuePipe implements PipeTransform {\r\n constructor(\r\n private numberFormatter: NumberFormatService,\r\n private timeDateConverter: TimeDateConverterService\r\n ) {\r\n // nothing to do here.\r\n }\r\n\r\n public async transform(value: string, itemType: string, itemName: string, allowShortening: boolean = true): Promise {\r\n if (value !== null && itemType !== null) {\r\n switch (itemType.toLowerCase()) {\r\n case 'datetime':\r\n return this.timeDateConverter.convertFormat(value, 'datetimeseconds');\r\n\r\n case 'number':\r\n return await this.numberFormatter.format(value, false, allowShortening);\r\n\r\n case 'string':\r\n if (itemName) {\r\n switch (itemName) {\r\n case 'hasBeenActiveLive':\r\n case 'sessionActive':\r\n return value === 'Y'\r\n ? __i18n('Yes', 'm2m.informationitemvalue.yes')\r\n : value === 'N'\r\n ? __i18n('No', 'm2m.informationitemvalue.no')\r\n : value;\r\n\r\n case 'sessionLastCellId':\r\n if (value) {\r\n const match = /^(\\d+)-(\\d+)-(\\d+)-(\\d+)(?:-(\\d+))?$/.exec(value);\r\n if (match) {\r\n return 'MMC=' + match[1]\r\n + ' MNC=' + match[2]\r\n + ' LAC=' + match[3]\r\n + ' CID=' + match[4];\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return value;\r\n }\r\n}\r\n","import { Pipe, PipeTransform, Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\n@Pipe({\n name: 'excludeInformationItems',\n standalone: false\n})\r\nexport class ExcludeInformationItemsPipe implements PipeTransform {\r\n public transform(items: any[], excludeNames: string[]): any[] {\r\n excludeNames = excludeNames || [];\r\n items = items.filter((ii) => excludeNames.indexOf(ii.name) < 0);\r\n return items;\r\n }\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { M2MDataStore } from './m2m-data-store';\r\nimport { RoutingInfoService } from '@routing';\r\nimport { M2MDeviceStateTranslationService } from './m2m-device-state-translation.service';\r\nimport { M2MInformationItemNameTranslationService } from './m2m-information-item-name-translation.service';\r\nimport { Router } from '@angular/router';\r\n\r\n@Component({\n templateUrl: './m2m-router-detail.template.html',\n standalone: false\n})\r\nexport class M2MRouterDetailComponent implements OnInit {\r\n public deviceId: string;\r\n public details: any;\r\n\r\n constructor(\r\n private router: Router,\r\n private routingInfo: RoutingInfoService,\r\n private m2mDataStore: M2MDataStore,\r\n public m2MDeviceStateTranslationService: M2MDeviceStateTranslationService,\r\n public m2MInformationItemNameTranslationService: M2MInformationItemNameTranslationService) {\r\n const routingParams = this.routingInfo.getCurrentRoutingParams();\r\n this.deviceId = routingParams.deviceid;\r\n }\r\n\r\n public ngOnInit(): void {\r\n this.m2mDataStore.getDeviceDetails(this.deviceId)\r\n .then((data) => this.details = data)\r\n .catch((reason) => {\r\n if (reason === 404) {\r\n this.router.navigateByUrl('/Administration/M2MRouter');\r\n }\r\n });\r\n }\r\n}\r\n","\r\n Back\r\n\r\n
\r\n
\r\n \r\n ICCID:\r\n {{deviceId}}\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
NameValue
IMSI{{details.deviceId}}
Contract number{{details.contractNumber}}
Additional information{{details.additionalInformation}}
State{{details.state | translateM2MDeviceState}}
Assigned to plant{{details.assignedToPlantName}}
Service profile{{details.serviceProfile}}
{{item.name | translateM2MInformationItemName}}{{item.value | formatM2MInformationItemValue:item.type:item.name | async}}
\r\n
","import { NgModule } from '@angular/core';\r\nimport { M2MRouterComponent } from './m2m-router.component';\r\nimport { M2MRouterDetailComponent } from './m2m-router-detail.component';\r\nimport { CxFormsModule } from '@forms';\r\nimport { M2MDataStore } from './m2m-data-store';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { M2MDeviceStateTranslationService, TranslateM2MDeviceStatePipe } from './m2m-device-state-translation.service';\r\nimport {\r\n M2MInformationItemNameTranslationService,\r\n TranslateM2MInformationItemNamePipe\r\n} from './m2m-information-item-name-translation.service';\r\nimport { FormatM2MInformationItemValuePipe } from './format-m2m-information-item-value.pipe';\r\nimport { ExcludeInformationItemsPipe } from './exclude-information-items.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CxFormsModule,\r\n CommonModule,\r\n RouterModule\r\n ],\r\n declarations: [\r\n M2MRouterComponent,\r\n M2MRouterDetailComponent,\r\n TranslateM2MDeviceStatePipe,\r\n TranslateM2MInformationItemNamePipe,\r\n FormatM2MInformationItemValuePipe,\r\n ExcludeInformationItemsPipe\r\n ],\r\n exports: [\r\n M2MRouterComponent,\r\n M2MRouterDetailComponent,\r\n TranslateM2MDeviceStatePipe,\r\n TranslateM2MInformationItemNamePipe,\r\n FormatM2MInformationItemValuePipe,\r\n ExcludeInformationItemsPipe\r\n ],\r\n providers : [\r\n M2MDataStore,\r\n M2MDeviceStateTranslationService,\r\n TranslateM2MDeviceStatePipe,\r\n M2MInformationItemNameTranslationService,\r\n TranslateM2MInformationItemNamePipe,\r\n FormatM2MInformationItemValuePipe,\r\n ExcludeInformationItemsPipe\r\n ]\r\n})\r\nexport class M2MRouterModule {}\r\n\r\nexport {\r\n M2MRouterComponent,\r\n M2MRouterDetailComponent,\r\n M2MDeviceStateTranslationService\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { AuthHttp } from '@http';\r\nimport { Config } from '@config';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { PropertyConverter } from '@converter';\r\nimport { map } from 'rxjs/operators';\r\nimport { lastValueFrom } from 'rxjs';\r\nimport { __i18n } from '@localisation';\r\n\r\n\r\n\r\n@Injectable()\r\nexport class LicenseService {\r\n\r\n constructor(\r\n private http : AuthHttp,\r\n private config : Config,\r\n private urlEnhancer : UrlEnhancerService,\r\n private propertyConverter : PropertyConverter\r\n ){}\r\n\r\n public async addNewActivationKey(key : string){\r\n return lastValueFrom(this.http.post(this.urlEnhancer.replaceParams(this.config.services.license.addActivationKey), {\r\n activationKey : key\r\n }));\r\n }\r\n\r\n public async addNewActivationId(activationKey: string, activationId: string){\r\n return lastValueFrom(this.http.post(this.urlEnhancer.replaceParams(this.config.services.license.addActivationId, {\r\n activationkey: activationKey\r\n }), {\r\n activationId\r\n }));\r\n }\r\n\r\n public async validateActivationId(activationKey: string, activationId: string) {\r\n return lastValueFrom(this.http.getJSON(this.urlEnhancer.replaceParams(this.config.services.license.validateActivationId, {\r\n activationkey: activationKey,\r\n activationid: activationId\r\n })));\r\n }\r\n\r\n public async getActivationId(){\r\n return lastValueFrom(this.http.getJSON(\r\n this.urlEnhancer.replaceParams(this.config.services.license.licenseDetails)\r\n ).pipe(map(this.propertyConverter.convertToCamelCase.bind(this.propertyConverter)))\r\n )\r\n }\r\n\r\n public downloadActivationKey() {\r\n document.location.href = this.urlEnhancer.replaceParams(this.config.services.license.download);\r\n }\r\n\r\n\r\n public getErrorTextFromCode(code: number) {\r\n switch(code){\r\n case -2:\r\n return __i18n(\r\n 'The request is invalid: the activation id is not activateable',\r\n 'license.list.activation-id-not-activateable.error.message'\r\n );\r\n case -3:\r\n return __i18n(\r\n 'The request is invalid: the activation id contains no new features',\r\n 'license.list.activation-id-no-newfeatures.error.message'\r\n );\r\n case -4:\r\n return __i18n(\r\n 'The request is invalid: the activation key cannot be found',\r\n 'license.list.activation-key-not-found.error.message'\r\n );\r\n case -5:\r\n return __i18n(\r\n 'The request is invalid: the activation id could not be found',\r\n 'license.list.activation-id-not-found.error.message'\r\n )\r\n case -6:\r\n return __i18n(\r\n 'The request is invalid: Unable to add licenses from the given activation id',\r\n 'license.list.activation-id-unable-to-add-licenses.error.message'\r\n )\r\n default:\r\n return '';\r\n }\r\n \r\n }\r\n\r\n}","import { Component, ChangeDetectorRef } from '@angular/core';\r\nimport { DxAspNetDataXsrfAwareService } from '@tools';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { Config } from '@config';\r\nimport { LicenseService } from './license.service';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { Router } from '@angular/router';\r\nimport { __i18n } from '@localisation';\r\nimport { PrivilegesService } from '@privileges';\r\nimport { RoutePrivilegeNames } from '@route-privilege-names';\r\n\r\n@Component({\n selector: 'license-list',\n templateUrl: './license-list.template.html',\n standalone: false\n})\r\nexport class LicenseListComponent {\r\n\r\n constructor(\r\n private dxAspNetXsrfAwareService : DxAspNetDataXsrfAwareService,\r\n private urlEnhancer : UrlEnhancerService,\r\n private config : Config,\r\n private changeDetectorRef : ChangeDetectorRef,\r\n private service : LicenseService,\r\n private messageService : MessagesService,\r\n private router : Router,\r\n private privilegeService: PrivilegesService\r\n ){\r\n const privileges = this.privilegeService.getPrivileges();\r\n this.hasPrivSystemAdministrator = privileges.find(p => p.name === RoutePrivilegeNames.SystemAdministrator) !== undefined;\r\n }\r\n\r\n\r\n public remoteOperations = {\r\n paging: true, filtering: true, sorting: true, grouping: true, summary: true, groupPaging: true\r\n };\r\n\r\n public source: DataSource;\r\n\r\n public showLoader: boolean;\r\n\r\n private messageTarget : string = 'popup-messages';\r\n\r\n public hasPrivSystemAdministrator : boolean = false;\r\n\r\n public ngAfterViewInit(){\r\n let url = this.config.services.license.licenselist;\r\n url = this.urlEnhancer.replaceParams(url);\r\n\r\n this.source = new DataSource({\r\n paginate: true,\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: url,\r\n loadMethod: 'POST',\r\n key: 'plantFeatureLicenseId'\r\n })\r\n });\r\n\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n public isPopUpVisible: boolean = false;\r\n\r\n public openAddLicensePopup(){\r\n this.isPopUpVisible = true;\r\n this.isActivationIdValid = false;\r\n this.newActivationId = '';\r\n this.newLicenseKey = '';\r\n this.messageService.deleteTargetMessages(this.messageTarget);\r\n }\r\n\r\n\r\n public newLicenseKey : string = '';\r\n\r\n public newActivationId : string = '';\r\n\r\n public addLicensButtonDisabled : boolean = null;\r\n\r\n private parseErrorMessageForAddActivationKey(e){\r\n\r\n if(e.status === 409){\r\n return __i18n('The given activation id is not a valid for the license management system.', 'license.list.activation-key-invalid.error.message')\r\n }\r\n if(e.status === 404){\r\n return __i18n('The given activation id was not found.', 'license.list.not-found-activation-key.error.message');\r\n }\r\n if(typeof e.error === 'string' && e.error.startsWith('{')) {\r\n e.error = JSON.parse(e.error);\r\n }\r\n\r\n if(typeof e.error === 'string') {\r\n return e.error;\r\n }\r\n\r\n if(e.error && e.error.error && e.error.error.errorCode === 0) {\r\n return __i18n('The request is invalid: Invalid activation key', 'license.list.invalid-activation-key.error.message')\r\n }\r\n\r\n if(e.error && e.error.error && e.error.error.errorText) {\r\n return e.error.error.errorText;\r\n }\r\n\r\n if(e.statusText){\r\n return e.statusText;\r\n }\r\n\r\n return 'Some error occured!'\r\n }\r\n\r\n private parseErrorMessageForAddLicenseId(e){\r\n\r\n if(e.status === 404){\r\n return __i18n('The given activation id was not found.', 'license.list.not-found-activation-key.error.message');\r\n }\r\n if(typeof e.error === 'string' && e.error.startsWith('{')) {\r\n e.error = JSON.parse(e.error);\r\n }\r\n\r\n if(typeof e.error === 'string') {\r\n return e.error;\r\n }\r\n\r\n if(e?.error?.error?.errorCode) {\r\n const errorText = this.service.getErrorTextFromCode(e.error.error.errorCode);\r\n if(errorText) {\r\n return errorText;\r\n } \r\n }\r\n\r\n if(e?.error?.error?.errorText) {\r\n return e.error.error.errorText;\r\n }\r\n\r\n if(e.statusText){\r\n return e.statusText;\r\n }\r\n\r\n return 'Some error occured!'\r\n }\r\n\r\n private parseErrorMessageForValidateLicenseId(e){\r\n\r\n if(e.status === 409){\r\n return __i18n('The given activation id is not a valid for the license management system.', 'license.list.activation-key-invalid.error.message')\r\n }\r\n if(e.status === 404){\r\n return __i18n('The given activation id was not found.', 'license.list.not-found-activation-key.error.message');\r\n }\r\n if(typeof e.error === 'string' && e.error.startsWith('{')) {\r\n e.error = JSON.parse(e.error);\r\n }\r\n\r\n if(typeof e.error === 'string') {\r\n return e.error;\r\n }\r\n\r\n if(e.error && e.error.error && e.error.error.errorCode === 0) {\r\n return __i18n('The request is invalid: Invalid activation id', 'license.list.invalid-activation-id.error.message')\r\n }\r\n\r\n if(e.error && e.error.error && e.error.error.errorText) {\r\n return e.error.error.errorText;\r\n }\r\n\r\n if(e.statusText){\r\n return e.statusText;\r\n }\r\n\r\n return 'Some error occured!'\r\n }\r\n\r\n private wait(){\r\n return new Promise((resolve) => {\r\n setTimeout(resolve, 20000);\r\n })\r\n }\r\n\r\n public async addLicenseKey(){\r\n try {\r\n const value = (this.newLicenseKey) ? this.newLicenseKey.trim() : '';\r\n this.addLicensButtonDisabled = true;\r\n this.showLoader = true;\r\n if(this.newActivationId){\r\n const validation = await this.service.validateActivationId(this.newLicenseKey, this.newActivationId);\r\n if (validation.state !== 'ReadyForActivation') {\r\n throw new Error('This activation id cannot be activated.');\r\n }\r\n }\r\n const result = await this.service.addNewActivationKey(value);\r\n this.messageService.addMessage({\r\n text : __i18n('Activation Key successfully created!', 'license.list.activation-key-created.message'),\r\n type: MessageType.success\r\n })\r\n if(this.newActivationId){\r\n try {\r\n await this.service.addNewActivationId(this.newLicenseKey.trim(), this.newActivationId.trim());\r\n }catch(e){\r\n this.messageService.addMessage({\r\n text : this.parseErrorMessageForAddLicenseId(e),\r\n type: MessageType.error\r\n })\r\n }finally{\r\n this.showLoader = false;\r\n }\r\n this.newActivationId = ' ';\r\n }\r\n this.isPopUpVisible = false;\r\n this.source.reload();\r\n this.newLicenseKey = ' ';\r\n this.isActivationIdValid = false;\r\n }catch(e){\r\n this.messageService.addMessage({\r\n text : this.parseErrorMessageForAddActivationKey(e),\r\n type: MessageType.error,\r\n target: this.messageTarget\r\n })\r\n console.error('e', e)\r\n }finally{\r\n this.showLoader = false;\r\n this.addLicensButtonDisabled = null;\r\n }\r\n }\r\n\r\n public isActivationIdValid: boolean = false;\r\n public async validateActivationId() {\r\n this.showLoader = true;\r\n this.isActivationIdValid = false;\r\n try {\r\n const value = (this.newActivationId) ? this.newActivationId.trim() : '';\r\n const response = await this.service.validateActivationId(this.newLicenseKey, value);\r\n if (response === null) {\r\n this.messageService.addMessage({\r\n text: __i18n('This activation id does not contain any supported plant features.', 'license.details.message.nosupportedplantfeatures'),\r\n type: MessageType.error,\r\n target: this.messageTarget\r\n });\r\n } else if (response.state !== 'ReadyForActivation') {\r\n this.messageService.addMessage({\r\n text: __i18n('This activation id cannot be activated.', 'license.details.message.cannotbeactivated'),\r\n type: MessageType.error,\r\n target: this.messageTarget\r\n });\r\n } else {\r\n this.messageService.addMessage({\r\n target: this.messageTarget,\r\n text: __i18n('This activation id contains the following features: ', 'license.details.message.containsfeature') + response.features.join(', '),\r\n type: MessageType.success\r\n });\r\n this.isActivationIdValid = true;\r\n }\r\n } catch (e) {\r\n this.messageService.addMessage({\r\n text : this.parseErrorMessageForValidateLicenseId(e),\r\n type: MessageType.error,\r\n target: this.messageTarget\r\n })\r\n console.error('e', e)\r\n } finally {\r\n this.showLoader = false;\r\n }\r\n }\r\n\r\n}","
\r\n Add new Controller License\r\n
\r\n\r\n\r\n\r\n \r\n \r\n {{data.displayValue}}\r\n \r\n \r\n\r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LTS'}}\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n\r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n Controller Activation Key\r\n \r\n \r\n \r\n \r\n \r\n License Activation ID\r\n \r\n \r\n \r\n \r\n Validate License\r\n Create License\r\n \r\n \r\n
\r\n","import { Component, ChangeDetectorRef } from '@angular/core';\r\nimport { Config } from '@config';\r\nimport { UrlEnhancerService } from '@url';\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { DxAspNetDataXsrfAwareService } from '@tools';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\n\r\nimport { LicenseService } from './license.service';\r\nimport { PropertyConverter } from '@converter';\r\nimport { __i18n } from '@localisation';\r\nimport { PrivilegesService } from '@privileges';\r\nimport { RoutePrivilegeNames } from '@route-privilege-names';\r\n\r\n\r\n@Component({\n selector: 'license-details',\n templateUrl: './license-details.template.html',\n standalone: false\n})\r\nexport class LicenseDetailsComponent {\r\n constructor(\r\n private config : Config,\r\n private urlEnhancer : UrlEnhancerService,\r\n private dxAspNetXsrfAwareService : DxAspNetDataXsrfAwareService,\r\n private changeDetectorRef : ChangeDetectorRef,\r\n public service : LicenseService,\r\n private messageService : MessagesService,\r\n private propertyConverter : PropertyConverter,\r\n private privilegeService: PrivilegesService\r\n ){\r\n const privileges = this.privilegeService.getPrivileges();\r\n this.hasPrivSystemAdministrator = privileges.find(p => p.name === RoutePrivilegeNames.SystemAdministrator) !== undefined;\r\n }\r\n\r\n public newActivationId: string = '';\r\n\r\n public isPopUpVisible: boolean = false;\r\n\r\n public source: DataSource;\r\n\r\n public data: any;\r\n\r\n public activationKey: string = '';\r\n\r\n public licensedFeatures: Array = null;\r\n\r\n public availableFeatures: Array = null;\r\n\r\n public newFeatures: Array = null;\r\n\r\n public showLoader: boolean = false;\r\n\r\n public hasPrivSystemAdministrator : boolean = false;\r\n\r\n public remoteOperations = {\r\n paging: true, filtering: true, sorting: true, grouping: true, summary: true, groupPaging: true\r\n };\r\n\r\n private async reload() {\r\n const data: any = await this.service.getActivationId();\r\n data.licensedFeaturesFormatted = (data.licensedFeatures || []).join(', ') || __i18n('', 'license.details.nolicensedfeatures');\r\n this.data = data;\r\n this.licensedFeatures = this.data.licensedFeatures || [];\r\n this.activationKey = this.data.activationKey;\r\n }\r\n\r\n public async ngAfterViewInit(){\r\n await this.reload();\r\n let url = this.config.services.license.licenseKeyList;\r\n url = this.urlEnhancer.replaceParams(url);\r\n this.source = new DataSource({\r\n paginate: true,\r\n store: this.dxAspNetXsrfAwareService.createStore({\r\n loadUrl: url,\r\n loadMethod: 'POST',\r\n key: 'plantPurchasedFeatureLicenseId'\r\n })\r\n });\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n\r\n public startDownload(){\r\n this.service.downloadActivationKey();\r\n }\r\n\r\n public openAddActivationId(){\r\n this.isPopUpVisible = true;\r\n this.newActivationId = '';\r\n this.messageService.deleteTargetMessages(this.messageTarget);\r\n }\r\n\r\n private messageTarget : string = 'popup-messages';\r\n\r\n private handleActivationIdValidationError(e){\r\n let errorText: string = null;\r\n if(typeof e.error === 'string' && e.error.startsWith('{')) {\r\n e.error = JSON.parse(e.error);\r\n }\r\n\r\n if(e.error && e.error.error && e.error.error.errorCode === 0) {\r\n errorText = __i18n('The request is invalid: Invalid activation id', 'license.list.invalid-activation-id.error.message')\r\n }\r\n if(e.error && e.error.error && e.error.error.errorCode === -1) {\r\n errorText = __i18n('This activation id does not contain any supported plant features.', 'license.details.message.nosupportedplantfeatures');\r\n }\r\n if(e.status === 404){\r\n errorText = __i18n('The given activation id was not found.', 'license.details.message.not-found-activation-key.message');\r\n }\r\n if(e.status === 409){\r\n errorText = __i18n('The given activation id is not a valid for the license management system.', 'license.details.message.not-valid-activation-key.message');\r\n }\r\n if(e.error && e.error.error && e.error.error.errorText) {\r\n errorText = e.error.error.errorText;\r\n }\r\n\r\n if(typeof e.error === 'string') {\r\n errorText = e.error;\r\n }\r\n\r\n this.messageService.addMessage({\r\n text : errorText || e.error?.Message || e.error || e.statusText,\r\n type: MessageType.error,\r\n target: this.messageTarget\r\n })\r\n }\r\n\r\n\r\n\r\n private handleActivationIdAddError(e){\r\n let errorText: string = null;\r\n if(typeof e.error === 'string' && e.error.startsWith('{')) {\r\n e.error = JSON.parse(e.error);\r\n }\r\n\r\n if(e.status === 404){\r\n errorText = __i18n(\r\n 'The given activation id was not found.',\r\n 'license.details.message.not-found-activation-key.message'\r\n );\r\n }\r\n if(e.status === 409){\r\n errorText = __i18n(\r\n 'The given activation id is not a valid for the license management system.',\r\n 'license.details.message.not-valid-activation-key.message'\r\n );\r\n }\r\n if(e?.error?.error?.errorCode) {\r\n errorText = this.service.getErrorTextFromCode(e.error.error.errorCode);\r\n }\r\n \r\n if(e?.error?.error?.errorText) {\r\n errorText = e.error.error.errorText;\r\n }\r\n\r\n if(typeof e.error === 'string') {\r\n errorText = e.error;\r\n }\r\n\r\n this.messageService.addMessage({\r\n text : errorText || e.error?.Message || e.error || e.statusText,\r\n type: MessageType.error,\r\n target: this.messageTarget\r\n })\r\n }\r\n\r\n private handleActivationIdValidationSuccess(response){\r\n this.availableFeatures = response.features;\r\n this.newFeatures = this.availableFeatures.filter(f => (this.licensedFeatures || []).findIndex(lf => lf === f) < 0);\r\n const hasNewFeatures = this.newFeatures.length > 0;\r\n this.messageService.addMessage({\r\n text: hasNewFeatures\r\n ? __i18n('This activation id contains the following features: ', 'license.details.message.containsfeature') + response.features.join(', ')\r\n : __i18n('All contained features are already licensed: ', 'license.details.message.allfeatureslicensed') + response.features.join(', '),\r\n type: hasNewFeatures\r\n ? MessageType.success\r\n : MessageType.info,\r\n target: this.messageTarget\r\n });\r\n }\r\n\r\n public async validateActivationId() {\r\n this.availableFeatures = [];\r\n this.newFeatures = [];\r\n this.showLoader = true;\r\n try {\r\n const value = (this.newActivationId) ? this.newActivationId.trim() : '';\r\n const response = await this.service.validateActivationId(this.activationKey, value);\r\n if (response.state !== 'ReadyForActivation') {\r\n this.messageService.addMessage({\r\n text: __i18n('This activation id cannot be activated.', 'license.details.message.cannotbeactivated'),\r\n type: MessageType.error,\r\n target: this.messageTarget\r\n });\r\n } else {\r\n this.handleActivationIdValidationSuccess(response);\r\n }\r\n } catch (e) {\r\n this.handleActivationIdValidationError(e);\r\n } finally {\r\n this.showLoader = false;\r\n }\r\n }\r\n\r\n public async addActivationId(){\r\n this.showLoader = true;\r\n try {\r\n const value = (this.newActivationId) ? this.newActivationId.trim() : '';\r\n await this.service.addNewActivationId(this.activationKey, value);\r\n this.newActivationId = '';\r\n this.newFeatures = [];\r\n this.availableFeatures = [];\r\n this.isPopUpVisible = false;\r\n this.source.reload();\r\n await this.reload();\r\n } catch(e) {\r\n this.handleActivationIdAddError(e);\r\n } finally {\r\n this.showLoader = false;\r\n }\r\n }\r\n}","\r\n \r\n Add new Feature\r\n 0\"\r\n test-id=\"license.details.download.button\"\r\n i18n=\"@@license.details.download.button\"\r\n (click)=\"startDownload()\"\r\n >Download License\r\n \r\n\r\n\r\n \r\n Activation Key:\r\n \r\n \r\n \r\n Licensed features:\r\n \r\n \r\n \r\n License Keys:\r\n \r\n \r\n \r\n \r\n {{data.displayValue}}\r\n \r\n \r\n\r\n \r\n \r\n {{data.displayValue}}\r\n \r\n \r\n\r\n \r\n \r\n {{data.displayValue}}\r\n \r\n \r\n\r\n \r\n \r\n {{data.value.join(',')}}\r\n \r\n \r\n\r\n \r\n \r\n {{data.value | datetimeUtcToLocal | datetime: 'L LTS'}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n
\r\n \r\n \r\n \r\n \r\n Activation Id\r\n \r\n \r\n \r\n \r\n Validate License\r\n Create License\r\n \r\n \r\n
\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CxFormsModule } from '@forms';\r\nimport { DxPopupModule } from 'devextreme-angular/ui/popup';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { UiMessagesModule } from '@ui-messages';\r\nimport { UiFormatModule } from '@ui-format';\r\nimport { ConverterModule } from '@converter';\r\n\r\n\r\nimport { LicenseListComponent } from './license-list.component';\r\nimport { LicenseService } from './license.service';\r\nimport { LicenseDetailsComponent } from './license-details.component';\r\nimport { RouterModule } from '@angular/router';\r\nimport { PrivilegesModule } from '@privileges';\r\nimport { LoaderModule } from '@loader';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CxFormsModule,\r\n DxPopupModule,\r\n FormsModule,\r\n UiMessagesModule,\r\n UiFormatModule,\r\n RouterModule,\r\n ConverterModule,\r\n PrivilegesModule,\r\n LoaderModule\r\n ],\r\n declarations: [\r\n LicenseListComponent,\r\n LicenseDetailsComponent\r\n ],\r\n exports: [\r\n LicenseListComponent,\r\n LicenseDetailsComponent\r\n ],\r\n providers: [\r\n LicenseService\r\n ]\r\n})\r\nexport class LicenseModule {}\r\n\r\nexport {\r\n LicenseListComponent,\r\n LicenseService,\r\n LicenseDetailsComponent\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { DxAspNetDataXsrfAwareService } from '@tools';\r\nimport { UrlEnhancerService } from '@url';\r\nimport { Config } from '@config';\r\n\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport CustomStore from 'devextreme/data/custom_store';\r\nimport { AuthHttp } from '@http';\r\nimport { TenantService } from '@tenant';\r\nimport { IdConverterService, IdTypes, TokenConverterService } from '@converter';\r\nimport { custom } from 'devextreme/ui/dialog';\r\nimport { __i18n } from '@localisation';\r\nimport { lastValueFrom } from 'rxjs';\r\nimport { SortDescriptor } from 'devextreme/data';\r\n\r\n\r\nexport interface ThirdPartyApp {\r\n name : string;\r\n isEnabled : boolean;\r\n clientUri : string;\r\n logoUri : string;\r\n redirectUris : string[];\r\n postLogoutRedirectUris : string[];\r\n secrets?: any[];\r\n tenants?: any[];\r\n}\r\n\r\n\r\n@Injectable()\r\nexport class ThirdPartyAppsService {\r\n\r\n constructor(\r\n private urlEnhancerService: UrlEnhancerService,\r\n private config: Config,\r\n private dxAspNetXsrfAwareService: DxAspNetDataXsrfAwareService,\r\n private http: AuthHttp,\r\n private tenantService: TenantService,\r\n private converterService: IdConverterService\r\n ){}\r\n\r\n private mapSortItem(sort: any)\r\n {\r\n const result: { [id: string] : string } = {};\r\n if (typeof sort === 'string') {\r\n result[sort] = 'asc';\r\n } else {\r\n result[sort.selector] = sort.desc ? \"desc\" : \"asc\";\r\n }\r\n\r\n return result;\r\n }\r\n\r\n public getDataSource(): DataSource{\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.thirdPartyApps.listThirdPartyApps, {\r\n tenantid : this.converterService.convertToExternal(this.tenantService.getCurrentTenantId(), IdTypes.tenant)\r\n });\r\n\r\n const store = new CustomStore({\r\n load : async(options) => {\r\n let sort: Array<{ [id: string] : string }> = [{name: \"asc\"}];\r\n if (options.sort !== null) {\r\n if (Array.isArray(options.sort)) {\r\n sort = options.sort.map(this.mapSortItem);\r\n } else {\r\n sort = [this.mapSortItem(options.sort)];\r\n }\r\n }\r\n\r\n let requestUrl = url +\r\n (url.indexOf('?') >= 0 ? '&' : '?') +\r\n 'skip=' + (options.skip ?? 0) +\r\n '&take=' + (options.take ?? 10) +\r\n '&sortBy=' + encodeURIComponent(JSON.stringify(sort));\r\n\r\n if (options.filter && typeof(options.filter.filterValue) === 'string') {\r\n requestUrl += '&search=' + encodeURIComponent(options.filter.filterValue);\r\n }\r\n\r\n const result = await lastValueFrom(this.http.getJSON(requestUrl));\r\n return {\r\n totalCount: result.totalCount,\r\n data: result.items\r\n };\r\n }\r\n });\r\n\r\n return new DataSource({\r\n key: 'id',\r\n paginate: true,\r\n store\r\n });\r\n }\r\n\r\n public async getThirdPartyApp(appId: string){\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.thirdPartyApps.thirdPartyApp, {\r\n tenantid : this.converterService.convertToExternal(this.tenantService.getCurrentTenantId(), IdTypes.tenant),\r\n thirdpartyid: appId\r\n });\r\n return lastValueFrom(this.http.getJSON(url));\r\n }\r\n\r\n public async createThirdPartyApp(data: ThirdPartyApp){\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.thirdPartyApps.listThirdPartyApps, {\r\n tenantid : this.converterService.convertToExternal(this.tenantService.getCurrentTenantId(), IdTypes.tenant)\r\n });\r\n return lastValueFrom(this.http.postJSON(url, data));\r\n }\r\n\r\n public async updateThirdPartyApp(id: string, data: ThirdPartyApp){\r\n delete data.secrets;\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.thirdPartyApps.listThirdPartyApps, {\r\n tenantid : this.converterService.convertToExternal(this.tenantService.getCurrentTenantId(), IdTypes.tenant)\r\n });\r\n return lastValueFrom(this.http.putJSON(url + '/' + id, data));\r\n }\r\n\r\n public async deleteThirdPartyApp(appId: string){\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.thirdPartyApps.thirdPartyApp, {\r\n tenantid : this.converterService.convertToExternal(this.tenantService.getCurrentTenantId(), IdTypes.tenant),\r\n thirdpartyid: appId\r\n });\r\n return lastValueFrom(this.http.delete(url))\r\n }\r\n\r\n public async registerThirdPartyApp(appId: string){\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.thirdPartyApps.thirdPartyApp, {\r\n tenantid : this.converterService.convertToExternal(this.tenantService.getCurrentTenantId(), IdTypes.tenant),\r\n thirdpartyid: appId\r\n });\r\n return lastValueFrom(this.http.post(url, {}))\r\n }\r\n\r\n public async updatePrimarySecret(appId) { \r\n if(!await this.confirmNewSecret()){\r\n return;\r\n }\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.thirdPartyApps.thirdPartyPrimarySecret, {\r\n tenantid : this.converterService.convertToExternal(this.tenantService.getCurrentTenantId(), IdTypes.tenant),\r\n thirdpartyid: appId\r\n });\r\n return lastValueFrom(this.http.put(url, { }));\r\n }\r\n\r\n public async updateSecondarySecret(appId) {\r\n if(!await this.confirmNewSecret()){\r\n return;\r\n }\r\n const url = this.urlEnhancerService.replaceParams(this.config.services.thirdPartyApps.thirdPartySecondarySecret, {\r\n tenantid : this.converterService.convertToExternal(this.tenantService.getCurrentTenantId(), IdTypes.tenant),\r\n thirdpartyid: appId\r\n });\r\n return lastValueFrom(this.http.put(url, {}));\r\n }\r\n\r\n\r\n private confirmNewSecret() {\r\n return new Promise((resolve, reject) => {\r\n const dialog = custom({\r\n title: __i18n('Confirm', 'third-party-app.confirm-new-secret.title'),\r\n message: __i18n(\r\n 'When you renew this secret, the previous secret will no longer be valid. Make sure, it is not used anymore. This operation cannot be undone. Really renew?',\r\n 'third-party-app.confirm-new-secret.message'\r\n ),\r\n buttons: [\r\n {\r\n text: __i18n('Yes', 'third-party-app.confirm-new-secret.button.yes'),\r\n onClick: () => {\r\n dialog.hide();\r\n resolve(true);\r\n }\r\n },\r\n {\r\n text: __i18n('No', 'third-party-app.confirm-new-secret.button.no'),\r\n onClick: () => {\r\n dialog.hide();\r\n resolve(false);\r\n }\r\n }\r\n ]\r\n });\r\n dialog.show();\r\n });\r\n }\r\n}","import { Component } from '@angular/core';\r\n\r\nimport DataSource from 'devextreme/data/data_source';\r\nimport { ThirdPartyAppsService } from './third-party-apps.service';\r\n\r\n@Component({\n selector: 'third-party-apps-list',\n templateUrl: './third-party-apps-list.template.html',\n standalone: false\n})\r\nexport class ThirdPartyAppsListComponent {\r\n constructor(\r\n private service: ThirdPartyAppsService\r\n ){\r\n this.dataSource = this.service.getDataSource();\r\n }\r\n\r\n public dataSource : DataSource;\r\n\r\n public remoteOperations = {\r\n paging: true,\r\n filtering: true,\r\n sorting: true,\r\n grouping: true,\r\n summary: true,\r\n groupPaging: true\r\n };\r\n}","\r\n \r\n \r\n \r\n Create Third Party App\r\n \r\n \r\n \r\n \r\n \r\n \r\n {{cell.data.name}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n","import { Component, ViewChild } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { ClxFormComponent, FormEditModes } from '@forms/clx-forms/clx.form.component';\r\nimport { __i18n } from '@localisation';\r\nimport { RoutingInfoService } from '@routing';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { custom } from 'devextreme/ui/dialog';\r\nimport { ThirdPartyApp, ThirdPartyAppsService } from './third-party-apps.service';\r\nimport { LoaderService } from '@loader';\r\nimport { DataChangesHandlerService } from '@check';\r\n\r\n\r\n@Component({\n selector: 'third-party-app',\n templateUrl: './third-party-app.template.html',\n standalone: false\n})\r\nexport class ThirdPartyAppComponent {\r\n\r\n constructor(\r\n private routingInfo: RoutingInfoService,\r\n private service: ThirdPartyAppsService,\r\n private router: Router,\r\n private messages: MessagesService,\r\n private loader: LoaderService,\r\n private dataChangesService: DataChangesHandlerService\r\n ){}\r\n\r\n public async ngAfterViewInit(){\r\n const routingParams = this.routingInfo.getCurrentRoutingParams();\r\n this.thirdPartyId = routingParams.thirdpartyid;\r\n this.mode = this.thirdPartyId ? FormEditModes.update : FormEditModes.create;\r\n this.refresh();\r\n }\r\n\r\n @ViewChild('form')\r\n public form: ClxFormComponent\r\n\r\n public mode: FormEditModes = FormEditModes.create;\r\n\r\n public thirdPartyId: string;\r\n\r\n public data: any;\r\n public isPrimaryTenant: boolean = true;\r\n public isUpdatingPrimarySecret: boolean = false;\r\n public isUpdatingSecondarySecret: boolean = false;\r\n\r\n private handleSaveError(e: any) {\r\n if (typeof e.error?.error?.errorCode === 'number') {\r\n switch (e.error.error.errorCode) {\r\n case -1:\r\n throw new Error(\r\n __i18n(\r\n 'An app with the same name already exists. Please specify a unique name for the app.',\r\n 'third-party-app.message.nameuniqueerror'\r\n )\r\n );\r\n }\r\n }\r\n throw new Error(\r\n __i18n('An unexpected error has occured. Please try again.', 'third-party-app.message.unexpectederror')\r\n );\r\n }\r\n\r\n public async create(thirdPartyProduct: ThirdPartyApp) {\r\n const app = thirdPartyProduct as any;\r\n thirdPartyProduct.redirectUris = app.redirectUris.map((current) => current.uri).filter((current) => !!current);\r\n \r\n try {\r\n const result = await this.service.createThirdPartyApp(thirdPartyProduct);\r\n this.router.navigateByUrl('/Administration/ThirdPartyApps/' + result.id);\r\n this.messages.addMessage({\r\n type: MessageType.success,\r\n text: __i18n('Your app was successfully registered.', 'third-party-app.message.success')\r\n });\r\n } catch (e) {\r\n this.handleSaveError(e);\r\n }\r\n }\r\n\r\n public async update(thirdPartyProduct: ThirdPartyApp) {\r\n const app = thirdPartyProduct as any;\r\n if(thirdPartyProduct.redirectUris){\r\n thirdPartyProduct.redirectUris = app.redirectUris.map((current) => current.uri).filter((current) => !!current);\r\n }\r\n\r\n try {\r\n await this.service.updateThirdPartyApp(this.thirdPartyId, thirdPartyProduct);\r\n this.messages.addMessage({\r\n type: MessageType.success,\r\n text: __i18n('Your changes have been saved.', 'third-party-app.message.saved')\r\n });\r\n await this.refresh();\r\n setTimeout(() => { this.dataChangesService.markAsClean(); }, 100);\r\n } catch (e) {\r\n this.handleSaveError(e);\r\n }\r\n }\r\n\r\n public confirmDelete() : Promise {\r\n return new Promise(async(resolve, reject) => {\r\n const dialog = custom({\r\n title: this.isPrimaryTenant\r\n ? __i18n('Confirm delete', 'third-party-app.delete.confirm.title')\r\n : __i18n('Confirm unregister', 'third-party-app.unregister.confirm.title'),\r\n message: this.isPrimaryTenant\r\n ? __i18n('Are you sure, you want to delete this third-party app?', 'third-party-app.delete.confirm.text')\r\n : __i18n('Are you sure, you want to unregister this third-party app?', 'third-party-app.unregister.confirm.text'),\r\n buttons: [\r\n {\r\n text: __i18n('Yes', 'third-party-app.delete.confirm.button.yes'),\r\n onClick: () => {\r\n dialog.hide();\r\n resolve(true);\r\n }\r\n },\r\n {\r\n text: __i18n('No', 'third-party-app.delete.confirm.button.no'),\r\n accessKey: 'esc',\r\n onClick: () => {\r\n dialog.hide();\r\n resolve(false);\r\n }\r\n }\r\n ]\r\n });\r\n\r\n try {\r\n await dialog.show();\r\n }catch(e) {\r\n dialog.hide();\r\n resolve(false);\r\n }\r\n });\r\n }\r\n\r\n public async delete() {\r\n if (await this.confirmDelete()) {\r\n try {\r\n await this.service.deleteThirdPartyApp(this.thirdPartyId);\r\n this.router.navigateByUrl('/Administration/ThirdPartyApps');\r\n this.messages.addMessage({\r\n text: this.isPrimaryTenant\r\n ? __i18n('The app was deleted.', 'third-party-app.delete.success')\r\n : __i18n('The app was unregistered.', 'third-party-app.unregister.success'),\r\n type: MessageType.success\r\n });\r\n } catch (e) {\r\n this.messages.addMessage({\r\n text: this.isPrimaryTenant\r\n ? __i18n('An error occurred while deleting the app.', 'third-party-app.delete.error')\r\n : __i18n('Ann error occurred while unregistering the app.', 'third-party-app.unregister.error'),\r\n type: MessageType.error\r\n });\r\n }\r\n }\r\n }\r\n\r\n public async refresh(){\r\n if(this.mode === FormEditModes.update){\r\n const loaderId = this.loader.start();\r\n try {\r\n const data = await this.service.getThirdPartyApp(this.thirdPartyId);\r\n data.postLogoutRedirectUris = data.postLogoutRedirectUris.map((current) => {\r\n return { uri : current}\r\n });\r\n data.redirectUris = data.redirectUris.map((current) => {\r\n return { uri : current}\r\n });\r\n if (data.secrets) {\r\n data.primarySecret = data.secrets.find((current) => current.isPrimary)?.value || ''\r\n data.secondarySecret = data.secrets.find((current) => !current.isPrimary)?.value || ''\r\n } else {\r\n data.primarySecret = data.secondarySecret = ''\r\n }\r\n this.data = data;\r\n this.isPrimaryTenant = !!data.isPrimaryTenant;\r\n setTimeout(() => { this.dataChangesService.markAsClean(); }, 12);\r\n } catch (e) {\r\n console.error(e);\r\n this.form.resetData();\r\n this.router.navigateByUrl('/Administration/ThirdPartyApps');\r\n this.messages.addMessage({\r\n text: __i18n('Could not find the app.', 'third-party-app.load.not-found'),\r\n type: MessageType.error\r\n });\r\n } finally {\r\n this.loader.stop(loaderId);\r\n }\r\n }\r\n }\r\n\r\n public async refreshSecrets(){\r\n if(this.mode === FormEditModes.update){\r\n const data = await this.service.getThirdPartyApp(this.thirdPartyId);\r\n this.form.setData({\r\n secrets : data.secrets\r\n });\r\n }\r\n }\r\n\r\n public async updatePrimarySecret(){\r\n this.isUpdatingPrimarySecret = true;\r\n await this.service.updatePrimarySecret(this.thirdPartyId);\r\n this.isUpdatingPrimarySecret = false;\r\n this.refresh()\r\n }\r\n\r\n public async updateSecondarySecret(){\r\n this.isUpdatingSecondarySecret = true;\r\n await this.service.updateSecondarySecret(this.thirdPartyId);\r\n this.isUpdatingSecondarySecret = false;\r\n this.refresh()\r\n }\r\n\r\n public preventEnter(e){\r\n if(e.keyCode === 13){\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n}","\r\n \r\n\r\n Some Error occured!\r\n\r\n \r\n \r\n \r\n NOTE: Changes may take up to 1 hour to become active.\r\n \r\n Save\r\n Delete\r\n Unregister\r\n \r\n\r\n \r\n App Id:\r\n \r\n \r\n \r\n Name\r\n \r\n \r\n \r\n \r\n \r\n \r\n Client Uri\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n redirect Uri\r\n \r\n \r\n \r\n 1 ? 'input-button-layout' : null\">\r\n \r\n \r\n \r\n \r\n \r\n 1 && isPrimaryTenant\"\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n Add redirect Url\r\n \r\n \r\n\r\n \r\n Primary Secret\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n Secondary Secret\r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n Authority\r\n \r\n \r\n\r\n \r\n Metadata address\r\n \r\n \r\n","import { Component } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { __asyncI18n, __i18n } from '@localisation';\r\nimport { ErrorExtractorService } from '@tools';\r\nimport { MessagesService, MessageType } from '@ui-messages';\r\nimport { ThirdPartyAppsService } from './third-party-apps.service';\r\n\r\n\r\n@Component({\n selector: 'third-party-app-register',\n templateUrl: './third-party-app.register.template.html',\n standalone: false\n})\r\nexport class ThirdPartyAppRegisterComponent {\r\n constructor(\r\n private service: ThirdPartyAppsService,\r\n private messages: MessagesService,\r\n private extractor: ErrorExtractorService,\r\n private router: Router\r\n ){}\r\n\r\n public validationMessage: string = __i18n('This is not a valid app id!', 'third-party-app.register.validatio.error.app-id');\r\n\r\n public async register(appId: string){\r\n try{\r\n await this.service.registerThirdPartyApp(appId);\r\n this.messages.addMessage({\r\n type: MessageType.success,\r\n location: '/Administration/ThirdPartyApps',\r\n text: __i18n('App successfully registered!', 'third-party-app.register.success.message')\r\n });\r\n\r\n this.router.navigateByUrl('/Administration/ThirdPartyApps');\r\n }catch(e){\r\n let errorMessage;\r\n if(typeof e.error === 'string'){\r\n e.error = JSON.parse(e.error);\r\n }\r\n if(e?.error?.error?.errorCode === 0){\r\n errorMessage = __i18n('The request is invalid: The data field is invalid, The name is required.', 'third-party-app.register.invalid-request.error.message');\r\n }else{\r\n errorMessage = this.extractor.extractErrorMessage(e);\r\n }\r\n this.messages.addMessage({\r\n type: MessageType.error,\r\n text: errorMessage\r\n })\r\n }\r\n }\r\n}","\r\n \r\n \r\n Register\r\n \r\n \r\n\r\n \r\n App Id\r\n \r\n \r\n \r\n \r\n","import { WinFormsContentScreen } from '@winforms';\r\nimport { __asyncI18n } from '@localisation';\r\nimport { RoutingEntry } from '@routing';\r\nimport { RoutePrivilegeNames } from './routeprivilegenames';\r\nimport { DummySiteComponent } from '@site-info';\r\nimport { PlantAdministrationListComponent, PlantApplicationSetNaviExtension, CanActivateWithCurrentTenant } from '@plants';\r\n\r\nexport const PlantAdministrationRoutes: Array = [\r\n {\r\n path: '',\r\n component: PlantAdministrationListComponent,\r\n data: {\r\n title: __asyncI18n('Plants', 'subnavi.administration.plants'),\r\n contentRoute: '/Site/SiteAdministration/List',\r\n redirectTo: 'Administrations/Plants/:plantid/*firstChild',\r\n favouritesType: 'siteadministration'\r\n }\r\n },\r\n {\r\n path: 'ActivatingSite',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Activating plants', 'subnavi.administration.activating-plants'),\r\n contentRoute: '/Site/SiteAdministration/ActivatingSite',\r\n showParentInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: ':plantid',\r\n canActivate: [CanActivateWithCurrentTenant],\r\n data: {\r\n title: ':plantid | plantIdToName',\r\n showParentInSubNavigation: true,\r\n showChildrenAsSecondLevel: true,\r\n dontShowInSubNavigation: true,\r\n favouritesRouteCaption: '[PlantName] / [PageName]',\r\n redirectTo: [\r\n 'Administration/Plants/:plantid/Settings',\r\n 'Administration/Plants/:plantid/Users',\r\n 'Administration/Plants/:plantid/Alarms'\r\n //'Administration/Plants/:plantid/*firstChild'\r\n ],\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: DummySiteComponent,\r\n data: {\r\n title: ':plantid | plantIdToName',\r\n showParentInSubNavigation: true,\r\n showChildrenAsSecondLevel: true,\r\n dontShowInSubNavigation: true,\r\n favouritesRouteCaption: '[PlantName] / [PageName]',\r\n redirectTo: [\r\n 'Administration/Plants/:plantid/Settings',\r\n 'Administration/Plants/:plantid/Users',\r\n 'Administration/Plants/:plantid/Alarms'\r\n ]\r\n }\r\n },\r\n {\r\n path: 'Details',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Details', 'subnavi.administration.plant.details'),\r\n contentRoute: '/Site/SiteAdministration/Details/:plantid',\r\n dontShowInSubNavigation: true,\r\n testId: 'sidenavigation.link.details'\r\n }\r\n },\r\n {\r\n path: 'Users',\r\n data: {\r\n title: __asyncI18n('Plant users', 'subnavi.administration.plant.plant.users'),\r\n contentRoute: '/Site/SiteAdministration/Users/:plantid',\r\n testId: 'sidenavigation.link.plantusers',\r\n privileges: [RoutePrivilegeNames.ManagePlantUsers]\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Plant users TEST', 'subnavi.administration.plant.plant.user.test'),\r\n contentRoute: '/Site/SiteAdministration/Users/:plantid'\r\n }\r\n },\r\n {\r\n path: 'Add',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Add user', 'subnavi.administration.plant.user.add'),\r\n contentRoute: '/Site/SiteAdministration/SiteUser/:plantid',\r\n showParentInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: ':userid',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: ':userid | userIdToName',\r\n contentRoute: '/Site/SiteAdministration/SiteUser/:plantid?userId=:userid',\r\n showParentInSubNavigation: true\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: 'Alarms',\r\n data: {\r\n title: __asyncI18n('Plant notifications', 'subnavi.administration.plant.alarms'),\r\n contentRoute: '/Site/SiteAdministration/Alarms/:plantid',\r\n testId: 'sidenavigation.link.alarmnotifications',\r\n privileges: [RoutePrivilegeNames.PlantAlarmNotification, RoutePrivilegeNames.NotificationAccess],\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Plant notifications', 'subnavi.administration.plant.alarms'),\r\n contentRoute: '/Site/SiteAdministration/Alarms/:plantid'\r\n }\r\n },\r\n {\r\n path: 'Add',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Add notifications', 'subnavi.administration.plant.add-alarm'),\r\n contentRoute: '/Site/SiteAdministration/SiteAlarm/:plantid',\r\n showParentInSubNavigation: true,\r\n favouritesTitle: '[ParentPageName]'\r\n }\r\n },\r\n {\r\n path: 'CreateFromTemplate',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n(\r\n 'Create plant notification from template',\r\n 'subnavi.administration.plant.create-alarm-from-template'\r\n ),\r\n contentRoute: '/Site/SiteAdministration/CreateAlarmFromTemplate/:plantid',\r\n showParentInSubNavigation: true,\r\n favouritesTitle: '[ParentPageName]'\r\n }\r\n },\r\n {\r\n path: ':alarmnotificationsid',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: ':alarmnotificationsid | plantAlarmNoteIdToName',\r\n contentRoute: '/Site/SiteAdministration/SiteAlarm/:plantid?alarmId=:alarmnotificationsid',\r\n showParentInSubNavigation: true,\r\n favouritesTitle: '[ParentPageName]',\r\n favouritesCaption: '[ParentParentPageName] / [AlarmNoteName]'\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: 'Settings',\r\n data: {\r\n title: __asyncI18n('Plant settings', 'subnavi.administration.plant.settings'),\r\n contentRoute: '/Site/SiteAdministration/Settings/:plantid',\r\n testId: 'sidenavigation.link.settings',\r\n dynamicSiblings: PlantApplicationSetNaviExtension,\r\n privileges: [RoutePrivilegeNames.ManagePlantSettings]\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Plant settings', 'subnavi.administration.plant.settings'),\r\n contentRoute: '/Site/SiteAdministration/Settings/:plantid',\r\n dynamicSiblings: PlantApplicationSetNaviExtension\r\n }\r\n },\r\n {\r\n path: 'ReplacingSite',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Replaceing plant', 'subnavi.administration.plant.replacing-site'),\r\n contentRoute: '/Site/SiteAdministration/ReplacingSite/:plantid',\r\n showParentInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: 'AssignUnassignSite',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Assign/Unassign plant', 'subnavi.administration.plant.assignunassign-site'),\r\n contentRoute: '/Site/SiteAdministration/AssignUnassignSite/:plantid',\r\n showParentInSubNavigation: true\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: 'ConfirmDelete',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Confirm delete', 'subnavi.administration.plant.confirmdelete'),\r\n contentRoute: '/Site/SiteAdministration/ConfirmDelete/:plantid',\r\n testId: 'sidenavigation.link.confirmdelete',\r\n dontShowInSubNavigation: true\r\n }\r\n },\r\n\r\n {\r\n path: 'Operating',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Plant operating', 'subnavi.administration.plant.operating'),\r\n redirectTo: 'Operating/Plants/:plantid',\r\n testId: 'sidenavigation.link.operating',\r\n privileges: [\r\n [\r\n [\r\n RoutePrivilegeNames.PlantDashboard,\r\n RoutePrivilegeNames.CloudItem,\r\n RoutePrivilegeNames.PlantUpgrade,\r\n RoutePrivilegeNames.WebAccess,\r\n RoutePrivilegeNames.ToolAccess,\r\n RoutePrivilegeNames.PlantFileAccess,\r\n RoutePrivilegeNames.PlantFileManage,\r\n RoutePrivilegeNames.PlantAlarm,\r\n RoutePrivilegeNames.PlantGraphic,\r\n RoutePrivilegeNames.PlantHistory,\r\n RoutePrivilegeNames.PlantTasks,\r\n RoutePrivilegeNames.PlantScheduler,\r\n RoutePrivilegeNames.PlantDashboard,\r\n ],\r\n RoutePrivilegeNames.PlantOperating\r\n ]\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n];\r\n","import { WinFormsContentScreen } from '@winforms';\r\nimport { __asyncI18n } from '@localisation';\r\nimport { RoutingEntry } from '@routing';\r\nimport { RoutePrivilegeNames } from './routeprivilegenames';\r\nimport { DummySiteComponent } from '@site-info';\r\nimport {\r\n SystemApplicationSetNaviExtension,\r\n SystemEditComponent,\r\n SystemsListComponent,\r\n SystemUserListComponent,\r\n SystemUserEditComponent,\r\n SystemPlantsComponent,\r\n SystemNotificationListComponent,\r\n SystemNotificationSettingsComponent,\r\n SystemNotificationCreateFromTemplateComponent\r\n} from '@systems';\r\nimport { CanActivateWithCurrentTenant } from '@plants';\r\n\r\n\r\nexport const SystemAdministrationRoutes: Array = [\r\n {\r\n path: '',\r\n component: SystemsListComponent,\r\n data: {\r\n title: __asyncI18n('Systems', 'subnavi.administration.systems'),\r\n redirectTo: 'Administrations/Plants/:plantid/*firstChild',\r\n favouritesType: 'siteadministration'\r\n }\r\n },\r\n {\r\n path: 'Create',\r\n component: SystemEditComponent,\r\n data: {\r\n title: __asyncI18n('Create System', 'subnavi.administration.system.new'),\r\n testId: 'sidenavigation.system.new',\r\n dontShowInSubNavigation: true,\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true,\r\n showSubNaviLevel: 1\r\n },\r\n },\r\n {\r\n path: ':systemid',\r\n canActivate: [CanActivateWithCurrentTenant],\r\n data: {\r\n title: ':systemid | systemIdToName',\r\n showParentInSubNavigation: true,\r\n showChildrenAsSecondLevel: true,\r\n dontShowInSubNavigation: true,\r\n dontShowFavourites: true,\r\n favouritesRouteCaption: '[SystemName] / [PageName]',\r\n redirectTo: [\r\n 'Administration/Systems/:systemid/Settings',\r\n 'Administration/Systems/:systemid/Users',\r\n 'Administration/Systems/:systemid/SystemNotifications',\r\n 'Administration/Systems/:systemid/Plants'\r\n ],\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: DummySiteComponent,\r\n data: {\r\n title: ':systemid | systemIdToName',\r\n showParentInSubNavigation: true,\r\n showChildrenAsSecondLevel: true,\r\n dontShowInSubNavigation: true,\r\n dontShowFavourites: true,\r\n favouritesRouteCaption: '[SystemName] / [PageName]',\r\n redirectTo: [\r\n 'Administration/Systems/:systemid/Settings',\r\n 'Administration/Systems/:systemid/Users'//,\r\n //'Administration/Systems/:systemid/Alarms'\r\n ]\r\n }\r\n },\r\n {\r\n path: 'Settings',\r\n data: {\r\n title: __asyncI18n('System settings', 'subnavi.administration.system.settings'),\r\n privileges: [\r\n RoutePrivilegeNames.ManageSystemSettings,\r\n RoutePrivilegeNames.ReadOnlySystemSettings\r\n ],\r\n testId: 'sidenavigation.system.settings',\r\n dontShowFavourites: true\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: SystemEditComponent,\r\n data: {\r\n title: __asyncI18n('System settings', 'subnavi.administration.system.settings'),\r\n testId: 'sidenavigation.system.settings',\r\n dontShowFavourites: true\r\n }\r\n },\r\n {\r\n path: 'ReplacingSite',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Replaceing system', 'subnavi.administration.system.replacing-site'),\r\n contentRoute: '/Site/SiteAdministration/ReplacingSite/:plantid',\r\n showParentInSubNavigation: true,\r\n testId: 'sidenavigation.system.replace'\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: 'Users',\r\n data: {\r\n title: __asyncI18n('System users', 'subnavi.administration.system.plant.users'),\r\n contentRoute: '/Site/SiteAdministration/Users/:plantid',\r\n testId: 'sidenavigation.system.users',\r\n dontShowFavourites: true,\r\n privileges: [\r\n RoutePrivilegeNames.ManageSystemUsers,\r\n RoutePrivilegeNames.ReadOnlySystemUsers\r\n ]\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: SystemUserListComponent,\r\n data: {\r\n title: __asyncI18n('System users', 'subnavi.administration.system.plant.user.test'),\r\n contentRoute: '/Site/SiteAdministration/Users/:plantid'\r\n }\r\n },\r\n {\r\n path: 'Add',\r\n component: SystemUserEditComponent,\r\n data: {\r\n title: __asyncI18n('Add user', 'subnavi.administration.system.user.add'),\r\n contentRoute: '/Site/SiteAdministration/SiteUser/:plantid',\r\n testId: 'sidenavigation.system.users.add',\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: ':userid',\r\n component: SystemUserEditComponent,\r\n data: {\r\n title: ':userid | userIdToName',\r\n contentRoute: '/Site/SiteAdministration/SiteUser/:plantid?userId=:userid',\r\n testId: 'sidenavigation.system.user',\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true\r\n }\r\n }\r\n ]\r\n },\r\n // {\r\n // path: 'Alarms',\r\n // data: {\r\n // title: __asyncI18n('Plant notifications', 'subnavi.administration.system.alarms'),\r\n // contentRoute: '/Site/SiteAdministration/Alarms/:plantid',\r\n // testId: 'sidenavigation.link.alarmnotifications'\r\n // },\r\n // children: [\r\n // {\r\n // path: '',\r\n // component: WinFormsContentScreen,\r\n // data: {\r\n // title: __asyncI18n('Plant notifications', 'subnavi.administration.system.alarms'),\r\n // contentRoute: '/Site/SiteAdministration/Alarms/:plantid'\r\n // }\r\n // },\r\n // {\r\n // path: 'Add',\r\n // component: WinFormsContentScreen,\r\n // data: {\r\n // title: __asyncI18n('Add notifications', 'subnavi.administration.system.add-alarm'),\r\n // contentRoute: '/Site/SiteAdministration/SiteAlarm/:plantid',\r\n // showParentInSubNavigation: true,\r\n // favouritesTitle: '[ParentPageName]'\r\n // }\r\n // },\r\n // {\r\n // path: 'CreateFromTemplate',\r\n // component: WinFormsContentScreen,\r\n // data: {\r\n // title: __asyncI18n(\r\n // 'Create plant notification from template',\r\n // 'subnavi.administration.plant.create-alarm-from-template'\r\n // ),\r\n // contentRoute: '/Site/SiteAdministration/CreateAlarmFromTemplate/:plantid',\r\n // showParentInSubNavigation: true,\r\n // favouritesTitle: '[ParentPageName]'\r\n // }\r\n // },\r\n // {\r\n // path: ':alarmnotificationsid',\r\n // component: WinFormsContentScreen,\r\n // data: {\r\n // title: ':alarmnotificationsid',\r\n // contentRoute: '/Site/SiteAdministration/SiteAlarm/:plantid?alarmId=:alarmnotificationsid',\r\n // showParentInSubNavigation: true,\r\n // favouritesTitle: '[ParentPageName]',\r\n // favouritesCaption: '[ParentParentPageName] / [AlarmNoteName]'\r\n // }\r\n // }\r\n // ]\r\n // },\r\n {\r\n path: 'SystemNotifications',\r\n data: {\r\n title: __asyncI18n('System Notifications', 'subnavi.administration.system.notifications'),\r\n privileges: [\r\n RoutePrivilegeNames.SystemAlarmNotification,\r\n RoutePrivilegeNames.ReadOnlySystemAlarmNotifications\r\n ],\r\n testId: 'sidenavigation.system.notifications',\r\n dontShowFavourites: true\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: SystemNotificationListComponent,\r\n data: {\r\n title: __asyncI18n('System Notifications', 'subnavi.administration.system.notifications'),\r\n testId: 'sidenavigation.system.notifications',\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: 'Add',\r\n component: SystemNotificationSettingsComponent,\r\n data: {\r\n title: __asyncI18n('Add System Notification', 'subnavi.administration.system.notifications.add'),\r\n testId: 'sidenavigation.system.notifications.add',\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: 'CreaateFromTemplate',\r\n component: SystemNotificationCreateFromTemplateComponent,\r\n data: {\r\n title: __asyncI18n('Create Notification From Template', 'subnavi.administration.system.notifications.from.template'),\r\n testId: 'sidenavigation.system.notifications.settings',\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: ':systemnotificationid',\r\n component: SystemNotificationSettingsComponent,\r\n data: {\r\n title: __asyncI18n('System Notifications Settings', 'subnavi.administration.system.notifications.settings'),\r\n testId: 'sidenavigation.system.notifications.settings',\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true\r\n }\r\n }\r\n ]\r\n },\r\n \r\n {\r\n path: 'Plants',\r\n component: SystemPlantsComponent,\r\n data: {\r\n title: __asyncI18n('System plants', 'subnavi.administration.system.plants'),\r\n privileges: [RoutePrivilegeNames.Systems],\r\n testId: 'sidenavigation.system.plants',\r\n dynamicSiblings: SystemApplicationSetNaviExtension\r\n }\r\n },\r\n {\r\n path: 'ConfirmDelete',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Confirm delete', 'subnavi.administration.system.confirmdelete'),\r\n contentRoute: '/Site/SiteAdministration/ConfirmDelete/:systemid',\r\n testId: 'sidenavigation.system.confirmdelete',\r\n dontShowInSubNavigation: true\r\n }\r\n },\r\n {\r\n path: 'Operating',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('System operating', 'subnavi.administration.system.operating'),\r\n redirectTo: 'Operating/Systems/:systemid',\r\n privileges: [\r\n RoutePrivilegeNames.Systems,\r\n RoutePrivilegeNames.SystemDashboard,\r\n RoutePrivilegeNames.SystemAlarm,\r\n RoutePrivilegeNames.SystemGraphic,\r\n RoutePrivilegeNames.SystemGraphic,\r\n RoutePrivilegeNames.SystemFileAccess,\r\n RoutePrivilegeNames.SystemFileManage\r\n ],\r\n testId: 'sidenavigation.system.operating'\r\n }\r\n }\r\n ]\r\n }\r\n];\r\n","import { WinFormsContentScreen } from '@winforms';\r\nimport { __asyncI18n } from '@localisation';\r\nimport { RoutingEntry } from '@routing';\r\nimport { UserEditComponent, UserListComponent } from '@user';\r\n\r\nexport const UserRoutes: Array = [\r\n {\r\n path : '',\r\n component: UserListComponent,\r\n data: {\r\n title: __asyncI18n('Users', 'subnavi.administration.user'),\r\n // contentRoute : '/SystemAdministration/User/List',\r\n showSubNaviLevel: 1,\r\n favouritesType: 'users'\r\n }\r\n },\r\n {\r\n path : 'Settings',\r\n data : {\r\n title : __asyncI18n('Settings', 'subnavi.administration.user.settings'),\r\n showSubNaviLevel: 1,\r\n dontShowInBreadCrumb : true,\r\n caption: __asyncI18n('Create new admin', 'subnavi.administration.user.settings.alternate.title')\r\n },\r\n children : [\r\n {\r\n path : '',\r\n component: UserEditComponent,\r\n data : {\r\n title : __asyncI18n('Settings', 'subnavi.administration.user.settings'),\r\n showSubNaviLevel: 1,\r\n }\r\n },\r\n {\r\n path : ':username',\r\n component: WinFormsContentScreen,\r\n data : {\r\n title : ':username | userIdFromQueryToName',\r\n showSubNaviLevel: 1,\r\n favouritesCaption: '[UserName]',\r\n contentRoute : '/SystemAdministration/User/Settings/:username',\r\n contentRouteParams : {\r\n tenantid : ':tenantId'\r\n }\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path : ':userid',\r\n data : {\r\n title : ':userid | userIdFromQueryToName',\r\n // redirectTo : '/Administration/User',\r\n showSubNaviLevel: 1,\r\n dontShowInSubNavigation: true,\r\n favouritesRouteCaption: '[UserName]'\r\n },\r\n children : [\r\n {\r\n path : '',\r\n component : UserEditComponent,\r\n data : {\r\n title : ':userid | userIdFromQueryToName',\r\n showSubNaviLevel: 1,\r\n dontShowInSubNavigation: true\r\n // title : ':userid | userIdFromQueryToName',\r\n // redirectTo : '/Administration/User',\r\n }\r\n }\r\n ]\r\n }\r\n];\r\n","import { __asyncI18n } from '@localisation';\r\nimport { RoutingEntry } from '@routing';\r\nimport { DummySiteComponent } from '@site-info';\r\nimport {\r\n TenantListComponent,\r\n TenantEditBasicDataComponent,\r\n TenantEditAllPrivilegesComponent,\r\n TenantEditApiAccountsComponent,\r\n TenantEditApplicationsInfoMappingComponent,\r\n TenantEditKeyPerformanceIndicatorComponent,\r\n TenantEditBillingComponent,\r\n TenantEditBannedDomainsComponent,\r\n TenantFromTemplateComponent,\r\n TenantPlantUsersComponent,\r\n TenantInactiveUsersComponent,\r\n TenantSystemNotificationComponent\r\n} from '@tenant';\r\nimport { RoutePrivilegeNames } from '@route-privilege-names';\r\nimport { TenantEditGuard } from 'modules/tenant-module/administration/tenant-edit-parts/tenant.edit.guard';\r\n\r\n\r\n\r\nexport const NewTenantRoutes: Array = [\r\n {\r\n path : '',\r\n component: TenantListComponent,\r\n data: {\r\n title: __asyncI18n('Tenants', 'subnavi.administration.tenants'),\r\n showSubNaviLevel: 1\r\n }\r\n },\r\n {\r\n path : 'Add',\r\n component: TenantEditBasicDataComponent,\r\n data : {\r\n title : ':intenant | tenantType', //__asyncI18n('Add tenant', 'subnavi.administration.add-tenat'),\r\n showSubNaviLevel: 1,\r\n testId: 'administration.tenants.add'\r\n }\r\n },\r\n {\r\n path : 'AddSub/:tenantid',\r\n component: DummySiteComponent,\r\n data : {\r\n title : __asyncI18n('Add sub-tenant', 'subnavi.administration.add-sub-tenat'),\r\n showSubNaviLevel: 1,\r\n redirectTo: 'Administration/Tenants/Add?intenant=:tenantid'\r\n }\r\n },\r\n {\r\n path : 'CreateFromTemplate',\r\n component : TenantFromTemplateComponent,\r\n data : {\r\n title : __asyncI18n('Create from template', 'subnavi.administration.create-tenant-from-template'),\r\n contentRoute : '/SystemAdministration/Tenant/CreateTenantFromTemplate?parentId=:parentId',\r\n showSubNaviLevel: 1,\r\n testId: 'administration.tenants.create-from-template'\r\n }\r\n },\r\n {\r\n path : ':selectedtenantid',\r\n data : {\r\n title : ':selectedtenantid | tenantIdToName',\r\n favouritesRouteCaption: '[MainPageName]',\r\n showParentInSubNavigation: true,\r\n showChildrenAsSecondLevel: true,\r\n dontShowInSubNavigation: true,\r\n redirectTo: [\r\n 'Administration/Tenants/:selectedtenantid/Settings',\r\n 'Administration/Tenants/:selectedtenantid/Privileges',\r\n 'Administration/Tenants/:selectedtenantid/ApplicationInfoMapping',\r\n 'Administration/Tenants/:selectedtenantid/KeyPerformanceIndicator',\r\n 'Administration/Tenants/:selectedtenantid/Billing',\r\n 'Administration/Tenants/:selectedtenantid/BannedDomains'\r\n ],\r\n },\r\n children : [\r\n {\r\n path : '',\r\n component : DummySiteComponent,\r\n data : {\r\n title : ':selectedtenantid | tenantIdToName',\r\n showParentInSubNavigation: true,\r\n showChildrenAsSecondLevel: true,\r\n dontShowInSubNavigation: true,\r\n redirectTo: [\r\n 'Administration/Tenants/:selectedtenantid/Settings',\r\n 'Administration/Tenants/:selectedtenantid/Privileges',\r\n 'Administration/Tenants/:selectedtenantid/ApplicationInfoMapping',\r\n 'Administration/Tenants/:selectedtenantid/KeyPerformanceIndicator',\r\n 'Administration/Tenants/:selectedtenantid/Billing',\r\n 'Administration/Tenants/:selectedtenantid/BannedDomains'\r\n ]\r\n }\r\n },\r\n {\r\n path : 'Settings',\r\n component: TenantEditBasicDataComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Settings', 'subnavi.administration.tenant.settings'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n privileges: [\r\n RoutePrivilegeNames.TenantManage\r\n ],\r\n tenantPermission: 'TenantNavSetting',\r\n testId: 'administration.tenants.accordion.tenant'\r\n }\r\n },\r\n {\r\n path : 'Privileges',\r\n component: TenantEditAllPrivilegesComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Privileges', 'subnavi.administration.tenant.privileges'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n privileges: [\r\n RoutePrivilegeNames.TenantManage\r\n ],\r\n tenantPermission: 'TenantNavPrivileges',\r\n testId: 'administration.accordion.privileges'\r\n }\r\n },\r\n {\r\n path : 'ApiAccount',\r\n component: TenantEditApiAccountsComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Api Account', 'subnavi.administration.tenant.api-account'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n privileges: [\r\n RoutePrivilegeNames.TenantManage\r\n ],\r\n tenantPermission: 'TenantNavApiAccounts',\r\n testId: 'administration.tenants.accordion.apiaccounts'\r\n }\r\n },\r\n {\r\n path : 'ApplicationInfoMapping',\r\n component: TenantEditApplicationsInfoMappingComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Application Info Mapping', 'subnavi.administration.tenant.application-info-mapping'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n privileges: [\r\n RoutePrivilegeNames.TenantManage\r\n ],\r\n tenantPermission: 'TenantNavApplicationInfo',\r\n testId: 'administration.tenants.accordion.default'\r\n }\r\n },\r\n {\r\n path : 'KeyPerformanceIndicator',\r\n component: TenantEditKeyPerformanceIndicatorComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Key Performance Indicator', 'subnavi.administration.tenant.key-performance-indicator'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n privileges: [\r\n RoutePrivilegeNames.TenantManage\r\n ],\r\n tenantPermission: 'TenantNavKpi',\r\n testId: 'administration.tenants.accordion.kpis'\r\n }\r\n },\r\n {\r\n path : 'Billing',\r\n component: TenantEditBillingComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Billing', 'subnavi.administration.tenant.billing'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n privileges: [\r\n RoutePrivilegeNames.BillingAdmin\r\n ],\r\n tenantPermission: 'TenantNavBilling',\r\n testId: 'administration.tenants.accordion.billing'\r\n }\r\n },\r\n {\r\n path : 'BannedDomains',\r\n component: TenantEditBannedDomainsComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Banned domains', 'subnavi.administration.tenant.banned-domains'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n privileges: [\r\n RoutePrivilegeNames.TenantManage\r\n ],\r\n tenantPermission: 'TenantNavBannedDomains',\r\n testId: 'administration.tenants.accordion.banneddomains'\r\n }\r\n },\r\n {\r\n path : 'PlantUsers',\r\n component: TenantPlantUsersComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Plant Users', 'subnavi.administration.tenant.plant-users'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n privileges: [\r\n RoutePrivilegeNames.TenantManage\r\n ],\r\n tenantPermission: 'TenantNavBannedDomains',\r\n testId: 'administration.tenants.accordion.plant-users'\r\n }\r\n },\r\n {\r\n path : 'InactiveUsers',\r\n component: TenantInactiveUsersComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('Inactive Users', 'subnavi.administration.tenant.inactive-users'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n tenantPermission: 'TenantUserInactivityList',\r\n testId: 'administration.tenants.accordion.inactive-users'\r\n }\r\n },\r\n {\r\n path : 'SystemNotification',\r\n component: TenantSystemNotificationComponent,\r\n canActivate: [TenantEditGuard],\r\n data : {\r\n title : __asyncI18n('System Notifications', 'subnavi.administration.tenant.system-notification'),\r\n favouritesTitle: '[ParentParentPageName]',\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n tenantPermission: 'SystemNotificationsTenantOverride',\r\n testId: 'administration.tenants.accordion.system-notifications'\r\n }\r\n }\r\n ]\r\n }\r\n];\r\n","import { RoutingEntry, RoutingLoadableFiles } from '@routing';\r\nimport { __asyncI18n } from '@localisation';\r\nimport { WinFormsContentScreen } from '@winforms';\r\nimport { RoutePrivilegeNames } from './routeprivilegenames';\r\nimport { PreregisterNavigationAccessService, PreregisterComponent } from '@preregister';\r\nimport { DummySiteComponent } from '@site-info';\r\nimport { DigitalWalletNavigationAccess } from '@billing';\r\nimport { TenantRoutes } from './tenant.routes';\r\n/*\r\nimport {\r\n BillingProductsComponent,\r\n BillingProductComponent,\r\n DigitalWalletNavigationAccess,\r\n OverviewComponent,\r\n TransferComponent,\r\n DepositComponent,\r\n StoreComponent,\r\n TransferAccessService,\r\n DepositAccessService,\r\n DepositOnlyAccessService\r\n} from '@billing';*/\r\nimport { M2MRouterComponent, M2MRouterDetailComponent } from '@m2m-router';\r\nimport { GlobalNotificationAdministrationComponent } from 'modules/notification-module/global-notification-administration.component';\r\nimport { LicenseListComponent, LicenseDetailsComponent } from '@license';\r\nimport { ThirdPartyAppsListComponent } from '../modules/third-party-apps-module/third-party-apps-list.component';\r\nimport { ThirdPartyAppComponent } from 'modules/third-party-apps-module/third-party-app.component';\r\nimport { ThirdPartyAppRegisterComponent } from 'modules/third-party-apps-module/third-party-app.register.component';\r\nimport { FavouriteTileTokens } from '@favourites';\r\nimport { PlantAdministrationRoutes } from './plant-administration.routes';\r\nimport { SystemAdministrationRoutes } from './system-administration.routes';\r\nimport { UserRoutes } from './user.routes';\r\nimport { NewTenantRoutes } from './new-tenant.routes';\r\nimport { BatchUpgradeListComponent, BatchUpgradeScheduleListComponent } from '@upgrade';\r\nimport { BatchUpgradeDetailsComponent } from '../modules/upgrade-module';\r\n\r\nconst userRoleTitle = ':userroleid | userRolesIdToName';\r\n\r\nexport const AdministrationRoutes: Array = [\r\n {\r\n path: 'Systems',\r\n data: {\r\n title: __asyncI18n('Systems', 'subnavi.administration.systems'),\r\n category: 'administration',\r\n testId: 'sidenavigation.link.systems',\r\n dontShowFavourites: true,\r\n favouritesType: 'siteadministration',\r\n privileges: [\r\n RoutePrivilegeNames.Systems\r\n ],\r\n favouritesTitle: '[ParentPageName]',\r\n },\r\n children: [\r\n ...SystemAdministrationRoutes\r\n ]\r\n },\r\n {\r\n path: 'Plants',\r\n data: {\r\n title: __asyncI18n('Plants', 'subnavi.administration.plants'),\r\n category: 'administration',\r\n testId: 'sidenavigation.link.plants',\r\n favouritesType: 'siteadministration',\r\n privileges: [\r\n RoutePrivilegeNames.PlantsUnassigned,\r\n RoutePrivilegeNames.PlantAdministration\r\n ],\r\n favouritesTitle: '[ParentPageName]',\r\n },\r\n children: [\r\n ...PlantAdministrationRoutes\r\n ]\r\n },\r\n {\r\n path: 'Upgrade',\r\n data: {\r\n title: __asyncI18n('Upgrade', 'subnavi.administration.upgrade'),\r\n category: 'administration',\r\n testId: 'sidenavigation.link.administration-upgrade',\r\n favouritesType: 'siteadministration',\r\n privileges: [\r\n RoutePrivilegeNames.SiteBatchUpgrade\r\n ],\r\n favouritesTitle: '[ParentPageName]',\r\n },\r\n children : [\r\n {\r\n path: '',\r\n component: BatchUpgradeListComponent,\r\n data: {\r\n title: __asyncI18n('Upgrade', 'subnavi.administration.upgrade'),\r\n category: 'administration',\r\n testId: 'sidenavigation.link.administration-upgrade',\r\n favouritesType: 'siteadministration',\r\n privileges: [\r\n RoutePrivilegeNames.SiteBatchUpgrade\r\n ],\r\n favouritesTitle: '[ParentPageName]'\r\n },\r\n },\r\n {\r\n path: 'Schedule',\r\n component: BatchUpgradeScheduleListComponent,\r\n data: {\r\n title: __asyncI18n('Schedule Upgrade', 'subnavi.administration.upgrade.schedule'),\r\n category: 'administration',\r\n testId: 'sidenavigation.link.administration-upgrade',\r\n favouritesType: 'siteadministration',\r\n privileges: [\r\n RoutePrivilegeNames.SiteBatchUpgrade\r\n ],\r\n favouritesTitle: '[ParentPageName]',\r\n dontShowInSubNavigation: true,\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true,\r\n showSubNaviLevel: 1\r\n },\r\n children: [\r\n {\r\n path: ':batchupgradeid',\r\n component: BatchUpgradeScheduleListComponent,\r\n data: {\r\n title: __asyncI18n('Schedule Upgrade', 'subnavi.administration.upgrade.schedule'),\r\n category: 'administration',\r\n testId: 'sidenavigation.link.administration-upgrade',\r\n favouritesType: 'siteadministration',\r\n privileges: [\r\n RoutePrivilegeNames.SiteBatchUpgrade\r\n ],\r\n favouritesTitle: '[ParentPageName]',\r\n dontShowInSubNavigation: true,\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true,\r\n showSubNaviLevel: 1\r\n }\r\n }]\r\n },\r\n {\r\n path: ':batchupgradeid',\r\n component: BatchUpgradeDetailsComponent,\r\n data: {\r\n title: ':batchupgradeid | batchUpgradeIdToName',\r\n category: 'administration',\r\n testId: 'sidenavigation.link.administration-upgrade.details',\r\n favouritesType: 'siteadministration',\r\n privileges: [\r\n RoutePrivilegeNames.SiteBatchUpgrade\r\n ],\r\n favouritesTitle: '[ParentPageName] / [PageName]',\r\n dontShowInSubNavigation: true,\r\n dontShowFavourites: true,\r\n showParentInSubNavigation: true,\r\n showSubNaviLevel: 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: 'User',\r\n data: {\r\n title: __asyncI18n('Users', 'subnavi.administration.users'),\r\n contentRoute: '/SystemAdministration/User/List',\r\n showParentInSubNavigation: true,\r\n testId: 'sidenavigation.link.users',\r\n favouritesType: 'users',\r\n favouritesRouteColor: 'natural-yellow',\r\n favouritesRouteTitle: '[MainPageName]',\r\n favouritesTitle: '[ParentPageName]',\r\n privileges: [\r\n RoutePrivilegeNames.TenantUsers\r\n ],\r\n },\r\n children: [\r\n ...UserRoutes\r\n ]\r\n },\r\n {\r\n path: 'TenantsOld',\r\n data: {\r\n title: __asyncI18n('Tenants old', 'subnavi.administration.tenats'),\r\n contentRoute: '/SystemAdministration/Tenant/List',\r\n privileges: [\r\n \"NonExistingPrivilege\"\r\n ],\r\n favouritesCaption: '[PageName]',\r\n favouritesRouteTitle: '[MainPageName]',\r\n favouritesTitle: '[ParentPageName]',\r\n },\r\n children: [\r\n ...TenantRoutes\r\n ]\r\n },\r\n {\r\n path: 'Tenants',\r\n data: {\r\n title: __asyncI18n('Tenants', 'subnavi.administration.tenats'),\r\n testId: 'sidenavigation.link.tenants',\r\n privileges: [\r\n RoutePrivilegeNames.BillingAdmin,\r\n RoutePrivilegeNames.TenantManage\r\n ],\r\n favouritesCaption: '[PageName]',\r\n favouritesRouteTitle: '[MainPageName]',\r\n favouritesTitle: '[ParentPageName]',\r\n },\r\n children: [\r\n ...NewTenantRoutes\r\n ]\r\n },\r\n {\r\n path: 'UserRoles',\r\n data: {\r\n title: __asyncI18n('Roles', 'subnavi.administration.userroles'),\r\n contentRoute: '/SystemAdministration/UserRole/List',\r\n testId: 'sidenavigation.link.userroles',\r\n privileges: [RoutePrivilegeNames.PlantRolesManage],\r\n favouritesCaption: FavouriteTileTokens.pageName,\r\n favouritesRouteTitle: FavouriteTileTokens.mainPageName,\r\n favouritesTitle: FavouriteTileTokens.parentPageName,\r\n favouritesRouteColor: 'natural-green'\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Roles', 'subnavi.administration.userroles'),\r\n contentRoute: '/SystemAdministration/UserRole/List'\r\n }\r\n },\r\n {\r\n path: 'Add',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n('Add user role', 'subnavi.administration.adduserrole'),\r\n contentRoute: '/SystemAdministration/UserRole/Settings',\r\n showSubNaviLevel: 1,\r\n dontShowInBreadCrumb: true\r\n }\r\n },\r\n {\r\n path: ':userroleid',\r\n data: {\r\n title: userRoleTitle,\r\n redirectTo: '/Administration/UserRoles/:userroleid/Details',\r\n dontShowInSubNavigation: true,\r\n notClickableInBreadCrumb: true,\r\n favouritesRouteCaption: FavouriteTileTokens.pageName,\r\n favouritesTitle: FavouriteTileTokens.parentParentPageName\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: DummySiteComponent,\r\n data: {\r\n title: userRoleTitle,\r\n redirectTo: '/Administration/UserRoles/:userroleid/Details',\r\n dontShowInSubNavigation: true,\r\n notClickableInBreadCrumb: true,\r\n favouritesRouteCaption: FavouriteTileTokens.pageName,\r\n favouritesTitle: FavouriteTileTokens.parentParentPageName\r\n }\r\n },\r\n {\r\n path: 'Details',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: userRoleTitle,\r\n contentRoute: '/SystemAdministration/UserRole/Settings/:userroleid',\r\n showSubNaviLevel: 1,\r\n dontShowInBreadCrumb: true,\r\n favouritesRouteCaption: FavouriteTileTokens.pageName,\r\n favouritesTitle: FavouriteTileTokens.parentParentPageName\r\n }\r\n },\r\n {\r\n path: 'Settings',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: userRoleTitle,\r\n contentRoute: '/SystemAdministration/UserRole/Settings/:userroleid',\r\n showSubNaviLevel: 1,\r\n dontShowInBreadCrumb: true,\r\n favouritesRouteCaption: FavouriteTileTokens.pageName,\r\n favouritesTitle: FavouriteTileTokens.parentParentPageName\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'ActivatingMultibleSites',\r\n component: PreregisterComponent,\r\n canActivate: [PreregisterNavigationAccessService],\r\n data: {\r\n title: __asyncI18n('Pre-register', 'subnavi.administration.preregister'),\r\n breadcrumbTitle: __asyncI18n(\r\n 'Pre-register multiple plants',\r\n 'subnavi.administration.preregister.breadcrumb'\r\n ),\r\n testId: 'sidenavigation.link.preregister',\r\n privileges: [RoutePrivilegeNames.PlantPreRegister]\r\n }\r\n },\r\n {\r\n path: 'DigitalWallet',\r\n canActivate: [DigitalWalletNavigationAccess],\r\n loadChildren: () => import('../modules/billing-module/digital-wallet/index')\r\n .then((m) => m.BillingDigitalWalletModule),\r\n data: {\r\n title: __asyncI18n('Digital wallet', 'subnavi.administration.digital-wallet'),\r\n testId: 'sidenavigation.link.digitalwallet',\r\n privileges: [RoutePrivilegeNames.DigitalWallet],\r\n lazyRedirectTo: '/Administration/DigitalWallet/*firstChild',\r\n showChildrenAsSecondLevel: true\r\n }\r\n },\r\n {\r\n path: 'M2MRouter',\r\n data: {\r\n title: __asyncI18n('M2M router', 'subnavi.administration.m2mrouter'),\r\n testId: 'sidenavigation.link.m2mrouter',\r\n privileges: ['M2MRouter']\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: M2MRouterComponent,\r\n data: {\r\n title: __asyncI18n('M2M router', 'subnavi.administration.m2mrouter'),\r\n testId: 'sidenavigation.link.m2mrouter',\r\n privileges: ['M2MRouter']\r\n }\r\n },\r\n {\r\n path: ':deviceid',\r\n component: M2MRouterDetailComponent,\r\n data: {\r\n title: ':deviceid',\r\n showSubNaviLevel: 1\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: 'LicenseManager',\r\n data: {\r\n title: __asyncI18n('License Manager', 'subnavi.administration.licensemanager'),\r\n testId: 'sidenavigation.link.licensemanager',\r\n privileges : [\r\n RoutePrivilegeNames.PlantLicenseAccess,\r\n RoutePrivilegeNames.PlantLicenseManage\r\n ]\r\n },\r\n children : [\r\n {\r\n path: '',\r\n component: LicenseListComponent,\r\n data: {\r\n title: __asyncI18n('License Manager', 'subnavi.administration.licensemanager'),\r\n testId: 'sidenavigation.link.licensemanager',\r\n privileges : [\r\n RoutePrivilegeNames.PlantLicenseAccess,\r\n RoutePrivilegeNames.PlantLicenseManage\r\n ]\r\n },\r\n },\r\n {\r\n path : ':licenseid',\r\n component: LicenseDetailsComponent,\r\n data: {\r\n title: __asyncI18n('Details', 'subnavi.administration.licensemanagerdetails'),\r\n testId: 'sidenavigation.link.licensemanagerdetails',\r\n showSubNaviLevel: 1,\r\n privileges : [\r\n RoutePrivilegeNames.PlantLicenseAccess,\r\n RoutePrivilegeNames.PlantLicenseManage\r\n ]\r\n },\r\n }\r\n ]\r\n },\r\n {\r\n path: 'ThirdPartyApps',\r\n data: {\r\n title: __asyncI18n('Third-Party Apps', 'subnavi.administration.third-party-apps'),\r\n testId: 'sidenavigation.link.third-party-apps',\r\n privileges : [\r\n RoutePrivilegeNames.ThirdPartyApps\r\n ]\r\n },\r\n children : [\r\n {\r\n path: '',\r\n component: ThirdPartyAppsListComponent,\r\n data: {\r\n title: __asyncI18n('Third-Party Apps', 'subnavi.administration.third-party-apps'),\r\n testId: 'sidenavigation.link.third-party-apps',\r\n }\r\n },\r\n {\r\n path: 'Add',\r\n component: ThirdPartyAppComponent,\r\n data: {\r\n title: __asyncI18n('Create Third-Party App', 'subnavi.administration.third-party-app.create'),\r\n testId: 'sidenavigation.link.third-party-app.create',\r\n showSubNaviLevel: 1\r\n },\r\n },\r\n {\r\n path: 'Register',\r\n component: ThirdPartyAppRegisterComponent,\r\n data: {\r\n title: __asyncI18n('Register Third-Party App', 'subnavi.administration.third-party-app.register'),\r\n testId: 'sidenavigation.link.third-party-app.register',\r\n showSubNaviLevel: 1\r\n }\r\n },\r\n {\r\n path: ':thirdpartyid',\r\n component: ThirdPartyAppComponent,\r\n data: {\r\n title: __asyncI18n('Edit Third-Party App', 'subnavi.administration.third-party-app.edit'),\r\n testId: 'sidenavigation.link.third-party-app.edit',\r\n showSubNaviLevel: 1\r\n },\r\n }\r\n ]\r\n },\r\n {\r\n path: 'ReleaseNotes',\r\n loadChildren: () => import('../modules/release-notes-module/editor/index')\r\n .then((m) => m.ReleaseNotesEditorModule),\r\n data: {\r\n title: __asyncI18n('Release notes', 'subnavi.administration.releasenotes'),\r\n testId: 'sidenavigation.link.releasenotes',\r\n privileges: ['ReleaseNotes']\r\n }\r\n },\r\n {\r\n path: 'BillingProduct',\r\n loadChildren: () => import('../modules/billing-module/products/index').then((m) => m.BillingProductModule),\r\n data: {\r\n title: __asyncI18n('Billing products', 'subnavi.administration.billing-product'),\r\n testId: 'sidenavigation.link.billingproduct',\r\n privileges: [RoutePrivilegeNames.ProductDefinition],\r\n favouritesRouteTitle: FavouriteTileTokens.mainPageName,\r\n favouritesTitle: FavouriteTileTokens.parentPageName,\r\n favouritesCaption: FavouriteTileTokens.pageName\r\n },\r\n },\r\n {\r\n path: 'BillingNotificationTemplate',\r\n data: {\r\n title: __asyncI18n('Billing notifications', 'subnavi.administration.billing-notification-templates'),\r\n contentRoute: '/SystemAdministration/BillingNotificationTemplates',\r\n testId: 'sidenavigation.link.billingnotificationtemplate',\r\n privileges: [RoutePrivilegeNames.ProductDefinition],\r\n favouritesRouteTitle: FavouriteTileTokens.mainPageName,\r\n favouritesTitle: FavouriteTileTokens.parentPageName,\r\n favouritesCaption: FavouriteTileTokens.pageName\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n(\r\n 'Billing notifications',\r\n 'subnavi.administration.billing-notification-templates'\r\n ),\r\n contentRoute: '/SystemAdministration/BillingNotificationTemplate/List'\r\n }\r\n },\r\n {\r\n path: ':billingnotficationid',\r\n data: {\r\n title: ':billingnotficationid | billingNotificationTemplateIdToName',\r\n showSubNaviLevel: 1,\r\n redirectTo: 'Administration/BillingNotificationTemplate/:billingnotficationid/Settings',\r\n favouritesCaption: FavouriteTileTokens.pageName\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: DummySiteComponent,\r\n data: {\r\n title: ':billingnotficationid | billingNotificationTemplateIdToName',\r\n showSubNaviLevel: 1,\r\n redirectTo: 'Administration/BillingNotificationTemplate/:billingnotficationid/Settings',\r\n favouritesCaption: FavouriteTileTokens.pageName\r\n }\r\n },\r\n {\r\n path: 'Settings',\r\n component: WinFormsContentScreen,\r\n data: {\r\n title: __asyncI18n(\r\n 'Settings',\r\n 'subnavi.administration.billing-notification-template.settings'\r\n ),\r\n contentRoute:\r\n '/SystemAdministration/BillingNotificationTemplate/Settings/:billingnotficationid',\r\n showSubNaviLevel: 1,\r\n files: [\r\n { path: '/Content/codemirror/css', type: RoutingLoadableFiles.css },\r\n { path: '/bundles/codemirror', type: RoutingLoadableFiles.js }\r\n ],\r\n favouritesCaption: FavouriteTileTokens.parentPageName\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'Notifications',\r\n component: GlobalNotificationAdministrationComponent,\r\n data: {\r\n title: __asyncI18n('System notifications', 'subnavi.administration.notification'),\r\n contentRoute: '/SystemAdministration/Notification',\r\n testId: 'sidenavigation.link.notifications',\r\n privileges: [RoutePrivilegeNames.SystemNotifications],\r\n favouritesCaption: FavouriteTileTokens.pageName\r\n }\r\n }\r\n];\r\n","import { Component, ViewChild, ElementRef, Input } from '@angular/core';\r\nimport { LoaderService } from '@loader';\r\nimport { ClxPlantOverlayComponent } from './clx-plant-overlay.component';\r\nimport { MapServiceProvider, KpiService, MapServiceDummy } from '@geo';\r\nimport { CachedPromiseManager } from '@cache';\r\nimport { StateService, StateSubscription, States } from '@state';\r\n\r\n@Component({\n selector: 'clx-status-map',\n template: `\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n `,\n providers: [MapServiceProvider],\n standalone: false\n})\r\nexport class ClxStatusMapComponent {\r\n constructor(\r\n public service: MapServiceDummy,\r\n public kpiService: KpiService,\r\n public loaderService: LoaderService,\r\n public stateService: StateService\r\n ){}\r\n\r\n @ViewChild('map', { static: true })\r\n public mapElement: ElementRef;\r\n\r\n @ViewChild(ClxPlantOverlayComponent, { static: true })\r\n public overlay: ClxPlantOverlayComponent;\r\n\r\n public kpiSelect: any[] = [];\r\n\r\n private stateSubscription: StateSubscription;\r\n\r\n @Input()\r\n public mode: string = 'plant';\r\n\r\n private lastKpiKey: string = ''\r\n public async kpiChanged(kpiKey: any): Promise{\r\n const loaderId = this.loaderService.start();\r\n kpiKey = await this.kpiService.selectKpi(kpiKey);\r\n // avoid map refresh if the kpiKey has not changed\r\n if (kpiKey && kpiKey !== this.lastKpiKey) {\r\n this.lastKpiKey = kpiKey;\r\n await this.service.refreshMap(kpiKey, this.mode);\r\n }\r\n this.loaderService.stop(loaderId);\r\n return kpiKey;\r\n }\r\n\r\n public async refreshKpis() {\r\n CachedPromiseManager.removeCache('map-data');\r\n await this.service.refreshMap(this.kpiService.selectedKpiId, this.mode);\r\n }\r\n\r\n public async ngAfterViewInit(){\r\n const loaderId = this.loaderService.start();\r\n try {\r\n const kpis = await this.kpiService.getKpis(this.mode);\r\n await this.service.init(this.mapElement.nativeElement, this.overlay);\r\n const kpiKey = await this.kpiChanged(null);\r\n this.kpiSelect = kpis.map((current) => {\r\n return {\r\n value : current.key,\r\n text : current.title,\r\n selected : current.key === kpiKey ? 'selected' : null\r\n };\r\n });\r\n }catch(e){\r\n console.error('Some error occured while loading the map!', e);\r\n this.loaderService.stop(loaderId);\r\n }finally{\r\n this.loaderService.stop(loaderId);\r\n }\r\n this.stateSubscription = this.stateService.value(States.selectedSubtenants).subscribe(() => {\r\n if(this.lastKpiKey) {\r\n // if the selected Tenants change delete cache and reload data\r\n CachedPromiseManager.removeCache('map-data');\r\n this.service.refreshMap(this.lastKpiKey, this.mode);\r\n }\r\n })\r\n }\r\n\r\n public ngOnDestroy(){\r\n CachedPromiseManager.removeCache('map-data');\r\n this.service.reset();\r\n this.stateService.unsubscribe(this.stateSubscription);\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\n selector: 'plant-status-map',\n template: `\r\n \r\n `,\n standalone: false\n})\r\nexport class PlantStatusMapComponent {\r\n\r\n}","import { Component } from '@angular/core';\r\n\r\n@Component({\n selector: 'system-status-map',\n template: `\r\n \r\n `,\n standalone: false\n})\r\nexport class SystemStatusMapComponent {\r\n\r\n}","import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { GeoModule } from '@geo';\r\n\r\n\r\nimport { ClxStatusMapComponent } from './clx-status-map.component';\r\nimport { CxFormsModule } from '@forms';\r\nimport { UiTabsModule } from '@ui-tabs';\r\nimport { PlantStatusMapComponent } from './plant-status-map.component';\r\nimport { SystemStatusMapComponent } from './system-status-map.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n GeoModule,\r\n CxFormsModule,\r\n UiTabsModule\r\n ],\r\n declarations: [\r\n ClxStatusMapComponent,\r\n PlantStatusMapComponent,\r\n SystemStatusMapComponent\r\n ],\r\n exports: [\r\n ClxStatusMapComponent,\r\n PlantStatusMapComponent,\r\n SystemStatusMapComponent\r\n ],\r\n providers : []\r\n})\r\nexport class MapModule {}\r\n\r\nexport {\r\n ClxStatusMapComponent,\r\n PlantStatusMapComponent,\r\n SystemStatusMapComponent\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\r\nimport { Config } from '@config';\r\nimport { lastValueFrom } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class InternalReleaseNotesService {\r\n\r\n constructor(private http: HttpClient, private config: Config) {}\r\n\r\n public get(): Promise {\r\n const options = {\r\n contentType: 'json',\r\n headers: new HttpHeaders({\r\n 'Content-Type': 'application/json'\r\n })\r\n };\r\n return lastValueFrom(this.http.get(this.config.services.internalReleaseNotes.all, options));\r\n }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { InternalReleaseNotesService } from './internal-release-notes.service';\r\nimport moment from 'moment';\r\n\r\ntype WorkItemMap = Record;\r\n\r\n@Component({\r\n templateUrl: './internal-release-notes.template.html',\r\n standalone: false\r\n})\r\nexport class InternalReleaseNotesComponent {\r\n\r\n public history: any = [];\r\n\r\n constructor(private internalReleaseNotesService: InternalReleaseNotesService) {}\r\n\r\n public async ngAfterViewInit() {\r\n const history = await this.internalReleaseNotesService.get();\r\n\r\n this.history = history.versions\r\n .map((version) => {\r\n const workItems = version.changesets.reduce((acc, curr) => {\r\n curr.workItems.map((workItem) => {\r\n let existingWorkItem = acc.find((current) => current.id === workItem.id);\r\n if(!existingWorkItem) {\r\n existingWorkItem = {\r\n id: workItem.id,\r\n label: workItem.label,\r\n url: workItem.url,\r\n changesets: []\r\n };\r\n acc.push(existingWorkItem);\r\n }\r\n\r\n existingWorkItem.changesets.push({\r\n uuid: curr.uuid,\r\n comment: curr.comment,\r\n url: curr.url,\r\n creationDate: new Date(curr.creationDate)\r\n });\r\n });\r\n return acc;\r\n }, []);\r\n\r\n return {\r\n // latestChangesetDate: new Date(\r\n // version.changesets.sort((a, b) => a.creationDate > b.creationDate ? -1 : 1)[0].creationDate\r\n // ),\r\n name: version.name,\r\n oldBaseline: version.oldBaseline,\r\n newBaseline: version.newBaseline,\r\n oldBaselineDate: moment(version.oldBaselineDate).format('DD.MM.YYYY'),\r\n newBaselineDate: moment(version.newBaselineDate).format('DD.MM.YYYY'),\r\n workItems\r\n };\r\n })\r\n .sort((a, b) => a.latestChangesetDate > b.latestChangesetDate ? -1 : 1);\r\n }\r\n}\r\n","
\r\n

Internal release notes

\r\n\r\n
\r\n

Version: {{ version.name }}

\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Old baseline{{ version.oldBaseline }} ({{ version.oldBaselineDate }})
New baseline{{ version.newBaseline }} ({{ version.newBaselineDate }})
\r\n\r\n

Changes

\r\n \r\n \r\n \r\n

\r\n {{workItem.id}} - {{workItem.label}}\r\n

\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { InternalReleaseNotesComponent } from './internal-release-notes.component';\r\nimport { InternalReleaseNotesService } from './internal-release-notes.service';\r\nimport { CxFormsModule } from '@forms';\r\nimport { UiFormatModule } from '@ui-format';\r\n\r\n@NgModule({\r\n imports : [\r\n CommonModule,\r\n CxFormsModule,\r\n UiFormatModule,\r\n ],\r\n declarations : [\r\n InternalReleaseNotesComponent\r\n ],\r\n providers: [\r\n InternalReleaseNotesService\r\n ],\r\n exports : [\r\n ]\r\n})\r\nexport class InternalReleaseNotesModule {\r\n\r\n}\r\n\r\nexport {\r\n InternalReleaseNotesComponent\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n\r\n@Component({\n selector: 'cookie-info',\n templateUrl: './cookie.info.template.html',\n standalone: false\n})\r\nexport class CookieInfoComponent {\r\n\r\n public popupVisible: true;\r\n\r\n public openCookieSettings(){\r\n const win = window as any;\r\n if(win.UC_UI){\r\n win.UC_UI.showSecondLayer();\r\n }else{\r\n console.info('UC_UI is not defiend')\r\n }\r\n }\r\n\r\n}","\r\n\r\n

Cookie Notice

\r\n

Status: November 2019

\r\n

This Cookie Policy applies to “ClimatixIC”.

\r\n

This website uses cookies. Cookies are small files containing certain information that are stored on your device. Cookies are served either by Siemens AG (“Siemens”) – so-called “first party cookies” – or by third parties providing services to Siemens; such cookies are referred to as “third party cookies”.

\r\n \r\n

Cookies are necessary to provide certain functionalities on a website, e.g. to maintain a language choice made by a user. Moreover, cookies enable the respective issuer (Siemens or a third party) to recognize that the website was previously called up by a certain end device, allowing the identification of returning visitors (or rather their end devices) and gathering information about their usage of the website and their presumed interests.

\r\n\r\n

\r\n \r\n This information is used to improve the website and to deliver relevant advertisement for Siemens products and services on the website as well as on third party sites.
\r\n Cookies can be assigned to four categories, depending on their function and intended purpose: strictly necessary cookies, performance cookies, functionality cookies, and marketing cookies.\r\n

\r\n
\r\n

Strictly Necessary Cookies

\r\n \r\n

These cookies are essential in order to enable you to move around the website and use its features, such as setting your privacy preferences, logging in or filling in forms. Without these cookies, services requested through usage of our website cannot be properly provided.

\r\n \r\n

Strictly necessary cookies do not require consent from the user under applicable law. You may configure your web browser to block strictly necessary cookies, but you might then not be able to use the website’s functionalities as intended.

\r\n \r\n

To the extent that information processed in connection with strictly necessary cookies should qualify as personal data in a given case, the legal ground for that processing is Siemens’ legitimate interest to operate the website.

\r\n
\r\n

Performance Cookies

\r\n \r\n

\r\n These cookies collect information about how visitors use a website, for instance which pages visitors go to most often, and how visitors move around the site. They help us to improve the user friendliness of a website and therefore enhance the user’s experience.\r\n Further information collected by performance cookies may include e.g.: internet browser and operating system used, the domain name of the website which you previously visited, the number of visits, average duration of visit, and pages called up.\r\n

\r\n \r\n

The information collected by these cookies is aggregated and can normally not be linked to a specific natural person. To the extent that information processed in connection with performance cookies should, in a given case, qualify as personal data, the legal ground for that processing is the user’s consent.

\r\n
\r\n

Functionality Cookies

\r\n \r\n

\r\n These cookies allow the website to remember choices you make or information you enter (such as your username, language or the region you are in) and provide enhanced, more personal features. They are also used to enable requested functions such as playing videos.\r\n To the extent that information processed in connection with functionality cookies should, in a given case, qualify as personal data, the legal ground for that processing is the user’s consent.\r\n

\r\n
\r\n

Marketing cookies

\r\n \r\n

Marketing cookies (also referred to as targeting or advertising cookies) are used to deliver adverts on third party websites more relevant to you and your interests. They are also used to limit the number of times you see an advertisement as well as help measure the effectiveness of an advertising campaign.

\r\n \r\n \r\n

Legal basis for the processing of personal data in connection with marketing cookies (if any) is the user’s consent.

\r\n\r\n
\r\n\r\n\r\n","\r\nimport { Component, Injectable } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { GlobalLoaderService } from '@loader';\r\nimport { States, StateService } from '@state';\r\n\r\n\r\n@Component({\n selector: 'cookie-info-outside',\n templateUrl: './cookie.info.outside.template.html',\n standalone: false\n})\r\nexport class CookieInfoOutsideComponent {\r\n constructor(private globalLoaderService: GlobalLoaderService, private stateService: StateService, private router: Router){}\r\n\r\n public popupVisible: true;\r\n\r\n public ngAfterViewInit(){\r\n this.stateService.values([States.currentOutlet, States.isLoggedIn]).subscribe((values) => {\r\n if(values.isLoggedIn){\r\n this.router.navigateByUrl('/CookieNotice')\r\n return true;\r\n }\r\n if(values.currentOutlet === 'internalreleasenotes'){\r\n this.globalLoaderService.hide();\r\n }\r\n }).falsy();\r\n }\r\n}","\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
","import { NgModule } from '@angular/core';\r\n\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { CookieInfoComponent } from './cookie.info.component';\r\nimport { UiPartsModule } from '@ui-parts';\r\nimport { NotificationModule } from '@notification';\r\nimport { CookieInfoOutsideComponent } from './cookie.info.outside.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n UiPartsModule,\r\n NotificationModule\r\n ],\r\n declarations: [\r\n CookieInfoOutsideComponent,\r\n CookieInfoComponent\r\n ],\r\n exports: [\r\n CookieInfoOutsideComponent,\r\n CookieInfoComponent\r\n ],\r\n providers: [\r\n\r\n ]\r\n})\r\nexport class CookieModule {\r\n}\r\n\r\nexport {\r\n CookieInfoOutsideComponent,\r\n CookieInfoComponent\r\n};\r\n","import { SystemAlarmListComponent } from '@alarm';\r\nimport { SystemDashboardComponent, SystemDashboardDropdownService, SystemDashboardNaviExtension } from '@dashboards';\r\nimport { SystemsWebPictureNaviExtensionService } from '@datapoints';\r\nimport { SystemFileDetails, SystemFileListComponent } from '@files';\r\nimport { __asyncI18n } from '@localisation';\r\nimport { SubnaviDropDownService } from '@navigation';\r\nimport { CanActivateWithCurrentTenant, SystemPlantListComponent } from '@plants';\r\nimport { RoutePrivilegeNames } from '@route-privilege-names';\r\nimport { DummySiteComponent } from '@site-info';\r\nimport { SystemAlarmIconComponent, SystemManageUsersAccessService, SystemNotificationsAccessService, SystemOperatingNaviExtension, SystemSettingsAccessService } from '@systems';\r\n\r\nexport const SystemOperatingRoutes = [{\r\n path: ':systemid',\r\n data: {\r\n title: ':systemid | systemIdToName',\r\n dontShowInSubNavigation: true,\r\n dontShowFavourites: true,\r\n breadCrumbDropDown: SubnaviDropDownService,\r\n favouritesRouteTitle: '[SiteName]',\r\n //lastSubNaviLevel : true,\r\n redirectTo: [\r\n 'Operating/Systems/:systemid/SystemDashboard/*firstChild',\r\n 'Operating/Systems/:systemid/Plants',\r\n 'Operating/Systems/:systemid/WebPicture',\r\n 'Operating/Systems/:systemid/Files'\r\n ]\r\n },\r\n children: [\r\n {\r\n path: '',\r\n canActivate: [CanActivateWithCurrentTenant],\r\n component: DummySiteComponent,\r\n data: {\r\n title: ':systemid | systemIdToName',\r\n dontShowInSubNavigation: true,\r\n dontShowFavourites: true,\r\n favouritesRouteCaption: '[SiteName]',\r\n redirectTo: [\r\n 'Operating/Systems/:systemid/SystemDashboard/*firstChild',\r\n 'Operating/Systems/:systemid/Plants',\r\n 'Operating/Systems/:systemid/WebPicture',\r\n 'Operating/Systems/:systemid/Files'\r\n ]\r\n }\r\n },\r\n {\r\n path: 'SystemDashboard',\r\n data: {\r\n title: __asyncI18n('System dashboard', 'subnavi.operating.systemdashboard'),\r\n hideWithoutChildren: true,\r\n dynamicChildren: SystemDashboardNaviExtension,\r\n showChildrenAsSecondLevel: true,\r\n breadCrumbDropDown: SystemDashboardDropdownService,\r\n redirectTo: 'Operating/Systems/:systemid/SystemDashboard/*firstChild',\r\n testId: 'sidenavigation.link.systemdashboard',\r\n privileges: [RoutePrivilegeNames.SystemDashboard]\r\n },\r\n children: [\r\n {\r\n path: ':dashboardid',\r\n data: {\r\n title: ':dashboardid | systemDashboardIdToName',\r\n redirectTo: 'Operating',\r\n dontShowInSubNavigation: true,\r\n hideWithoutChildren: true,\r\n favouritesCaption: '[SystemDashboardName]'\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: SystemDashboardComponent,\r\n data: {\r\n title: ':dashboardid | systemDashboardIdToName',\r\n dontShowInSubNavigation: true,\r\n hideWithoutChildren: true,\r\n favouritesCaption: '[SystemDashboardName]'\r\n }\r\n },\r\n {\r\n path: 'Trend',\r\n data: {\r\n title: __asyncI18n('Trend', 'subnavi.operating.systemdashboard.trend'),\r\n dontShowInSubNavigation: true,\r\n showSubNaviLevel: 3,\r\n dontShowInBreadCrumb: true\r\n },\r\n children: [\r\n {\r\n path: ':tileid',\r\n loadChildren: () => import('../modules/viewnodes-module/index').then(m => m.ViewNodesModule),\r\n data: {\r\n title: ':tileid',\r\n dontShowInSubNavigation: true,\r\n lazyRedirectTo: 'Operating/Plants/:systemid/SystemDashboard/:dashboardid/Trend/:tileid/SystemView',\r\n showSubNaviLevel: 4\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'Plants',\r\n component: SystemPlantListComponent,\r\n data: {\r\n title: __asyncI18n('Plants', 'subnavi.operating.systems.plants'),\r\n testId: 'sidenavigation.link.systemplants',\r\n privileges: [],\r\n dontShowFavourites: true,\r\n favouritesType: 'sites',\r\n favouritesTitle: '[PageName]',\r\n }\r\n },\r\n {\r\n path: 'Alarms',\r\n component: SystemAlarmListComponent,\r\n data: {\r\n title: __asyncI18n('Alarms', 'subnavi.operating.systemalarms'),\r\n statusService: {\r\n component: SystemAlarmIconComponent,\r\n parameter: {\r\n systemId: ':systemid'\r\n }\r\n },\r\n testId: 'sidenavigation.link.systemalarms',\r\n privileges: [\r\n RoutePrivilegeNames.SystemAlarm\r\n ]\r\n }\r\n },\r\n {\r\n path: 'WebPicture',\r\n data: {\r\n title: __asyncI18n('Web graphic', 'subnavi.operating.systems.webpicture'),\r\n hideWithoutChildren: true,\r\n dynamicChildren: SystemsWebPictureNaviExtensionService,\r\n showChildrenAsSecondLevel: true,\r\n redirectTo: 'Operating/Systems/:systemid/WebPicture/*firstChild',\r\n testId: 'sidenavigation.link.webpicture',\r\n privileges: [\r\n RoutePrivilegeNames.SystemGraphic\r\n ]\r\n\r\n },\r\n children: [\r\n {\r\n path: ':webpictureid',\r\n data: {\r\n title: ':webpictureid',\r\n redirectTo: 'Operating/Systems/:systemid/WebPicture/:webpictureid/SystemView',\r\n lazyRedirectTo: 'Operating/Systems/:systemid/WebPicture/:webpictureid/SystemView',\r\n dontShowInSubNavigation: true,\r\n dontShowInBreadCrumb: true,\r\n hideWithoutChildren: true,\r\n },\r\n children: [\r\n {\r\n path: 'SystemView',\r\n component: DummySiteComponent,\r\n data: {\r\n title: 'SystemView',\r\n redirectTo: 'Operating/Systems/:systemid/WebPicture/*firstChild',\r\n dontShowInSubNavigation: true,\r\n dontShowInBreadCrumb: true,\r\n showSubNaviLevel : 4,\r\n favouritesType: 'webpicture'\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'Files',\r\n data: {\r\n title: __asyncI18n('Files', 'subnavi.operating.systems.files'),\r\n testId: 'sidenavigation.link.systemfiles',\r\n privileges: [\r\n RoutePrivilegeNames.SystemFileAccess,\r\n RoutePrivilegeNames.SystemFileManage\r\n ]\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: SystemFileListComponent,\r\n data: {\r\n title: __asyncI18n('Files', 'subnavi.operating.systems.files'),\r\n showSubNaviLevel: 3\r\n }\r\n },\r\n {\r\n path: 'Add',\r\n data: {\r\n title: __asyncI18n('Add file', 'subnavi.operating.systems.file.add'),\r\n showSubNaviLevel: 3,\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: SystemFileDetails,\r\n data: {\r\n title: __asyncI18n('Add file', 'subnavi.operating.systems.file.add'),\r\n showSubNaviLevel: 3\r\n }\r\n },\r\n {\r\n path: ':type',\r\n component: SystemFileDetails,\r\n data: {\r\n title: __asyncI18n('Add Parameter file', 'subnavi.operating.systems.file.add.parameter'),\r\n showSubNaviLevel: 3,\r\n dontShowInBreadCrumb: true\r\n\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n path: ':fileid',\r\n data: {\r\n title: ':fileid | systemFileIdToName',\r\n dontShowInSubNavigation: true,\r\n showSubNaviLevel: 3,\r\n favouritesCaption: '[ParentPageName] / [PageName]',\r\n },\r\n children: [\r\n {\r\n path: '',\r\n component: SystemFileDetails,\r\n data: {\r\n title: ':fileid | systemFileIdToName',\r\n dontShowInSubNavigation: true,\r\n showSubNaviLevel: 3,\r\n favouritesCaption: '[ParentPageName] / [PageName]'\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n path: 'SystemSettings',\r\n component: DummySiteComponent,\r\n canActivate: [\r\n SystemSettingsAccessService\r\n ],\r\n data: {\r\n redirectTo: '/Administration/Systems/:systemid/Settings',\r\n title: __asyncI18n('System settings', 'subnavi.administration.system.settings'),\r\n testId: 'sidenavigation.link.systemsettings',\r\n dynamicSiblings: SystemOperatingNaviExtension\r\n }\r\n },\r\n {\r\n path: 'SystemUsers',\r\n component: DummySiteComponent,\r\n canActivate: [\r\n SystemManageUsersAccessService\r\n ],\r\n data: {\r\n redirectTo: '/Administration/Systems/:systemid/Users',\r\n title: __asyncI18n('System users', 'subnavi.administration.system.system.users'),\r\n testId: 'sidenavigation.link.systemusers',\r\n dynamicSiblings: SystemOperatingNaviExtension\r\n }\r\n },\r\n {\r\n path: 'SystemNotifications',\r\n component: DummySiteComponent,\r\n canActivate: [ SystemNotificationsAccessService ],\r\n data: {\r\n redirectTo: 'Administration/Systems/:systemid/SystemNotifications',\r\n title: __asyncI18n('System notifications', 'subnavi.administration.system.systemnotifications'),\r\n testId: 'sidenavigation.link.systemnotifications'\r\n }\r\n }\r\n ]\r\n}]","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, Input, inject } from \"@angular/core\";\r\nimport { DomSanitizer, SafeHtml } from \"@angular/platform-browser\";\r\nimport { LoaderService } from \"@loader\";\r\nimport { lastValueFrom } from \"rxjs\";\r\n\r\nexport enum ApiContentTypes {\r\n markdown = 'markdown',\r\n html = 'html'\r\n}\r\n\r\n@Component({\n selector: 'api-content-base',\n template: '',\n standalone: false\n})\r\nexport abstract class ApiContentComponentBase {\r\n\r\n #loader: LoaderService = inject(LoaderService);\r\n\r\n #http: HttpClient = inject(HttpClient);\r\n\r\n #sanitizer: DomSanitizer = inject(DomSanitizer);\r\n\r\n #loaderId: number;\r\n\r\n isLoading: boolean = true;\r\n\r\n fragment: SafeHtml = null;\r\n\r\n abstract readonly fileUrl: string;\r\n\r\n @Input()\r\n type: ApiContentTypes = ApiContentTypes.html;\r\n\r\n public async ngAfterViewInit(){\r\n this.#loaderId = this.#loader.start();\r\n\r\n try {\r\n const data = await lastValueFrom(this.#http.get(this.fileUrl, { responseType: 'text'}));\r\n if(this.type === ApiContentTypes.html) {\r\n this.fragment = this.#sanitizer.bypassSecurityTrustHtml(data);\r\n }else {\r\n this.fragment = data;\r\n }\r\n \r\n } catch (e) {\r\n // ignored\r\n } finally {\r\n this.#loader.stop(this.#loaderId);\r\n this.isLoading = false;\r\n }\r\n }\r\n}","import { Component } from \"@angular/core\";\r\nimport { ApiContentComponentBase, ApiContentTypes } from \"./api-content-base.component\";\r\n\r\n@Component({\n selector: 'api-comming-soon',\n templateUrl: './api-coming-soon.template.html',\n standalone: false\n})\r\nexport class ApiComingSoonComponent extends ApiContentComponentBase {\r\n fileUrl = 'Content/ApiDocumentation/coming-soon.md';\r\n\r\n type = ApiContentTypes.markdown;\r\n}","\r\n
This page is currently not available! Please try again later.
\r\n","import { Component } from '@angular/core';\r\nimport { ApiContentComponentBase } from './api-content-base.component';\r\n\r\n@Component({\n selector: 'api-documentation',\n templateUrl: './api-documentation.template.html',\n standalone: false\n})\r\nexport class ApiDocumentationComponent extends ApiContentComponentBase {\r\n fileUrl = 'Content/ApiDocumentation/documentation.html';\r\n}","
\r\n
This page is currently not available! Please try again later.
\r\n","import { Component } from '@angular/core';\r\nimport { ApiContentComponentBase, ApiContentTypes } from './api-content-base.component';\r\n\r\n@Component({\n selector: 'api-faq',\n templateUrl: './api-faq.template.html',\n standalone: false\n})\r\nexport class ApiFaqComponent extends ApiContentComponentBase {\r\n fileUrl = 'Content/ApiDocumentation/faq.md';\r\n\r\n type = ApiContentTypes.markdown;\r\n}","\r\nThis page is currently not available! Please try again later.\r\n","/*! For license information please see swagger-ui-es-bundle-core.js.LICENSE.txt */\nimport * as e from \"ieee754\";\nimport * as t from \"base64-js\";\nimport * as r from \"react\";\nimport * as n from \"redux\";\nimport * as a from \"immutable\";\nimport * as o from \"redux-immutable\";\nimport * as s from \"serialize-error\";\nimport * as l from \"lodash/merge\";\nimport * as i from \"@braintree/sanitize-url\";\nimport * as c from \"lodash/camelCase\";\nimport * as u from \"lodash/upperFirst\";\nimport * as d from \"lodash/memoize\";\nimport * as p from \"lodash/find\";\nimport * as m from \"lodash/some\";\nimport * as f from \"lodash/eq\";\nimport * as h from \"lodash/isFunction\";\nimport * as g from \"css.escape\";\nimport * as y from \"url-parse\";\nimport * as S from \"reselect\";\nimport * as _ from \"prop-types\";\nimport * as v from \"lodash/omit\";\nimport * as b from \"js-yaml\";\nimport * as w from \"zenscroll\";\nimport * as C from \"react-immutable-proptypes\";\nimport * as x from \"lodash/reduce\";\nimport * as O from \"lodash/get\";\nimport * as k from \"@babel/runtime-corejs3/helpers/extends\";\nimport * as N from \"classnames\";\nimport * as A from \"react-copy-to-clipboard\";\nimport * as I from \"react-immutable-pure-component\";\nimport * as R from \"react-debounce-input\";\nimport * as T from \"randexp\";\nimport * as B from \"lodash/isEmpty\";\nimport * as j from \"lodash/constant\";\nimport * as P from \"lodash/isString\";\nimport * as M from \"lodash/debounce\";\nimport * as q from \"lodash/set\";\nimport * as L from \"lodash/fp/assocPath\";\nimport * as D from \"swagger-client/es/resolver/strategies/generic\";\nimport * as U from \"swagger-client/es/resolver/strategies/openapi-2\";\nimport * as $ from \"swagger-client/es/resolver/strategies/openapi-3-0\";\nimport * as J from \"swagger-client/es/resolver/strategies/openapi-3-1-apidom\";\nimport * as V from \"swagger-client/es/resolver\";\nimport * as K from \"swagger-client/es/execute\";\nimport * as z from \"swagger-client/es/http\";\nimport * as F from \"swagger-client/es/subtree-resolver\";\nimport * as W from \"swagger-client/es/helpers\";\nimport * as H from \"react-dom\";\nimport * as G from \"react-redux\";\nimport * as X from \"lodash/identity\";\nimport * as Y from \"react-syntax-highlighter/dist/esm/light\";\nimport * as Q from \"react-syntax-highlighter/dist/esm/languages/hljs/javascript\";\nimport * as Z from \"react-syntax-highlighter/dist/esm/languages/hljs/json\";\nimport * as ee from \"react-syntax-highlighter/dist/esm/languages/hljs/xml\";\nimport * as te from \"react-syntax-highlighter/dist/esm/languages/hljs/bash\";\nimport * as re from \"react-syntax-highlighter/dist/esm/languages/hljs/yaml\";\nimport * as ne from \"react-syntax-highlighter/dist/esm/languages/hljs/http\";\nimport * as ae from \"react-syntax-highlighter/dist/esm/languages/hljs/powershell\";\nimport * as oe from \"react-syntax-highlighter/dist/esm/styles/hljs/agate\";\nimport * as se from \"react-syntax-highlighter/dist/esm/styles/hljs/arta\";\nimport * as le from \"react-syntax-highlighter/dist/esm/styles/hljs/monokai\";\nimport * as ie from \"react-syntax-highlighter/dist/esm/styles/hljs/nord\";\nimport * as ce from \"react-syntax-highlighter/dist/esm/styles/hljs/obsidian\";\nimport * as ue from \"react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night\";\nimport * as de from \"react-syntax-highlighter/dist/esm/styles/hljs/idea\";\nimport * as pe from \"js-file-download\";\nimport * as me from \"lodash/zipObject\";\nimport * as fe from \"lodash/toString\";\nimport * as he from \"xml-but-prettier\";\nimport * as ge from \"lodash/toLower\";\nimport * as ye from \"remarkable\";\nimport * as Ee from \"remarkable/linkify\";\nimport * as Se from \"dompurify\";\nimport * as _e from \"lodash/escapeRegExp\";\nimport * as ve from \"lodash/isPlainObject\";\nimport * as be from \"lodash/has\";\nimport * as we from \"lodash/fp/set\";\nvar Ce = {\n 7: function (e) {\n var t,\n r = \"object\" == typeof Reflect ? Reflect : null,\n n = r && \"function\" == typeof r.apply ? r.apply : function ReflectApply(e, t, r) {\n return Function.prototype.apply.call(e, t, r);\n };\n t = r && \"function\" == typeof r.ownKeys ? r.ownKeys : Object.getOwnPropertySymbols ? function ReflectOwnKeys(e) {\n return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));\n } : function ReflectOwnKeys(e) {\n return Object.getOwnPropertyNames(e);\n };\n var a = Number.isNaN || function NumberIsNaN(e) {\n return e != e;\n };\n function EventEmitter() {\n EventEmitter.init.call(this);\n }\n e.exports = EventEmitter, e.exports.once = function once(e, t) {\n return new Promise(function (r, n) {\n function errorListener(r) {\n e.removeListener(t, resolver), n(r);\n }\n function resolver() {\n \"function\" == typeof e.removeListener && e.removeListener(\"error\", errorListener), r([].slice.call(arguments));\n }\n eventTargetAgnosticAddListener(e, t, resolver, {\n once: !0\n }), \"error\" !== t && function addErrorHandlerIfEventEmitter(e, t, r) {\n \"function\" == typeof e.on && eventTargetAgnosticAddListener(e, \"error\", t, r);\n }(e, errorListener, {\n once: !0\n });\n });\n }, EventEmitter.EventEmitter = EventEmitter, EventEmitter.prototype._events = void 0, EventEmitter.prototype._eventsCount = 0, EventEmitter.prototype._maxListeners = void 0;\n var o = 10;\n function checkListener(e) {\n if (\"function\" != typeof e) throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof e);\n }\n function _getMaxListeners(e) {\n return void 0 === e._maxListeners ? EventEmitter.defaultMaxListeners : e._maxListeners;\n }\n function _addListener(e, t, r, n) {\n var a, o, s;\n if (checkListener(r), void 0 === (o = e._events) ? (o = e._events = Object.create(null), e._eventsCount = 0) : (void 0 !== o.newListener && (e.emit(\"newListener\", t, r.listener ? r.listener : r), o = e._events), s = o[t]), void 0 === s) s = o[t] = r, ++e._eventsCount;else if (\"function\" == typeof s ? s = o[t] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), (a = _getMaxListeners(e)) > 0 && s.length > a && !s.warned) {\n s.warned = !0;\n var l = new Error(\"Possible EventEmitter memory leak detected. \" + s.length + \" \" + String(t) + \" listeners added. Use emitter.setMaxListeners() to increase limit\");\n l.name = \"MaxListenersExceededWarning\", l.emitter = e, l.type = t, l.count = s.length, function ProcessEmitWarning(e) {\n console && console.warn && console.warn(e);\n }(l);\n }\n return e;\n }\n function onceWrapper() {\n if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);\n }\n function _onceWrap(e, t, r) {\n var n = {\n fired: !1,\n wrapFn: void 0,\n target: e,\n type: t,\n listener: r\n },\n a = onceWrapper.bind(n);\n return a.listener = r, n.wrapFn = a, a;\n }\n function _listeners(e, t, r) {\n var n = e._events;\n if (void 0 === n) return [];\n var a = n[t];\n return void 0 === a ? [] : \"function\" == typeof a ? r ? [a.listener || a] : [a] : r ? function unwrapListeners(e) {\n for (var t = new Array(e.length), r = 0; r < t.length; ++r) t[r] = e[r].listener || e[r];\n return t;\n }(a) : arrayClone(a, a.length);\n }\n function listenerCount(e) {\n var t = this._events;\n if (void 0 !== t) {\n var r = t[e];\n if (\"function\" == typeof r) return 1;\n if (void 0 !== r) return r.length;\n }\n return 0;\n }\n function arrayClone(e, t) {\n for (var r = new Array(t), n = 0; n < t; ++n) r[n] = e[n];\n return r;\n }\n function eventTargetAgnosticAddListener(e, t, r, n) {\n if (\"function\" == typeof e.on) n.once ? e.once(t, r) : e.on(t, r);else {\n if (\"function\" != typeof e.addEventListener) throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof e);\n e.addEventListener(t, function wrapListener(a) {\n n.once && e.removeEventListener(t, wrapListener), r(a);\n });\n }\n }\n Object.defineProperty(EventEmitter, \"defaultMaxListeners\", {\n enumerable: !0,\n get: function () {\n return o;\n },\n set: function (e) {\n if (\"number\" != typeof e || e < 0 || a(e)) throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + e + \".\");\n o = e;\n }\n }), EventEmitter.init = function () {\n void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;\n }, EventEmitter.prototype.setMaxListeners = function setMaxListeners(e) {\n if (\"number\" != typeof e || e < 0 || a(e)) throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + e + \".\");\n return this._maxListeners = e, this;\n }, EventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n }, EventEmitter.prototype.emit = function emit(e) {\n for (var t = [], r = 1; r < arguments.length; r++) t.push(arguments[r]);\n var a = \"error\" === e,\n o = this._events;\n if (void 0 !== o) a = a && void 0 === o.error;else if (!a) return !1;\n if (a) {\n var s;\n if (t.length > 0 && (s = t[0]), s instanceof Error) throw s;\n var l = new Error(\"Unhandled error.\" + (s ? \" (\" + s.message + \")\" : \"\"));\n throw l.context = s, l;\n }\n var i = o[e];\n if (void 0 === i) return !1;\n if (\"function\" == typeof i) n(i, this, t);else {\n var c = i.length,\n u = arrayClone(i, c);\n for (r = 0; r < c; ++r) n(u[r], this, t);\n }\n return !0;\n }, EventEmitter.prototype.addListener = function addListener(e, t) {\n return _addListener(this, e, t, !1);\n }, EventEmitter.prototype.on = EventEmitter.prototype.addListener, EventEmitter.prototype.prependListener = function prependListener(e, t) {\n return _addListener(this, e, t, !0);\n }, EventEmitter.prototype.once = function once(e, t) {\n return checkListener(t), this.on(e, _onceWrap(this, e, t)), this;\n }, EventEmitter.prototype.prependOnceListener = function prependOnceListener(e, t) {\n return checkListener(t), this.prependListener(e, _onceWrap(this, e, t)), this;\n }, EventEmitter.prototype.removeListener = function removeListener(e, t) {\n var r, n, a, o, s;\n if (checkListener(t), void 0 === (n = this._events)) return this;\n if (void 0 === (r = n[e])) return this;\n if (r === t || r.listener === t) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete n[e], n.removeListener && this.emit(\"removeListener\", e, r.listener || t));else if (\"function\" != typeof r) {\n for (a = -1, o = r.length - 1; o >= 0; o--) if (r[o] === t || r[o].listener === t) {\n s = r[o].listener, a = o;\n break;\n }\n if (a < 0) return this;\n 0 === a ? r.shift() : function spliceOne(e, t) {\n for (; t + 1 < e.length; t++) e[t] = e[t + 1];\n e.pop();\n }(r, a), 1 === r.length && (n[e] = r[0]), void 0 !== n.removeListener && this.emit(\"removeListener\", e, s || t);\n }\n return this;\n }, EventEmitter.prototype.off = EventEmitter.prototype.removeListener, EventEmitter.prototype.removeAllListeners = function removeAllListeners(e) {\n var t, r, n;\n if (void 0 === (r = this._events)) return this;\n if (void 0 === r.removeListener) return 0 === arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== r[e] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete r[e]), this;\n if (0 === arguments.length) {\n var a,\n o = Object.keys(r);\n for (n = 0; n < o.length; ++n) \"removeListener\" !== (a = o[n]) && this.removeAllListeners(a);\n return this.removeAllListeners(\"removeListener\"), this._events = Object.create(null), this._eventsCount = 0, this;\n }\n if (\"function\" == typeof (t = r[e])) this.removeListener(e, t);else if (void 0 !== t) for (n = t.length - 1; n >= 0; n--) this.removeListener(e, t[n]);\n return this;\n }, EventEmitter.prototype.listeners = function listeners(e) {\n return _listeners(this, e, !0);\n }, EventEmitter.prototype.rawListeners = function rawListeners(e) {\n return _listeners(this, e, !1);\n }, EventEmitter.listenerCount = function (e, t) {\n return \"function\" == typeof e.listenerCount ? e.listenerCount(t) : listenerCount.call(e, t);\n }, EventEmitter.prototype.listenerCount = listenerCount, EventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? t(this._events) : [];\n };\n },\n 48: function (e) {\n var t = {};\n function createErrorType(e, r, n) {\n n || (n = Error);\n var a = function (e) {\n function NodeError(t, n, a) {\n return e.call(this, function getMessage(e, t, n) {\n return \"string\" == typeof r ? r : r(e, t, n);\n }(t, n, a)) || this;\n }\n return function _inheritsLoose(e, t) {\n e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;\n }(NodeError, e), NodeError;\n }(n);\n a.prototype.name = n.name, a.prototype.code = e, t[e] = a;\n }\n function oneOf(e, t) {\n if (Array.isArray(e)) {\n var r = e.length;\n return e = e.map(function (e) {\n return String(e);\n }), r > 2 ? \"one of \".concat(t, \" \").concat(e.slice(0, r - 1).join(\", \"), \", or \") + e[r - 1] : 2 === r ? \"one of \".concat(t, \" \").concat(e[0], \" or \").concat(e[1]) : \"of \".concat(t, \" \").concat(e[0]);\n }\n return \"of \".concat(t, \" \").concat(String(e));\n }\n createErrorType(\"ERR_INVALID_OPT_VALUE\", function (e, t) {\n return 'The value \"' + t + '\" is invalid for option \"' + e + '\"';\n }, TypeError), createErrorType(\"ERR_INVALID_ARG_TYPE\", function (e, t, r) {\n var n, a;\n if (\"string\" == typeof t && function startsWith(e, t, r) {\n return e.substr(!r || r < 0 ? 0 : +r, t.length) === t;\n }(t, \"not \") ? (n = \"must not be\", t = t.replace(/^not /, \"\")) : n = \"must be\", function endsWith(e, t, r) {\n return (void 0 === r || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;\n }(e, \" argument\")) a = \"The \".concat(e, \" \").concat(n, \" \").concat(oneOf(t, \"type\"));else {\n var o = function includes(e, t, r) {\n return \"number\" != typeof r && (r = 0), !(r + t.length > e.length) && -1 !== e.indexOf(t, r);\n }(e, \".\") ? \"property\" : \"argument\";\n a = 'The \"'.concat(e, '\" ').concat(o, \" \").concat(n, \" \").concat(oneOf(t, \"type\"));\n }\n return a += \". Received type \".concat(typeof r);\n }, TypeError), createErrorType(\"ERR_STREAM_PUSH_AFTER_EOF\", \"stream.push() after EOF\"), createErrorType(\"ERR_METHOD_NOT_IMPLEMENTED\", function (e) {\n return \"The \" + e + \" method is not implemented\";\n }), createErrorType(\"ERR_STREAM_PREMATURE_CLOSE\", \"Premature close\"), createErrorType(\"ERR_STREAM_DESTROYED\", function (e) {\n return \"Cannot call \" + e + \" after a stream was destroyed\";\n }), createErrorType(\"ERR_MULTIPLE_CALLBACK\", \"Callback called multiple times\"), createErrorType(\"ERR_STREAM_CANNOT_PIPE\", \"Cannot pipe, not readable\"), createErrorType(\"ERR_STREAM_WRITE_AFTER_END\", \"write after end\"), createErrorType(\"ERR_STREAM_NULL_VALUES\", \"May not write null values to stream\", TypeError), createErrorType(\"ERR_UNKNOWN_ENCODING\", function (e) {\n return \"Unknown encoding: \" + e;\n }, TypeError), createErrorType(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\", \"stream.unshift() after end event\"), e.exports.F = t;\n },\n 107: function (e, t, r) {\n var n = r(698),\n a = r(392),\n o = r(861).Buffer,\n s = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298],\n l = new Array(64);\n function Sha256() {\n this.init(), this._w = l, a.call(this, 64, 56);\n }\n function ch(e, t, r) {\n return r ^ e & (t ^ r);\n }\n function maj(e, t, r) {\n return e & t | r & (e | t);\n }\n function sigma0(e) {\n return (e >>> 2 | e << 30) ^ (e >>> 13 | e << 19) ^ (e >>> 22 | e << 10);\n }\n function sigma1(e) {\n return (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);\n }\n function gamma0(e) {\n return (e >>> 7 | e << 25) ^ (e >>> 18 | e << 14) ^ e >>> 3;\n }\n function gamma1(e) {\n return (e >>> 17 | e << 15) ^ (e >>> 19 | e << 13) ^ e >>> 10;\n }\n n(Sha256, a), Sha256.prototype.init = function () {\n return this._a = 1779033703, this._b = 3144134277, this._c = 1013904242, this._d = 2773480762, this._e = 1359893119, this._f = 2600822924, this._g = 528734635, this._h = 1541459225, this;\n }, Sha256.prototype._update = function (e) {\n for (var t = this._w, r = 0 | this._a, n = 0 | this._b, a = 0 | this._c, o = 0 | this._d, l = 0 | this._e, i = 0 | this._f, c = 0 | this._g, u = 0 | this._h, d = 0; d < 16; ++d) t[d] = e.readInt32BE(4 * d);\n for (; d < 64; ++d) t[d] = gamma1(t[d - 2]) + t[d - 7] + gamma0(t[d - 15]) + t[d - 16] | 0;\n for (var p = 0; p < 64; ++p) {\n var m = u + sigma1(l) + ch(l, i, c) + s[p] + t[p] | 0,\n f = sigma0(r) + maj(r, n, a) | 0;\n u = c, c = i, i = l, l = o + m | 0, o = a, a = n, n = r, r = m + f | 0;\n }\n this._a = r + this._a | 0, this._b = n + this._b | 0, this._c = a + this._c | 0, this._d = o + this._d | 0, this._e = l + this._e | 0, this._f = i + this._f | 0, this._g = c + this._g | 0, this._h = u + this._h | 0;\n }, Sha256.prototype._hash = function () {\n var e = o.allocUnsafe(32);\n return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e.writeInt32BE(this._h, 28), e;\n }, e.exports = Sha256;\n },\n 123: function (e, t, r) {\n var n = r(606),\n a = r(499),\n o = r(310).Stream;\n function resolve(e, t, r) {\n var n,\n o = function create_indent(e, t) {\n return new Array(t || 0).join(e || \"\");\n }(t, r = r || 0),\n s = e;\n if (\"object\" == typeof e && (s = e[n = Object.keys(e)[0]]) && s._elem) return s._elem.name = n, s._elem.icount = r, s._elem.indent = t, s._elem.indents = o, s._elem.interrupt = s, s._elem;\n var l,\n i = [],\n c = [];\n function get_attributes(e) {\n Object.keys(e).forEach(function (t) {\n i.push(function attribute(e, t) {\n return e + '=\"' + a(t) + '\"';\n }(t, e[t]));\n });\n }\n switch (typeof s) {\n case \"object\":\n if (null === s) break;\n s._attr && get_attributes(s._attr), s._cdata && c.push((\"/g, \"]]]]>\") + \"]]>\"), s.forEach && (l = !1, c.push(\"\"), s.forEach(function (e) {\n \"object\" == typeof e ? \"_attr\" == Object.keys(e)[0] ? get_attributes(e._attr) : c.push(resolve(e, t, r + 1)) : (c.pop(), l = !0, c.push(a(e)));\n }), l || c.push(\"\"));\n break;\n default:\n c.push(a(s));\n }\n return {\n name: n,\n interrupt: !1,\n attributes: i,\n content: c,\n icount: r,\n indents: o,\n indent: t\n };\n }\n function format(e, t, r) {\n if (\"object\" != typeof t) return e(!1, t);\n var n = t.interrupt ? 1 : t.content.length;\n function proceed() {\n for (; t.content.length;) {\n var a = t.content.shift();\n if (void 0 !== a) {\n if (interrupt(a)) return;\n format(e, a);\n }\n }\n e(!1, (n > 1 ? t.indents : \"\") + (t.name ? \"\" : \"\") + (t.indent && !r ? \"\\n\" : \"\")), r && r();\n }\n function interrupt(t) {\n return !!t.interrupt && (t.interrupt.append = e, t.interrupt.end = proceed, t.interrupt = !1, e(!0), !0);\n }\n if (e(!1, t.indents + (t.name ? \"<\" + t.name : \"\") + (t.attributes.length ? \" \" + t.attributes.join(\" \") : \"\") + (n ? t.name ? \">\" : \"\" : t.name ? \"/>\" : \"\") + (t.indent && n > 1 ? \"\\n\" : \"\")), !n) return e(!1, t.indent ? \"\\n\" : \"\");\n interrupt(t) || proceed();\n }\n e.exports = function xml(e, t) {\n \"object\" != typeof t && (t = {\n indent: t\n });\n var r = t.stream ? new o() : null,\n a = \"\",\n s = !1,\n l = t.indent ? !0 === t.indent ? \" \" : t.indent : \"\",\n i = !0;\n function delay(e) {\n i ? n.nextTick(e) : e();\n }\n function append(e, t) {\n if (void 0 !== t && (a += t), e && !s && (r = r || new o(), s = !0), e && s) {\n var n = a;\n delay(function () {\n r.emit(\"data\", n);\n }), a = \"\";\n }\n }\n function add(e, t) {\n format(append, resolve(e, l, l ? 1 : 0), t);\n }\n function end() {\n if (r) {\n var e = a;\n delay(function () {\n r.emit(\"data\", e), r.emit(\"end\"), r.readable = !1, r.emit(\"close\");\n });\n }\n }\n return delay(function () {\n i = !1;\n }), t.declaration && function addXmlDeclaration(e) {\n var t = {\n version: \"1.0\",\n encoding: e.encoding || \"UTF-8\"\n };\n e.standalone && (t.standalone = e.standalone), add({\n \"?xml\": {\n _attr: t\n }\n }), a = a.replace(\"/>\", \"?>\");\n }(t.declaration), e && e.forEach ? e.forEach(function (t, r) {\n var n;\n r + 1 === e.length && (n = end), add(t, n);\n }) : add(e, end), r ? (r.readable = !0, r) : a;\n }, e.exports.element = e.exports.Element = function element() {\n var e = {\n _elem: resolve(Array.prototype.slice.call(arguments)),\n push: function (e) {\n if (!this.append) throw new Error(\"not assigned to a parent!\");\n var t = this,\n r = this._elem.indent;\n format(this.append, resolve(e, r, this._elem.icount + (r ? 1 : 0)), function () {\n t.append(!0);\n });\n },\n close: function (e) {\n void 0 !== e && this.push(e), this.end && this.end();\n }\n };\n return e;\n };\n },\n 141: function (e, t, r) {\n var n = r(861).Buffer,\n a = n.isEncoding || function (e) {\n switch ((e = \"\" + e) && e.toLowerCase()) {\n case \"hex\":\n case \"utf8\":\n case \"utf-8\":\n case \"ascii\":\n case \"binary\":\n case \"base64\":\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n case \"raw\":\n return !0;\n default:\n return !1;\n }\n };\n function StringDecoder(e) {\n var t;\n switch (this.encoding = function normalizeEncoding(e) {\n var t = function _normalizeEncoding(e) {\n if (!e) return \"utf8\";\n for (var t;;) switch (e) {\n case \"utf8\":\n case \"utf-8\":\n return \"utf8\";\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return \"utf16le\";\n case \"latin1\":\n case \"binary\":\n return \"latin1\";\n case \"base64\":\n case \"ascii\":\n case \"hex\":\n return e;\n default:\n if (t) return;\n e = (\"\" + e).toLowerCase(), t = !0;\n }\n }(e);\n if (\"string\" != typeof t && (n.isEncoding === a || !a(e))) throw new Error(\"Unknown encoding: \" + e);\n return t || e;\n }(e), this.encoding) {\n case \"utf16le\":\n this.text = utf16Text, this.end = utf16End, t = 4;\n break;\n case \"utf8\":\n this.fillLast = utf8FillLast, t = 4;\n break;\n case \"base64\":\n this.text = base64Text, this.end = base64End, t = 3;\n break;\n default:\n return this.write = simpleWrite, void (this.end = simpleEnd);\n }\n this.lastNeed = 0, this.lastTotal = 0, this.lastChar = n.allocUnsafe(t);\n }\n function utf8CheckByte(e) {\n return e <= 127 ? 0 : e >> 5 == 6 ? 2 : e >> 4 == 14 ? 3 : e >> 3 == 30 ? 4 : e >> 6 == 2 ? -1 : -2;\n }\n function utf8FillLast(e) {\n var t = this.lastTotal - this.lastNeed,\n r = function utf8CheckExtraBytes(e, t, r) {\n if (128 != (192 & t[0])) return e.lastNeed = 0, \"�\";\n if (e.lastNeed > 1 && t.length > 1) {\n if (128 != (192 & t[1])) return e.lastNeed = 1, \"�\";\n if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2])) return e.lastNeed = 2, \"�\";\n }\n }(this, e);\n return void 0 !== r ? r : this.lastNeed <= e.length ? (e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (e.copy(this.lastChar, t, 0, e.length), void (this.lastNeed -= e.length));\n }\n function utf16Text(e, t) {\n if ((e.length - t) % 2 == 0) {\n var r = e.toString(\"utf16le\", t);\n if (r) {\n var n = r.charCodeAt(r.length - 1);\n if (n >= 55296 && n <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1], r.slice(0, -1);\n }\n return r;\n }\n return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString(\"utf16le\", t, e.length - 1);\n }\n function utf16End(e) {\n var t = e && e.length ? this.write(e) : \"\";\n if (this.lastNeed) {\n var r = this.lastTotal - this.lastNeed;\n return t + this.lastChar.toString(\"utf16le\", 0, r);\n }\n return t;\n }\n function base64Text(e, t) {\n var r = (e.length - t) % 3;\n return 0 === r ? e.toString(\"base64\", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, 1 === r ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString(\"base64\", t, e.length - r));\n }\n function base64End(e) {\n var t = e && e.length ? this.write(e) : \"\";\n return this.lastNeed ? t + this.lastChar.toString(\"base64\", 0, 3 - this.lastNeed) : t;\n }\n function simpleWrite(e) {\n return e.toString(this.encoding);\n }\n function simpleEnd(e) {\n return e && e.length ? this.write(e) : \"\";\n }\n t.I = StringDecoder, StringDecoder.prototype.write = function (e) {\n if (0 === e.length) return \"\";\n var t, r;\n if (this.lastNeed) {\n if (void 0 === (t = this.fillLast(e))) return \"\";\n r = this.lastNeed, this.lastNeed = 0;\n } else r = 0;\n return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || \"\";\n }, StringDecoder.prototype.end = function utf8End(e) {\n var t = e && e.length ? this.write(e) : \"\";\n return this.lastNeed ? t + \"�\" : t;\n }, StringDecoder.prototype.text = function utf8Text(e, t) {\n var r = function utf8CheckIncomplete(e, t, r) {\n var n = t.length - 1;\n if (n < r) return 0;\n var a = utf8CheckByte(t[n]);\n if (a >= 0) return a > 0 && (e.lastNeed = a - 1), a;\n if (--n < r || -2 === a) return 0;\n if (a = utf8CheckByte(t[n]), a >= 0) return a > 0 && (e.lastNeed = a - 2), a;\n if (--n < r || -2 === a) return 0;\n if (a = utf8CheckByte(t[n]), a >= 0) return a > 0 && (2 === a ? a = 0 : e.lastNeed = a - 3), a;\n return 0;\n }(this, e, t);\n if (!this.lastNeed) return e.toString(\"utf8\", t);\n this.lastTotal = r;\n var n = e.length - (r - this.lastNeed);\n return e.copy(this.lastChar, 0, n), e.toString(\"utf8\", t, n);\n }, StringDecoder.prototype.fillLast = function (e) {\n if (this.lastNeed <= e.length) return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);\n e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e.length), this.lastNeed -= e.length;\n };\n },\n 157: function (e) {\n e.exports = function () {\n throw new Error(\"Readable.from is not available in the browser\");\n };\n },\n 209: function (e, t, r) {\n var n = r(606),\n a = 65536,\n o = 4294967295;\n var s = r(861).Buffer,\n l = r.g.crypto || r.g.msCrypto;\n l && l.getRandomValues ? e.exports = function randomBytes(e, t) {\n if (e > o) throw new RangeError(\"requested too many random bytes\");\n var r = s.allocUnsafe(e);\n if (e > 0) if (e > a) for (var i = 0; i < e; i += a) l.getRandomValues(r.slice(i, i + a));else l.getRandomValues(r);\n if (\"function\" == typeof t) return n.nextTick(function () {\n t(null, r);\n });\n return r;\n } : e.exports = function oldBrowser() {\n throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\");\n };\n },\n 238: function (e, t, r) {\n var n = r(48).F.ERR_STREAM_PREMATURE_CLOSE;\n function noop() {}\n e.exports = function eos(e, t, r) {\n if (\"function\" == typeof t) return eos(e, null, t);\n t || (t = {}), r = function once(e) {\n var t = !1;\n return function () {\n if (!t) {\n t = !0;\n for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++) n[a] = arguments[a];\n e.apply(this, n);\n }\n };\n }(r || noop);\n var a = t.readable || !1 !== t.readable && e.readable,\n o = t.writable || !1 !== t.writable && e.writable,\n s = function onlegacyfinish() {\n e.writable || i();\n },\n l = e._writableState && e._writableState.finished,\n i = function onfinish() {\n o = !1, l = !0, a || r.call(e);\n },\n c = e._readableState && e._readableState.endEmitted,\n u = function onend() {\n a = !1, c = !0, o || r.call(e);\n },\n d = function onerror(t) {\n r.call(e, t);\n },\n p = function onclose() {\n var t;\n return a && !c ? (e._readableState && e._readableState.ended || (t = new n()), r.call(e, t)) : o && !l ? (e._writableState && e._writableState.ended || (t = new n()), r.call(e, t)) : void 0;\n },\n m = function onrequest() {\n e.req.on(\"finish\", i);\n };\n return !function isRequest(e) {\n return e.setHeader && \"function\" == typeof e.abort;\n }(e) ? o && !e._writableState && (e.on(\"end\", s), e.on(\"close\", s)) : (e.on(\"complete\", i), e.on(\"abort\", p), e.req ? m() : e.on(\"request\", m)), e.on(\"end\", u), e.on(\"finish\", i), !1 !== t.error && e.on(\"error\", d), e.on(\"close\", p), function () {\n e.removeListener(\"complete\", i), e.removeListener(\"abort\", p), e.removeListener(\"request\", m), e.req && e.req.removeListener(\"finish\", i), e.removeListener(\"end\", s), e.removeListener(\"close\", s), e.removeListener(\"finish\", i), e.removeListener(\"end\", u), e.removeListener(\"error\", d), e.removeListener(\"close\", p);\n };\n };\n },\n 287: function (e, t, r) {\n const n = r(987),\n a = r(362),\n o = \"function\" == typeof Symbol && \"function\" == typeof Symbol.for ? Symbol.for(\"nodejs.util.inspect.custom\") : null;\n t.Buffer = Buffer, t.SlowBuffer = function SlowBuffer(e) {\n +e != e && (e = 0);\n return Buffer.alloc(+e);\n }, t.INSPECT_MAX_BYTES = 50;\n const s = 2147483647;\n function createBuffer(e) {\n if (e > s) throw new RangeError('The value \"' + e + '\" is invalid for option \"size\"');\n const t = new Uint8Array(e);\n return Object.setPrototypeOf(t, Buffer.prototype), t;\n }\n function Buffer(e, t, r) {\n if (\"number\" == typeof e) {\n if (\"string\" == typeof t) throw new TypeError('The \"string\" argument must be of type string. Received type number');\n return allocUnsafe(e);\n }\n return from(e, t, r);\n }\n function from(e, t, r) {\n if (\"string\" == typeof e) return function fromString(e, t) {\n \"string\" == typeof t && \"\" !== t || (t = \"utf8\");\n if (!Buffer.isEncoding(t)) throw new TypeError(\"Unknown encoding: \" + t);\n const r = 0 | byteLength(e, t);\n let n = createBuffer(r);\n const a = n.write(e, t);\n a !== r && (n = n.slice(0, a));\n return n;\n }(e, t);\n if (ArrayBuffer.isView(e)) return function fromArrayView(e) {\n if (isInstance(e, Uint8Array)) {\n const t = new Uint8Array(e);\n return fromArrayBuffer(t.buffer, t.byteOffset, t.byteLength);\n }\n return fromArrayLike(e);\n }(e);\n if (null == e) throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof e);\n if (isInstance(e, ArrayBuffer) || e && isInstance(e.buffer, ArrayBuffer)) return fromArrayBuffer(e, t, r);\n if (\"undefined\" != typeof SharedArrayBuffer && (isInstance(e, SharedArrayBuffer) || e && isInstance(e.buffer, SharedArrayBuffer))) return fromArrayBuffer(e, t, r);\n if (\"number\" == typeof e) throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n const n = e.valueOf && e.valueOf();\n if (null != n && n !== e) return Buffer.from(n, t, r);\n const a = function fromObject(e) {\n if (Buffer.isBuffer(e)) {\n const t = 0 | checked(e.length),\n r = createBuffer(t);\n return 0 === r.length || e.copy(r, 0, 0, t), r;\n }\n if (void 0 !== e.length) return \"number\" != typeof e.length || numberIsNaN(e.length) ? createBuffer(0) : fromArrayLike(e);\n if (\"Buffer\" === e.type && Array.isArray(e.data)) return fromArrayLike(e.data);\n }(e);\n if (a) return a;\n if (\"undefined\" != typeof Symbol && null != Symbol.toPrimitive && \"function\" == typeof e[Symbol.toPrimitive]) return Buffer.from(e[Symbol.toPrimitive](\"string\"), t, r);\n throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \" + typeof e);\n }\n function assertSize(e) {\n if (\"number\" != typeof e) throw new TypeError('\"size\" argument must be of type number');\n if (e < 0) throw new RangeError('The value \"' + e + '\" is invalid for option \"size\"');\n }\n function allocUnsafe(e) {\n return assertSize(e), createBuffer(e < 0 ? 0 : 0 | checked(e));\n }\n function fromArrayLike(e) {\n const t = e.length < 0 ? 0 : 0 | checked(e.length),\n r = createBuffer(t);\n for (let n = 0; n < t; n += 1) r[n] = 255 & e[n];\n return r;\n }\n function fromArrayBuffer(e, t, r) {\n if (t < 0 || e.byteLength < t) throw new RangeError('\"offset\" is outside of buffer bounds');\n if (e.byteLength < t + (r || 0)) throw new RangeError('\"length\" is outside of buffer bounds');\n let n;\n return n = void 0 === t && void 0 === r ? new Uint8Array(e) : void 0 === r ? new Uint8Array(e, t) : new Uint8Array(e, t, r), Object.setPrototypeOf(n, Buffer.prototype), n;\n }\n function checked(e) {\n if (e >= s) throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\" + s.toString(16) + \" bytes\");\n return 0 | e;\n }\n function byteLength(e, t) {\n if (Buffer.isBuffer(e)) return e.length;\n if (ArrayBuffer.isView(e) || isInstance(e, ArrayBuffer)) return e.byteLength;\n if (\"string\" != typeof e) throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e);\n const r = e.length,\n n = arguments.length > 2 && !0 === arguments[2];\n if (!n && 0 === r) return 0;\n let a = !1;\n for (;;) switch (t) {\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return r;\n case \"utf8\":\n case \"utf-8\":\n return utf8ToBytes(e).length;\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return 2 * r;\n case \"hex\":\n return r >>> 1;\n case \"base64\":\n return base64ToBytes(e).length;\n default:\n if (a) return n ? -1 : utf8ToBytes(e).length;\n t = (\"\" + t).toLowerCase(), a = !0;\n }\n }\n function slowToString(e, t, r) {\n let n = !1;\n if ((void 0 === t || t < 0) && (t = 0), t > this.length) return \"\";\n if ((void 0 === r || r > this.length) && (r = this.length), r <= 0) return \"\";\n if ((r >>>= 0) <= (t >>>= 0)) return \"\";\n for (e || (e = \"utf8\");;) switch (e) {\n case \"hex\":\n return hexSlice(this, t, r);\n case \"utf8\":\n case \"utf-8\":\n return utf8Slice(this, t, r);\n case \"ascii\":\n return asciiSlice(this, t, r);\n case \"latin1\":\n case \"binary\":\n return latin1Slice(this, t, r);\n case \"base64\":\n return base64Slice(this, t, r);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return utf16leSlice(this, t, r);\n default:\n if (n) throw new TypeError(\"Unknown encoding: \" + e);\n e = (e + \"\").toLowerCase(), n = !0;\n }\n }\n function swap(e, t, r) {\n const n = e[t];\n e[t] = e[r], e[r] = n;\n }\n function bidirectionalIndexOf(e, t, r, n, a) {\n if (0 === e.length) return -1;\n if (\"string\" == typeof r ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), numberIsNaN(r = +r) && (r = a ? 0 : e.length - 1), r < 0 && (r = e.length + r), r >= e.length) {\n if (a) return -1;\n r = e.length - 1;\n } else if (r < 0) {\n if (!a) return -1;\n r = 0;\n }\n if (\"string\" == typeof t && (t = Buffer.from(t, n)), Buffer.isBuffer(t)) return 0 === t.length ? -1 : arrayIndexOf(e, t, r, n, a);\n if (\"number\" == typeof t) return t &= 255, \"function\" == typeof Uint8Array.prototype.indexOf ? a ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : arrayIndexOf(e, [t], r, n, a);\n throw new TypeError(\"val must be string, number or Buffer\");\n }\n function arrayIndexOf(e, t, r, n, a) {\n let o,\n s = 1,\n l = e.length,\n i = t.length;\n if (void 0 !== n && (\"ucs2\" === (n = String(n).toLowerCase()) || \"ucs-2\" === n || \"utf16le\" === n || \"utf-16le\" === n)) {\n if (e.length < 2 || t.length < 2) return -1;\n s = 2, l /= 2, i /= 2, r /= 2;\n }\n function read(e, t) {\n return 1 === s ? e[t] : e.readUInt16BE(t * s);\n }\n if (a) {\n let n = -1;\n for (o = r; o < l; o++) if (read(e, o) === read(t, -1 === n ? 0 : o - n)) {\n if (-1 === n && (n = o), o - n + 1 === i) return n * s;\n } else -1 !== n && (o -= o - n), n = -1;\n } else for (r + i > l && (r = l - i), o = r; o >= 0; o--) {\n let r = !0;\n for (let n = 0; n < i; n++) if (read(e, o + n) !== read(t, n)) {\n r = !1;\n break;\n }\n if (r) return o;\n }\n return -1;\n }\n function hexWrite(e, t, r, n) {\n r = Number(r) || 0;\n const a = e.length - r;\n n ? (n = Number(n)) > a && (n = a) : n = a;\n const o = t.length;\n let s;\n for (n > o / 2 && (n = o / 2), s = 0; s < n; ++s) {\n const n = parseInt(t.substr(2 * s, 2), 16);\n if (numberIsNaN(n)) return s;\n e[r + s] = n;\n }\n return s;\n }\n function utf8Write(e, t, r, n) {\n return blitBuffer(utf8ToBytes(t, e.length - r), e, r, n);\n }\n function asciiWrite(e, t, r, n) {\n return blitBuffer(function asciiToBytes(e) {\n const t = [];\n for (let r = 0; r < e.length; ++r) t.push(255 & e.charCodeAt(r));\n return t;\n }(t), e, r, n);\n }\n function base64Write(e, t, r, n) {\n return blitBuffer(base64ToBytes(t), e, r, n);\n }\n function ucs2Write(e, t, r, n) {\n return blitBuffer(function utf16leToBytes(e, t) {\n let r, n, a;\n const o = [];\n for (let s = 0; s < e.length && !((t -= 2) < 0); ++s) r = e.charCodeAt(s), n = r >> 8, a = r % 256, o.push(a), o.push(n);\n return o;\n }(t, e.length - r), e, r, n);\n }\n function base64Slice(e, t, r) {\n return 0 === t && r === e.length ? n.fromByteArray(e) : n.fromByteArray(e.slice(t, r));\n }\n function utf8Slice(e, t, r) {\n r = Math.min(e.length, r);\n const n = [];\n let a = t;\n for (; a < r;) {\n const t = e[a];\n let o = null,\n s = t > 239 ? 4 : t > 223 ? 3 : t > 191 ? 2 : 1;\n if (a + s <= r) {\n let r, n, l, i;\n switch (s) {\n case 1:\n t < 128 && (o = t);\n break;\n case 2:\n r = e[a + 1], 128 == (192 & r) && (i = (31 & t) << 6 | 63 & r, i > 127 && (o = i));\n break;\n case 3:\n r = e[a + 1], n = e[a + 2], 128 == (192 & r) && 128 == (192 & n) && (i = (15 & t) << 12 | (63 & r) << 6 | 63 & n, i > 2047 && (i < 55296 || i > 57343) && (o = i));\n break;\n case 4:\n r = e[a + 1], n = e[a + 2], l = e[a + 3], 128 == (192 & r) && 128 == (192 & n) && 128 == (192 & l) && (i = (15 & t) << 18 | (63 & r) << 12 | (63 & n) << 6 | 63 & l, i > 65535 && i < 1114112 && (o = i));\n }\n }\n null === o ? (o = 65533, s = 1) : o > 65535 && (o -= 65536, n.push(o >>> 10 & 1023 | 55296), o = 56320 | 1023 & o), n.push(o), a += s;\n }\n return function decodeCodePointsArray(e) {\n const t = e.length;\n if (t <= l) return String.fromCharCode.apply(String, e);\n let r = \"\",\n n = 0;\n for (; n < t;) r += String.fromCharCode.apply(String, e.slice(n, n += l));\n return r;\n }(n);\n }\n t.kMaxLength = s, Buffer.TYPED_ARRAY_SUPPORT = function typedArraySupport() {\n try {\n const e = new Uint8Array(1),\n t = {\n foo: function () {\n return 42;\n }\n };\n return Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(e, t), 42 === e.foo();\n } catch (e) {\n return !1;\n }\n }(), Buffer.TYPED_ARRAY_SUPPORT || \"undefined\" == typeof console || \"function\" != typeof console.error || console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"), Object.defineProperty(Buffer.prototype, \"parent\", {\n enumerable: !0,\n get: function () {\n if (Buffer.isBuffer(this)) return this.buffer;\n }\n }), Object.defineProperty(Buffer.prototype, \"offset\", {\n enumerable: !0,\n get: function () {\n if (Buffer.isBuffer(this)) return this.byteOffset;\n }\n }), Buffer.poolSize = 8192, Buffer.from = function (e, t, r) {\n return from(e, t, r);\n }, Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype), Object.setPrototypeOf(Buffer, Uint8Array), Buffer.alloc = function (e, t, r) {\n return function alloc(e, t, r) {\n return assertSize(e), e <= 0 ? createBuffer(e) : void 0 !== t ? \"string\" == typeof r ? createBuffer(e).fill(t, r) : createBuffer(e).fill(t) : createBuffer(e);\n }(e, t, r);\n }, Buffer.allocUnsafe = function (e) {\n return allocUnsafe(e);\n }, Buffer.allocUnsafeSlow = function (e) {\n return allocUnsafe(e);\n }, Buffer.isBuffer = function isBuffer(e) {\n return null != e && !0 === e._isBuffer && e !== Buffer.prototype;\n }, Buffer.compare = function compare(e, t) {\n if (isInstance(e, Uint8Array) && (e = Buffer.from(e, e.offset, e.byteLength)), isInstance(t, Uint8Array) && (t = Buffer.from(t, t.offset, t.byteLength)), !Buffer.isBuffer(e) || !Buffer.isBuffer(t)) throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n if (e === t) return 0;\n let r = e.length,\n n = t.length;\n for (let a = 0, o = Math.min(r, n); a < o; ++a) if (e[a] !== t[a]) {\n r = e[a], n = t[a];\n break;\n }\n return r < n ? -1 : n < r ? 1 : 0;\n }, Buffer.isEncoding = function isEncoding(e) {\n switch (String(e).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 !0;\n default:\n return !1;\n }\n }, Buffer.concat = function concat(e, t) {\n if (!Array.isArray(e)) throw new TypeError('\"list\" argument must be an Array of Buffers');\n if (0 === e.length) return Buffer.alloc(0);\n let r;\n if (void 0 === t) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length;\n const n = Buffer.allocUnsafe(t);\n let a = 0;\n for (r = 0; r < e.length; ++r) {\n let t = e[r];\n if (isInstance(t, Uint8Array)) a + t.length > n.length ? (Buffer.isBuffer(t) || (t = Buffer.from(t)), t.copy(n, a)) : Uint8Array.prototype.set.call(n, t, a);else {\n if (!Buffer.isBuffer(t)) throw new TypeError('\"list\" argument must be an Array of Buffers');\n t.copy(n, a);\n }\n a += t.length;\n }\n return n;\n }, Buffer.byteLength = byteLength, Buffer.prototype._isBuffer = !0, Buffer.prototype.swap16 = function swap16() {\n const e = this.length;\n if (e % 2 != 0) throw new RangeError(\"Buffer size must be a multiple of 16-bits\");\n for (let t = 0; t < e; t += 2) swap(this, t, t + 1);\n return this;\n }, Buffer.prototype.swap32 = function swap32() {\n const e = this.length;\n if (e % 4 != 0) throw new RangeError(\"Buffer size must be a multiple of 32-bits\");\n for (let t = 0; t < e; t += 4) swap(this, t, t + 3), swap(this, t + 1, t + 2);\n return this;\n }, Buffer.prototype.swap64 = function swap64() {\n const e = this.length;\n if (e % 8 != 0) throw new RangeError(\"Buffer size must be a multiple of 64-bits\");\n for (let t = 0; t < e; t += 8) swap(this, t, t + 7), swap(this, t + 1, t + 6), swap(this, t + 2, t + 5), swap(this, t + 3, t + 4);\n return this;\n }, Buffer.prototype.toString = function toString() {\n const e = this.length;\n return 0 === e ? \"\" : 0 === arguments.length ? utf8Slice(this, 0, e) : slowToString.apply(this, arguments);\n }, Buffer.prototype.toLocaleString = Buffer.prototype.toString, Buffer.prototype.equals = function equals(e) {\n if (!Buffer.isBuffer(e)) throw new TypeError(\"Argument must be a Buffer\");\n return this === e || 0 === Buffer.compare(this, e);\n }, Buffer.prototype.inspect = function inspect() {\n let e = \"\";\n const r = t.INSPECT_MAX_BYTES;\n return e = this.toString(\"hex\", 0, r).replace(/(.{2})/g, \"$1 \").trim(), this.length > r && (e += \" ... \"), \"\";\n }, o && (Buffer.prototype[o] = Buffer.prototype.inspect), Buffer.prototype.compare = function compare(e, t, r, n, a) {\n if (isInstance(e, Uint8Array) && (e = Buffer.from(e, e.offset, e.byteLength)), !Buffer.isBuffer(e)) throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e);\n if (void 0 === t && (t = 0), void 0 === r && (r = e ? e.length : 0), void 0 === n && (n = 0), void 0 === a && (a = this.length), t < 0 || r > e.length || n < 0 || a > this.length) throw new RangeError(\"out of range index\");\n if (n >= a && t >= r) return 0;\n if (n >= a) return -1;\n if (t >= r) return 1;\n if (this === e) return 0;\n let o = (a >>>= 0) - (n >>>= 0),\n s = (r >>>= 0) - (t >>>= 0);\n const l = Math.min(o, s),\n i = this.slice(n, a),\n c = e.slice(t, r);\n for (let e = 0; e < l; ++e) if (i[e] !== c[e]) {\n o = i[e], s = c[e];\n break;\n }\n return o < s ? -1 : s < o ? 1 : 0;\n }, Buffer.prototype.includes = function includes(e, t, r) {\n return -1 !== this.indexOf(e, t, r);\n }, Buffer.prototype.indexOf = function indexOf(e, t, r) {\n return bidirectionalIndexOf(this, e, t, r, !0);\n }, Buffer.prototype.lastIndexOf = function lastIndexOf(e, t, r) {\n return bidirectionalIndexOf(this, e, t, r, !1);\n }, Buffer.prototype.write = function write(e, t, r, n) {\n if (void 0 === t) n = \"utf8\", r = this.length, t = 0;else if (void 0 === r && \"string\" == typeof t) n = t, r = this.length, t = 0;else {\n if (!isFinite(t)) throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");\n t >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = \"utf8\")) : (n = r, r = void 0);\n }\n const a = this.length - t;\n if ((void 0 === r || r > a) && (r = a), e.length > 0 && (r < 0 || t < 0) || t > this.length) throw new RangeError(\"Attempt to write outside buffer bounds\");\n n || (n = \"utf8\");\n let o = !1;\n for (;;) switch (n) {\n case \"hex\":\n return hexWrite(this, e, t, r);\n case \"utf8\":\n case \"utf-8\":\n return utf8Write(this, e, t, r);\n case \"ascii\":\n case \"latin1\":\n case \"binary\":\n return asciiWrite(this, e, t, r);\n case \"base64\":\n return base64Write(this, e, t, r);\n case \"ucs2\":\n case \"ucs-2\":\n case \"utf16le\":\n case \"utf-16le\":\n return ucs2Write(this, e, t, r);\n default:\n if (o) throw new TypeError(\"Unknown encoding: \" + n);\n n = (\"\" + n).toLowerCase(), o = !0;\n }\n }, Buffer.prototype.toJSON = function toJSON() {\n return {\n type: \"Buffer\",\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n };\n const l = 4096;\n function asciiSlice(e, t, r) {\n let n = \"\";\n r = Math.min(e.length, r);\n for (let a = t; a < r; ++a) n += String.fromCharCode(127 & e[a]);\n return n;\n }\n function latin1Slice(e, t, r) {\n let n = \"\";\n r = Math.min(e.length, r);\n for (let a = t; a < r; ++a) n += String.fromCharCode(e[a]);\n return n;\n }\n function hexSlice(e, t, r) {\n const n = e.length;\n (!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n);\n let a = \"\";\n for (let n = t; n < r; ++n) a += u[e[n]];\n return a;\n }\n function utf16leSlice(e, t, r) {\n const n = e.slice(t, r);\n let a = \"\";\n for (let e = 0; e < n.length - 1; e += 2) a += String.fromCharCode(n[e] + 256 * n[e + 1]);\n return a;\n }\n function checkOffset(e, t, r) {\n if (e % 1 != 0 || e < 0) throw new RangeError(\"offset is not uint\");\n if (e + t > r) throw new RangeError(\"Trying to access beyond buffer length\");\n }\n function checkInt(e, t, r, n, a, o) {\n if (!Buffer.isBuffer(e)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (t > a || t < o) throw new RangeError('\"value\" argument is out of bounds');\n if (r + n > e.length) throw new RangeError(\"Index out of range\");\n }\n function wrtBigUInt64LE(e, t, r, n, a) {\n checkIntBI(t, n, a, e, r, 7);\n let o = Number(t & BigInt(4294967295));\n e[r++] = o, o >>= 8, e[r++] = o, o >>= 8, e[r++] = o, o >>= 8, e[r++] = o;\n let s = Number(t >> BigInt(32) & BigInt(4294967295));\n return e[r++] = s, s >>= 8, e[r++] = s, s >>= 8, e[r++] = s, s >>= 8, e[r++] = s, r;\n }\n function wrtBigUInt64BE(e, t, r, n, a) {\n checkIntBI(t, n, a, e, r, 7);\n let o = Number(t & BigInt(4294967295));\n e[r + 7] = o, o >>= 8, e[r + 6] = o, o >>= 8, e[r + 5] = o, o >>= 8, e[r + 4] = o;\n let s = Number(t >> BigInt(32) & BigInt(4294967295));\n return e[r + 3] = s, s >>= 8, e[r + 2] = s, s >>= 8, e[r + 1] = s, s >>= 8, e[r] = s, r + 8;\n }\n function checkIEEE754(e, t, r, n, a, o) {\n if (r + n > e.length) throw new RangeError(\"Index out of range\");\n if (r < 0) throw new RangeError(\"Index out of range\");\n }\n function writeFloat(e, t, r, n, o) {\n return t = +t, r >>>= 0, o || checkIEEE754(e, 0, r, 4), a.write(e, t, r, n, 23, 4), r + 4;\n }\n function writeDouble(e, t, r, n, o) {\n return t = +t, r >>>= 0, o || checkIEEE754(e, 0, r, 8), a.write(e, t, r, n, 52, 8), r + 8;\n }\n Buffer.prototype.slice = function slice(e, t) {\n const r = this.length;\n (e = ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), (t = void 0 === t ? r : ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), t < e && (t = e);\n const n = this.subarray(e, t);\n return Object.setPrototypeOf(n, Buffer.prototype), n;\n }, Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE(e, t, r) {\n e >>>= 0, t >>>= 0, r || checkOffset(e, t, this.length);\n let n = this[e],\n a = 1,\n o = 0;\n for (; ++o < t && (a *= 256);) n += this[e + o] * a;\n return n;\n }, Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function readUIntBE(e, t, r) {\n e >>>= 0, t >>>= 0, r || checkOffset(e, t, this.length);\n let n = this[e + --t],\n a = 1;\n for (; t > 0 && (a *= 256);) n += this[e + --t] * a;\n return n;\n }, Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8(e, t) {\n return e >>>= 0, t || checkOffset(e, 1, this.length), this[e];\n }, Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(e, t) {\n return e >>>= 0, t || checkOffset(e, 2, this.length), this[e] | this[e + 1] << 8;\n }, Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function readUInt16BE(e, t) {\n return e >>>= 0, t || checkOffset(e, 2, this.length), this[e] << 8 | this[e + 1];\n }, Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(e, t) {\n return e >>>= 0, t || checkOffset(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3];\n }, Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function readUInt32BE(e, t) {\n return e >>>= 0, t || checkOffset(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);\n }, Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(e) {\n validateNumber(e >>>= 0, \"offset\");\n const t = this[e],\n r = this[e + 7];\n void 0 !== t && void 0 !== r || boundsError(e, this.length - 8);\n const n = t + 256 * this[++e] + 65536 * this[++e] + this[++e] * 2 ** 24,\n a = this[++e] + 256 * this[++e] + 65536 * this[++e] + r * 2 ** 24;\n return BigInt(n) + (BigInt(a) << BigInt(32));\n }), Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(e) {\n validateNumber(e >>>= 0, \"offset\");\n const t = this[e],\n r = this[e + 7];\n void 0 !== t && void 0 !== r || boundsError(e, this.length - 8);\n const n = t * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + this[++e],\n a = this[++e] * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + r;\n return (BigInt(n) << BigInt(32)) + BigInt(a);\n }), Buffer.prototype.readIntLE = function readIntLE(e, t, r) {\n e >>>= 0, t >>>= 0, r || checkOffset(e, t, this.length);\n let n = this[e],\n a = 1,\n o = 0;\n for (; ++o < t && (a *= 256);) n += this[e + o] * a;\n return a *= 128, n >= a && (n -= Math.pow(2, 8 * t)), n;\n }, Buffer.prototype.readIntBE = function readIntBE(e, t, r) {\n e >>>= 0, t >>>= 0, r || checkOffset(e, t, this.length);\n let n = t,\n a = 1,\n o = this[e + --n];\n for (; n > 0 && (a *= 256);) o += this[e + --n] * a;\n return a *= 128, o >= a && (o -= Math.pow(2, 8 * t)), o;\n }, Buffer.prototype.readInt8 = function readInt8(e, t) {\n return e >>>= 0, t || checkOffset(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e];\n }, Buffer.prototype.readInt16LE = function readInt16LE(e, t) {\n e >>>= 0, t || checkOffset(e, 2, this.length);\n const r = this[e] | this[e + 1] << 8;\n return 32768 & r ? 4294901760 | r : r;\n }, Buffer.prototype.readInt16BE = function readInt16BE(e, t) {\n e >>>= 0, t || checkOffset(e, 2, this.length);\n const r = this[e + 1] | this[e] << 8;\n return 32768 & r ? 4294901760 | r : r;\n }, Buffer.prototype.readInt32LE = function readInt32LE(e, t) {\n return e >>>= 0, t || checkOffset(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;\n }, Buffer.prototype.readInt32BE = function readInt32BE(e, t) {\n return e >>>= 0, t || checkOffset(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];\n }, Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(e) {\n validateNumber(e >>>= 0, \"offset\");\n const t = this[e],\n r = this[e + 7];\n void 0 !== t && void 0 !== r || boundsError(e, this.length - 8);\n const n = this[e + 4] + 256 * this[e + 5] + 65536 * this[e + 6] + (r << 24);\n return (BigInt(n) << BigInt(32)) + BigInt(t + 256 * this[++e] + 65536 * this[++e] + this[++e] * 2 ** 24);\n }), Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(e) {\n validateNumber(e >>>= 0, \"offset\");\n const t = this[e],\n r = this[e + 7];\n void 0 !== t && void 0 !== r || boundsError(e, this.length - 8);\n const n = (t << 24) + 65536 * this[++e] + 256 * this[++e] + this[++e];\n return (BigInt(n) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + 65536 * this[++e] + 256 * this[++e] + r);\n }), Buffer.prototype.readFloatLE = function readFloatLE(e, t) {\n return e >>>= 0, t || checkOffset(e, 4, this.length), a.read(this, e, !0, 23, 4);\n }, Buffer.prototype.readFloatBE = function readFloatBE(e, t) {\n return e >>>= 0, t || checkOffset(e, 4, this.length), a.read(this, e, !1, 23, 4);\n }, Buffer.prototype.readDoubleLE = function readDoubleLE(e, t) {\n return e >>>= 0, t || checkOffset(e, 8, this.length), a.read(this, e, !0, 52, 8);\n }, Buffer.prototype.readDoubleBE = function readDoubleBE(e, t) {\n return e >>>= 0, t || checkOffset(e, 8, this.length), a.read(this, e, !1, 52, 8);\n }, Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(e, t, r, n) {\n if (e = +e, t >>>= 0, r >>>= 0, !n) {\n checkInt(this, e, t, r, Math.pow(2, 8 * r) - 1, 0);\n }\n let a = 1,\n o = 0;\n for (this[t] = 255 & e; ++o < r && (a *= 256);) this[t + o] = e / a & 255;\n return t + r;\n }, Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function writeUIntBE(e, t, r, n) {\n if (e = +e, t >>>= 0, r >>>= 0, !n) {\n checkInt(this, e, t, r, Math.pow(2, 8 * r) - 1, 0);\n }\n let a = r - 1,\n o = 1;\n for (this[t + a] = 255 & e; --a >= 0 && (o *= 256);) this[t + a] = e / o & 255;\n return t + r;\n }, Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 1, 255, 0), this[t] = 255 & e, t + 1;\n }, Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 2, 65535, 0), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2;\n }, Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2;\n }, Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e, t + 4;\n }, Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4;\n }, Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(e, t = 0) {\n return wrtBigUInt64LE(this, e, t, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n }), Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(e, t = 0) {\n return wrtBigUInt64BE(this, e, t, BigInt(0), BigInt(\"0xffffffffffffffff\"));\n }), Buffer.prototype.writeIntLE = function writeIntLE(e, t, r, n) {\n if (e = +e, t >>>= 0, !n) {\n const n = Math.pow(2, 8 * r - 1);\n checkInt(this, e, t, r, n - 1, -n);\n }\n let a = 0,\n o = 1,\n s = 0;\n for (this[t] = 255 & e; ++a < r && (o *= 256);) e < 0 && 0 === s && 0 !== this[t + a - 1] && (s = 1), this[t + a] = (e / o | 0) - s & 255;\n return t + r;\n }, Buffer.prototype.writeIntBE = function writeIntBE(e, t, r, n) {\n if (e = +e, t >>>= 0, !n) {\n const n = Math.pow(2, 8 * r - 1);\n checkInt(this, e, t, r, n - 1, -n);\n }\n let a = r - 1,\n o = 1,\n s = 0;\n for (this[t + a] = 255 & e; --a >= 0 && (o *= 256);) e < 0 && 0 === s && 0 !== this[t + a + 1] && (s = 1), this[t + a] = (e / o | 0) - s & 255;\n return t + r;\n }, Buffer.prototype.writeInt8 = function writeInt8(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1;\n }, Buffer.prototype.writeInt16LE = function writeInt16LE(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 2, 32767, -32768), this[t] = 255 & e, this[t + 1] = e >>> 8, t + 2;\n }, Buffer.prototype.writeInt16BE = function writeInt16BE(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = 255 & e, t + 2;\n }, Buffer.prototype.writeInt32LE = function writeInt32LE(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 4, 2147483647, -2147483648), this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;\n }, Buffer.prototype.writeInt32BE = function writeInt32BE(e, t, r) {\n return e = +e, t >>>= 0, r || checkInt(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e, t + 4;\n }, Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(e, t = 0) {\n return wrtBigUInt64LE(this, e, t, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n }), Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(e, t = 0) {\n return wrtBigUInt64BE(this, e, t, -BigInt(\"0x8000000000000000\"), BigInt(\"0x7fffffffffffffff\"));\n }), Buffer.prototype.writeFloatLE = function writeFloatLE(e, t, r) {\n return writeFloat(this, e, t, !0, r);\n }, Buffer.prototype.writeFloatBE = function writeFloatBE(e, t, r) {\n return writeFloat(this, e, t, !1, r);\n }, Buffer.prototype.writeDoubleLE = function writeDoubleLE(e, t, r) {\n return writeDouble(this, e, t, !0, r);\n }, Buffer.prototype.writeDoubleBE = function writeDoubleBE(e, t, r) {\n return writeDouble(this, e, t, !1, r);\n }, Buffer.prototype.copy = function copy(e, t, r, n) {\n if (!Buffer.isBuffer(e)) throw new TypeError(\"argument should be a Buffer\");\n if (r || (r = 0), n || 0 === n || (n = this.length), t >= e.length && (t = e.length), t || (t = 0), n > 0 && n < r && (n = r), n === r) return 0;\n if (0 === e.length || 0 === this.length) return 0;\n if (t < 0) throw new RangeError(\"targetStart out of bounds\");\n if (r < 0 || r >= this.length) throw new RangeError(\"Index out of range\");\n if (n < 0) throw new RangeError(\"sourceEnd out of bounds\");\n n > this.length && (n = this.length), e.length - t < n - r && (n = e.length - t + r);\n const a = n - r;\n return this === e && \"function\" == typeof Uint8Array.prototype.copyWithin ? this.copyWithin(t, r, n) : Uint8Array.prototype.set.call(e, this.subarray(r, n), t), a;\n }, Buffer.prototype.fill = function fill(e, t, r, n) {\n if (\"string\" == typeof e) {\n if (\"string\" == typeof t ? (n = t, t = 0, r = this.length) : \"string\" == typeof r && (n = r, r = this.length), void 0 !== n && \"string\" != typeof n) throw new TypeError(\"encoding must be a string\");\n if (\"string\" == typeof n && !Buffer.isEncoding(n)) throw new TypeError(\"Unknown encoding: \" + n);\n if (1 === e.length) {\n const t = e.charCodeAt(0);\n (\"utf8\" === n && t < 128 || \"latin1\" === n) && (e = t);\n }\n } else \"number\" == typeof e ? e &= 255 : \"boolean\" == typeof e && (e = Number(e));\n if (t < 0 || this.length < t || this.length < r) throw new RangeError(\"Out of range index\");\n if (r <= t) return this;\n let a;\n if (t >>>= 0, r = void 0 === r ? this.length : r >>> 0, e || (e = 0), \"number\" == typeof e) for (a = t; a < r; ++a) this[a] = e;else {\n const o = Buffer.isBuffer(e) ? e : Buffer.from(e, n),\n s = o.length;\n if (0 === s) throw new TypeError('The value \"' + e + '\" is invalid for argument \"value\"');\n for (a = 0; a < r - t; ++a) this[a + t] = o[a % s];\n }\n return this;\n };\n const i = {};\n function E(e, t, r) {\n i[e] = class NodeError extends r {\n constructor() {\n super(), Object.defineProperty(this, \"message\", {\n value: t.apply(this, arguments),\n writable: !0,\n configurable: !0\n }), this.name = `${this.name} [${e}]`, this.stack, delete this.name;\n }\n get code() {\n return e;\n }\n set code(e) {\n Object.defineProperty(this, \"code\", {\n configurable: !0,\n enumerable: !0,\n value: e,\n writable: !0\n });\n }\n toString() {\n return `${this.name} [${e}]: ${this.message}`;\n }\n };\n }\n function addNumericalSeparator(e) {\n let t = \"\",\n r = e.length;\n const n = \"-\" === e[0] ? 1 : 0;\n for (; r >= n + 4; r -= 3) t = `_${e.slice(r - 3, r)}${t}`;\n return `${e.slice(0, r)}${t}`;\n }\n function checkIntBI(e, t, r, n, a, o) {\n if (e > r || e < t) {\n const n = \"bigint\" == typeof t ? \"n\" : \"\";\n let a;\n throw a = o > 3 ? 0 === t || t === BigInt(0) ? `>= 0${n} and < 2${n} ** ${8 * (o + 1)}${n}` : `>= -(2${n} ** ${8 * (o + 1) - 1}${n}) and < 2 ** ${8 * (o + 1) - 1}${n}` : `>= ${t}${n} and <= ${r}${n}`, new i.ERR_OUT_OF_RANGE(\"value\", a, e);\n }\n !function checkBounds(e, t, r) {\n validateNumber(t, \"offset\"), void 0 !== e[t] && void 0 !== e[t + r] || boundsError(t, e.length - (r + 1));\n }(n, a, o);\n }\n function validateNumber(e, t) {\n if (\"number\" != typeof e) throw new i.ERR_INVALID_ARG_TYPE(t, \"number\", e);\n }\n function boundsError(e, t, r) {\n if (Math.floor(e) !== e) throw validateNumber(e, r), new i.ERR_OUT_OF_RANGE(r || \"offset\", \"an integer\", e);\n if (t < 0) throw new i.ERR_BUFFER_OUT_OF_BOUNDS();\n throw new i.ERR_OUT_OF_RANGE(r || \"offset\", `>= ${r ? 1 : 0} and <= ${t}`, e);\n }\n E(\"ERR_BUFFER_OUT_OF_BOUNDS\", function (e) {\n return e ? `${e} is outside of buffer bounds` : \"Attempt to access memory outside buffer bounds\";\n }, RangeError), E(\"ERR_INVALID_ARG_TYPE\", function (e, t) {\n return `The \"${e}\" argument must be of type number. Received type ${typeof t}`;\n }, TypeError), E(\"ERR_OUT_OF_RANGE\", function (e, t, r) {\n let n = `The value of \"${e}\" is out of range.`,\n a = r;\n return Number.isInteger(r) && Math.abs(r) > 2 ** 32 ? a = addNumericalSeparator(String(r)) : \"bigint\" == typeof r && (a = String(r), (r > BigInt(2) ** BigInt(32) || r < -(BigInt(2) ** BigInt(32))) && (a = addNumericalSeparator(a)), a += \"n\"), n += ` It must be ${t}. Received ${a}`, n;\n }, RangeError);\n const c = /[^+/0-9A-Za-z-_]/g;\n function utf8ToBytes(e, t) {\n let r;\n t = t || 1 / 0;\n const n = e.length;\n let a = null;\n const o = [];\n for (let s = 0; s < n; ++s) {\n if (r = e.charCodeAt(s), r > 55295 && r < 57344) {\n if (!a) {\n if (r > 56319) {\n (t -= 3) > -1 && o.push(239, 191, 189);\n continue;\n }\n if (s + 1 === n) {\n (t -= 3) > -1 && o.push(239, 191, 189);\n continue;\n }\n a = r;\n continue;\n }\n if (r < 56320) {\n (t -= 3) > -1 && o.push(239, 191, 189), a = r;\n continue;\n }\n r = 65536 + (a - 55296 << 10 | r - 56320);\n } else a && (t -= 3) > -1 && o.push(239, 191, 189);\n if (a = null, r < 128) {\n if ((t -= 1) < 0) break;\n o.push(r);\n } else if (r < 2048) {\n if ((t -= 2) < 0) break;\n o.push(r >> 6 | 192, 63 & r | 128);\n } else if (r < 65536) {\n if ((t -= 3) < 0) break;\n o.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128);\n } else {\n if (!(r < 1114112)) throw new Error(\"Invalid code point\");\n if ((t -= 4) < 0) break;\n o.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128);\n }\n }\n return o;\n }\n function base64ToBytes(e) {\n return n.toByteArray(function base64clean(e) {\n if ((e = (e = e.split(\"=\")[0]).trim().replace(c, \"\")).length < 2) return \"\";\n for (; e.length % 4 != 0;) e += \"=\";\n return e;\n }(e));\n }\n function blitBuffer(e, t, r, n) {\n let a;\n for (a = 0; a < n && !(a + r >= t.length || a >= e.length); ++a) t[a + r] = e[a];\n return a;\n }\n function isInstance(e, t) {\n return e instanceof t || null != e && null != e.constructor && null != e.constructor.name && e.constructor.name === t.name;\n }\n function numberIsNaN(e) {\n return e != e;\n }\n const u = function () {\n const e = \"0123456789abcdef\",\n t = new Array(256);\n for (let r = 0; r < 16; ++r) {\n const n = 16 * r;\n for (let a = 0; a < 16; ++a) t[n + a] = e[r] + e[a];\n }\n return t;\n }();\n function defineBigIntMethod(e) {\n return \"undefined\" == typeof BigInt ? BufferBigIntNotDefined : e;\n }\n function BufferBigIntNotDefined() {\n throw new Error(\"BigInt not supported\");\n }\n },\n 291: function (e, t, r) {\n var n = r(48).F.ERR_INVALID_OPT_VALUE;\n e.exports = {\n getHighWaterMark: function getHighWaterMark(e, t, r, a) {\n var o = function highWaterMarkFrom(e, t, r) {\n return null != e.highWaterMark ? e.highWaterMark : t ? e[r] : null;\n }(t, a, r);\n if (null != o) {\n if (!isFinite(o) || Math.floor(o) !== o || o < 0) throw new n(a ? r : \"highWaterMark\", o);\n return Math.floor(o);\n }\n return e.objectMode ? 16 : 16384;\n }\n };\n },\n 310: function (e, t, r) {\n e.exports = Stream;\n var n = r(7).EventEmitter;\n function Stream() {\n n.call(this);\n }\n r(698)(Stream, n), Stream.Readable = r(412), Stream.Writable = r(708), Stream.Duplex = r(382), Stream.Transform = r(610), Stream.PassThrough = r(600), Stream.finished = r(238), Stream.pipeline = r(758), Stream.Stream = Stream, Stream.prototype.pipe = function (e, t) {\n var r = this;\n function ondata(t) {\n e.writable && !1 === e.write(t) && r.pause && r.pause();\n }\n function ondrain() {\n r.readable && r.resume && r.resume();\n }\n r.on(\"data\", ondata), e.on(\"drain\", ondrain), e._isStdio || t && !1 === t.end || (r.on(\"end\", onend), r.on(\"close\", onclose));\n var a = !1;\n function onend() {\n a || (a = !0, e.end());\n }\n function onclose() {\n a || (a = !0, \"function\" == typeof e.destroy && e.destroy());\n }\n function onerror(e) {\n if (cleanup(), 0 === n.listenerCount(this, \"error\")) throw e;\n }\n function cleanup() {\n r.removeListener(\"data\", ondata), e.removeListener(\"drain\", ondrain), r.removeListener(\"end\", onend), r.removeListener(\"close\", onclose), r.removeListener(\"error\", onerror), e.removeListener(\"error\", onerror), r.removeListener(\"end\", cleanup), r.removeListener(\"close\", cleanup), e.removeListener(\"close\", cleanup);\n }\n return r.on(\"error\", onerror), e.on(\"error\", onerror), r.on(\"end\", cleanup), r.on(\"close\", cleanup), e.on(\"close\", cleanup), e.emit(\"pipe\", r), e;\n };\n },\n 340: function () {},\n 345: function (e, t, r) {\n e.exports = r(7).EventEmitter;\n },\n 362: function (t) {\n t.exports = e;\n },\n 382: function (e, t, r) {\n var n = r(606),\n a = Object.keys || function (e) {\n var t = [];\n for (var r in e) t.push(r);\n return t;\n };\n e.exports = Duplex;\n var o = r(412),\n s = r(708);\n r(698)(Duplex, o);\n for (var l = a(s.prototype), i = 0; i < l.length; i++) {\n var c = l[i];\n Duplex.prototype[c] || (Duplex.prototype[c] = s.prototype[c]);\n }\n function Duplex(e) {\n if (!(this instanceof Duplex)) return new Duplex(e);\n o.call(this, e), s.call(this, e), this.allowHalfOpen = !0, e && (!1 === e.readable && (this.readable = !1), !1 === e.writable && (this.writable = !1), !1 === e.allowHalfOpen && (this.allowHalfOpen = !1, this.once(\"end\", onend)));\n }\n function onend() {\n this._writableState.ended || n.nextTick(onEndNT, this);\n }\n function onEndNT(e) {\n e.end();\n }\n Object.defineProperty(Duplex.prototype, \"writableHighWaterMark\", {\n enumerable: !1,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n }), Object.defineProperty(Duplex.prototype, \"writableBuffer\", {\n enumerable: !1,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n }), Object.defineProperty(Duplex.prototype, \"writableLength\", {\n enumerable: !1,\n get: function get() {\n return this._writableState.length;\n }\n }), Object.defineProperty(Duplex.prototype, \"destroyed\", {\n enumerable: !1,\n get: function get() {\n return void 0 !== this._readableState && void 0 !== this._writableState && this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(e) {\n void 0 !== this._readableState && void 0 !== this._writableState && (this._readableState.destroyed = e, this._writableState.destroyed = e);\n }\n });\n },\n 392: function (e, t, r) {\n var n = r(861).Buffer;\n function Hash(e, t) {\n this._block = n.alloc(e), this._finalSize = t, this._blockSize = e, this._len = 0;\n }\n Hash.prototype.update = function (e, t) {\n \"string\" == typeof e && (t = t || \"utf8\", e = n.from(e, t));\n for (var r = this._block, a = this._blockSize, o = e.length, s = this._len, l = 0; l < o;) {\n for (var i = s % a, c = Math.min(o - l, a - i), u = 0; u < c; u++) r[i + u] = e[l + u];\n l += c, (s += c) % a == 0 && this._update(r);\n }\n return this._len += o, this;\n }, Hash.prototype.digest = function (e) {\n var t = this._len % this._blockSize;\n this._block[t] = 128, this._block.fill(0, t + 1), t >= this._finalSize && (this._update(this._block), this._block.fill(0));\n var r = 8 * this._len;\n if (r <= 4294967295) this._block.writeUInt32BE(r, this._blockSize - 4);else {\n var n = (4294967295 & r) >>> 0,\n a = (r - n) / 4294967296;\n this._block.writeUInt32BE(a, this._blockSize - 8), this._block.writeUInt32BE(n, this._blockSize - 4);\n }\n this._update(this._block);\n var o = this._hash();\n return e ? o.toString(e) : o;\n }, Hash.prototype._update = function () {\n throw new Error(\"_update must be implemented by subclass\");\n }, e.exports = Hash;\n },\n 412: function (e, t, r) {\n var n,\n a = r(606);\n e.exports = Readable, Readable.ReadableState = ReadableState;\n r(7).EventEmitter;\n var o = function EElistenerCount(e, t) {\n return e.listeners(t).length;\n },\n s = r(345),\n l = r(287).Buffer,\n i = (void 0 !== r.g ? r.g : \"undefined\" != typeof window ? window : \"undefined\" != typeof self ? self : {}).Uint8Array || function () {};\n var c,\n u = r(838);\n c = u && u.debuglog ? u.debuglog(\"stream\") : function debug() {};\n var d,\n p,\n m,\n f = r(726),\n h = r(896),\n g = r(291).getHighWaterMark,\n y = r(48).F,\n S = y.ERR_INVALID_ARG_TYPE,\n _ = y.ERR_STREAM_PUSH_AFTER_EOF,\n v = y.ERR_METHOD_NOT_IMPLEMENTED,\n b = y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;\n r(698)(Readable, s);\n var w = h.errorOrDestroy,\n C = [\"error\", \"close\", \"destroy\", \"pause\", \"resume\"];\n function ReadableState(e, t, a) {\n n = n || r(382), e = e || {}, \"boolean\" != typeof a && (a = t instanceof n), this.objectMode = !!e.objectMode, a && (this.objectMode = this.objectMode || !!e.readableObjectMode), this.highWaterMark = g(this, e, \"readableHighWaterMark\", a), this.buffer = new f(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = !1 !== e.emitClose, this.autoDestroy = !!e.autoDestroy, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || \"utf8\", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, e.encoding && (d || (d = r(141).I), this.decoder = new d(e.encoding), this.encoding = e.encoding);\n }\n function Readable(e) {\n if (n = n || r(382), !(this instanceof Readable)) return new Readable(e);\n var t = this instanceof n;\n this._readableState = new ReadableState(e, this, t), this.readable = !0, e && (\"function\" == typeof e.read && (this._read = e.read), \"function\" == typeof e.destroy && (this._destroy = e.destroy)), s.call(this);\n }\n function readableAddChunk(e, t, r, n, a) {\n c(\"readableAddChunk\", t);\n var o,\n s = e._readableState;\n if (null === t) s.reading = !1, function onEofChunk(e, t) {\n if (c(\"onEofChunk\"), t.ended) return;\n if (t.decoder) {\n var r = t.decoder.end();\n r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length);\n }\n t.ended = !0, t.sync ? emitReadable(e) : (t.needReadable = !1, t.emittedReadable || (t.emittedReadable = !0, emitReadable_(e)));\n }(e, s);else if (a || (o = function chunkInvalid(e, t) {\n var r;\n (function _isUint8Array(e) {\n return l.isBuffer(e) || e instanceof i;\n })(t) || \"string\" == typeof t || void 0 === t || e.objectMode || (r = new S(\"chunk\", [\"string\", \"Buffer\", \"Uint8Array\"], t));\n return r;\n }(s, t)), o) w(e, o);else if (s.objectMode || t && t.length > 0) {\n if (\"string\" == typeof t || s.objectMode || Object.getPrototypeOf(t) === l.prototype || (t = function _uint8ArrayToBuffer(e) {\n return l.from(e);\n }(t)), n) s.endEmitted ? w(e, new b()) : addChunk(e, s, t, !0);else if (s.ended) w(e, new _());else {\n if (s.destroyed) return !1;\n s.reading = !1, s.decoder && !r ? (t = s.decoder.write(t), s.objectMode || 0 !== t.length ? addChunk(e, s, t, !1) : maybeReadMore(e, s)) : addChunk(e, s, t, !1);\n }\n } else n || (s.reading = !1, maybeReadMore(e, s));\n return !s.ended && (s.length < s.highWaterMark || 0 === s.length);\n }\n function addChunk(e, t, r, n) {\n t.flowing && 0 === t.length && !t.sync ? (t.awaitDrain = 0, e.emit(\"data\", r)) : (t.length += t.objectMode ? 1 : r.length, n ? t.buffer.unshift(r) : t.buffer.push(r), t.needReadable && emitReadable(e)), maybeReadMore(e, t);\n }\n Object.defineProperty(Readable.prototype, \"destroyed\", {\n enumerable: !1,\n get: function get() {\n return void 0 !== this._readableState && this._readableState.destroyed;\n },\n set: function set(e) {\n this._readableState && (this._readableState.destroyed = e);\n }\n }), Readable.prototype.destroy = h.destroy, Readable.prototype._undestroy = h.undestroy, Readable.prototype._destroy = function (e, t) {\n t(e);\n }, Readable.prototype.push = function (e, t) {\n var r,\n n = this._readableState;\n return n.objectMode ? r = !0 : \"string\" == typeof e && ((t = t || n.defaultEncoding) !== n.encoding && (e = l.from(e, t), t = \"\"), r = !0), readableAddChunk(this, e, t, !1, r);\n }, Readable.prototype.unshift = function (e) {\n return readableAddChunk(this, e, null, !0, !1);\n }, Readable.prototype.isPaused = function () {\n return !1 === this._readableState.flowing;\n }, Readable.prototype.setEncoding = function (e) {\n d || (d = r(141).I);\n var t = new d(e);\n this._readableState.decoder = t, this._readableState.encoding = this._readableState.decoder.encoding;\n for (var n = this._readableState.buffer.head, a = \"\"; null !== n;) a += t.write(n.data), n = n.next;\n return this._readableState.buffer.clear(), \"\" !== a && this._readableState.buffer.push(a), this._readableState.length = a.length, this;\n };\n var x = 1073741824;\n function howMuchToRead(e, t) {\n return e <= 0 || 0 === t.length && t.ended ? 0 : t.objectMode ? 1 : e != e ? t.flowing && t.length ? t.buffer.head.data.length : t.length : (e > t.highWaterMark && (t.highWaterMark = function computeNewHighWaterMark(e) {\n return e >= x ? e = x : (e--, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e++), e;\n }(e)), e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0, 0));\n }\n function emitReadable(e) {\n var t = e._readableState;\n c(\"emitReadable\", t.needReadable, t.emittedReadable), t.needReadable = !1, t.emittedReadable || (c(\"emitReadable\", t.flowing), t.emittedReadable = !0, a.nextTick(emitReadable_, e));\n }\n function emitReadable_(e) {\n var t = e._readableState;\n c(\"emitReadable_\", t.destroyed, t.length, t.ended), t.destroyed || !t.length && !t.ended || (e.emit(\"readable\"), t.emittedReadable = !1), t.needReadable = !t.flowing && !t.ended && t.length <= t.highWaterMark, flow(e);\n }\n function maybeReadMore(e, t) {\n t.readingMore || (t.readingMore = !0, a.nextTick(maybeReadMore_, e, t));\n }\n function maybeReadMore_(e, t) {\n for (; !t.reading && !t.ended && (t.length < t.highWaterMark || t.flowing && 0 === t.length);) {\n var r = t.length;\n if (c(\"maybeReadMore read 0\"), e.read(0), r === t.length) break;\n }\n t.readingMore = !1;\n }\n function updateReadableListening(e) {\n var t = e._readableState;\n t.readableListening = e.listenerCount(\"readable\") > 0, t.resumeScheduled && !t.paused ? t.flowing = !0 : e.listenerCount(\"data\") > 0 && e.resume();\n }\n function nReadingNextTick(e) {\n c(\"readable nexttick read 0\"), e.read(0);\n }\n function resume_(e, t) {\n c(\"resume\", t.reading), t.reading || e.read(0), t.resumeScheduled = !1, e.emit(\"resume\"), flow(e), t.flowing && !t.reading && e.read(0);\n }\n function flow(e) {\n var t = e._readableState;\n for (c(\"flow\", t.flowing); t.flowing && null !== e.read(););\n }\n function fromList(e, t) {\n return 0 === t.length ? null : (t.objectMode ? r = t.buffer.shift() : !e || e >= t.length ? (r = t.decoder ? t.buffer.join(\"\") : 1 === t.buffer.length ? t.buffer.first() : t.buffer.concat(t.length), t.buffer.clear()) : r = t.buffer.consume(e, t.decoder), r);\n var r;\n }\n function endReadable(e) {\n var t = e._readableState;\n c(\"endReadable\", t.endEmitted), t.endEmitted || (t.ended = !0, a.nextTick(endReadableNT, t, e));\n }\n function endReadableNT(e, t) {\n if (c(\"endReadableNT\", e.endEmitted, e.length), !e.endEmitted && 0 === e.length && (e.endEmitted = !0, t.readable = !1, t.emit(\"end\"), e.autoDestroy)) {\n var r = t._writableState;\n (!r || r.autoDestroy && r.finished) && t.destroy();\n }\n }\n function indexOf(e, t) {\n for (var r = 0, n = e.length; r < n; r++) if (e[r] === t) return r;\n return -1;\n }\n Readable.prototype.read = function (e) {\n c(\"read\", e), e = parseInt(e, 10);\n var t = this._readableState,\n r = e;\n if (0 !== e && (t.emittedReadable = !1), 0 === e && t.needReadable && ((0 !== t.highWaterMark ? t.length >= t.highWaterMark : t.length > 0) || t.ended)) return c(\"read: emitReadable\", t.length, t.ended), 0 === t.length && t.ended ? endReadable(this) : emitReadable(this), null;\n if (0 === (e = howMuchToRead(e, t)) && t.ended) return 0 === t.length && endReadable(this), null;\n var n,\n a = t.needReadable;\n return c(\"need readable\", a), (0 === t.length || t.length - e < t.highWaterMark) && c(\"length less than watermark\", a = !0), t.ended || t.reading ? c(\"reading or ended\", a = !1) : a && (c(\"do read\"), t.reading = !0, t.sync = !0, 0 === t.length && (t.needReadable = !0), this._read(t.highWaterMark), t.sync = !1, t.reading || (e = howMuchToRead(r, t))), null === (n = e > 0 ? fromList(e, t) : null) ? (t.needReadable = t.length <= t.highWaterMark, e = 0) : (t.length -= e, t.awaitDrain = 0), 0 === t.length && (t.ended || (t.needReadable = !0), r !== e && t.ended && endReadable(this)), null !== n && this.emit(\"data\", n), n;\n }, Readable.prototype._read = function (e) {\n w(this, new v(\"_read()\"));\n }, Readable.prototype.pipe = function (e, t) {\n var r = this,\n n = this._readableState;\n switch (n.pipesCount) {\n case 0:\n n.pipes = e;\n break;\n case 1:\n n.pipes = [n.pipes, e];\n break;\n default:\n n.pipes.push(e);\n }\n n.pipesCount += 1, c(\"pipe count=%d opts=%j\", n.pipesCount, t);\n var s = (!t || !1 !== t.end) && e !== a.stdout && e !== a.stderr ? onend : unpipe;\n function onunpipe(t, a) {\n c(\"onunpipe\"), t === r && a && !1 === a.hasUnpiped && (a.hasUnpiped = !0, function cleanup() {\n c(\"cleanup\"), e.removeListener(\"close\", onclose), e.removeListener(\"finish\", onfinish), e.removeListener(\"drain\", l), e.removeListener(\"error\", onerror), e.removeListener(\"unpipe\", onunpipe), r.removeListener(\"end\", onend), r.removeListener(\"end\", unpipe), r.removeListener(\"data\", ondata), i = !0, !n.awaitDrain || e._writableState && !e._writableState.needDrain || l();\n }());\n }\n function onend() {\n c(\"onend\"), e.end();\n }\n n.endEmitted ? a.nextTick(s) : r.once(\"end\", s), e.on(\"unpipe\", onunpipe);\n var l = function pipeOnDrain(e) {\n return function pipeOnDrainFunctionResult() {\n var t = e._readableState;\n c(\"pipeOnDrain\", t.awaitDrain), t.awaitDrain && t.awaitDrain--, 0 === t.awaitDrain && o(e, \"data\") && (t.flowing = !0, flow(e));\n };\n }(r);\n e.on(\"drain\", l);\n var i = !1;\n function ondata(t) {\n c(\"ondata\");\n var a = e.write(t);\n c(\"dest.write\", a), !1 === a && ((1 === n.pipesCount && n.pipes === e || n.pipesCount > 1 && -1 !== indexOf(n.pipes, e)) && !i && (c(\"false write response, pause\", n.awaitDrain), n.awaitDrain++), r.pause());\n }\n function onerror(t) {\n c(\"onerror\", t), unpipe(), e.removeListener(\"error\", onerror), 0 === o(e, \"error\") && w(e, t);\n }\n function onclose() {\n e.removeListener(\"finish\", onfinish), unpipe();\n }\n function onfinish() {\n c(\"onfinish\"), e.removeListener(\"close\", onclose), unpipe();\n }\n function unpipe() {\n c(\"unpipe\"), r.unpipe(e);\n }\n return r.on(\"data\", ondata), function prependListener(e, t, r) {\n if (\"function\" == typeof e.prependListener) return e.prependListener(t, r);\n e._events && e._events[t] ? Array.isArray(e._events[t]) ? e._events[t].unshift(r) : e._events[t] = [r, e._events[t]] : e.on(t, r);\n }(e, \"error\", onerror), e.once(\"close\", onclose), e.once(\"finish\", onfinish), e.emit(\"pipe\", r), n.flowing || (c(\"pipe resume\"), r.resume()), e;\n }, Readable.prototype.unpipe = function (e) {\n var t = this._readableState,\n r = {\n hasUnpiped: !1\n };\n if (0 === t.pipesCount) return this;\n if (1 === t.pipesCount) return e && e !== t.pipes || (e || (e = t.pipes), t.pipes = null, t.pipesCount = 0, t.flowing = !1, e && e.emit(\"unpipe\", this, r)), this;\n if (!e) {\n var n = t.pipes,\n a = t.pipesCount;\n t.pipes = null, t.pipesCount = 0, t.flowing = !1;\n for (var o = 0; o < a; o++) n[o].emit(\"unpipe\", this, {\n hasUnpiped: !1\n });\n return this;\n }\n var s = indexOf(t.pipes, e);\n return -1 === s || (t.pipes.splice(s, 1), t.pipesCount -= 1, 1 === t.pipesCount && (t.pipes = t.pipes[0]), e.emit(\"unpipe\", this, r)), this;\n }, Readable.prototype.on = function (e, t) {\n var r = s.prototype.on.call(this, e, t),\n n = this._readableState;\n return \"data\" === e ? (n.readableListening = this.listenerCount(\"readable\") > 0, !1 !== n.flowing && this.resume()) : \"readable\" === e && (n.endEmitted || n.readableListening || (n.readableListening = n.needReadable = !0, n.flowing = !1, n.emittedReadable = !1, c(\"on readable\", n.length, n.reading), n.length ? emitReadable(this) : n.reading || a.nextTick(nReadingNextTick, this))), r;\n }, Readable.prototype.addListener = Readable.prototype.on, Readable.prototype.removeListener = function (e, t) {\n var r = s.prototype.removeListener.call(this, e, t);\n return \"readable\" === e && a.nextTick(updateReadableListening, this), r;\n }, Readable.prototype.removeAllListeners = function (e) {\n var t = s.prototype.removeAllListeners.apply(this, arguments);\n return \"readable\" !== e && void 0 !== e || a.nextTick(updateReadableListening, this), t;\n }, Readable.prototype.resume = function () {\n var e = this._readableState;\n return e.flowing || (c(\"resume\"), e.flowing = !e.readableListening, function resume(e, t) {\n t.resumeScheduled || (t.resumeScheduled = !0, a.nextTick(resume_, e, t));\n }(this, e)), e.paused = !1, this;\n }, Readable.prototype.pause = function () {\n return c(\"call pause flowing=%j\", this._readableState.flowing), !1 !== this._readableState.flowing && (c(\"pause\"), this._readableState.flowing = !1, this.emit(\"pause\")), this._readableState.paused = !0, this;\n }, Readable.prototype.wrap = function (e) {\n var t = this,\n r = this._readableState,\n n = !1;\n for (var a in e.on(\"end\", function () {\n if (c(\"wrapped end\"), r.decoder && !r.ended) {\n var e = r.decoder.end();\n e && e.length && t.push(e);\n }\n t.push(null);\n }), e.on(\"data\", function (a) {\n (c(\"wrapped data\"), r.decoder && (a = r.decoder.write(a)), r.objectMode && null == a) || (r.objectMode || a && a.length) && (t.push(a) || (n = !0, e.pause()));\n }), e) void 0 === this[a] && \"function\" == typeof e[a] && (this[a] = function methodWrap(t) {\n return function methodWrapReturnFunction() {\n return e[t].apply(e, arguments);\n };\n }(a));\n for (var o = 0; o < C.length; o++) e.on(C[o], this.emit.bind(this, C[o]));\n return this._read = function (t) {\n c(\"wrapped _read\", t), n && (n = !1, e.resume());\n }, this;\n }, \"function\" == typeof Symbol && (Readable.prototype[Symbol.asyncIterator] = function () {\n return void 0 === p && (p = r(955)), p(this);\n }), Object.defineProperty(Readable.prototype, \"readableHighWaterMark\", {\n enumerable: !1,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n }), Object.defineProperty(Readable.prototype, \"readableBuffer\", {\n enumerable: !1,\n get: function get() {\n return this._readableState && this._readableState.buffer;\n }\n }), Object.defineProperty(Readable.prototype, \"readableFlowing\", {\n enumerable: !1,\n get: function get() {\n return this._readableState.flowing;\n },\n set: function set(e) {\n this._readableState && (this._readableState.flowing = e);\n }\n }), Readable._fromList = fromList, Object.defineProperty(Readable.prototype, \"readableLength\", {\n enumerable: !1,\n get: function get() {\n return this._readableState.length;\n }\n }), \"function\" == typeof Symbol && (Readable.from = function (e, t) {\n return void 0 === m && (m = r(157)), m(Readable, e, t);\n });\n },\n 499: function (e) {\n var t = {\n \"&\": \"&\",\n '\"': \""\",\n \"'\": \"'\",\n \"<\": \"<\",\n \">\": \">\"\n };\n e.exports = function escapeForXML(e) {\n return e && e.replace ? e.replace(/([&\"<>'])/g, function (e, r) {\n return t[r];\n }) : e;\n };\n },\n 600: function (e, t, r) {\n e.exports = PassThrough;\n var n = r(610);\n function PassThrough(e) {\n if (!(this instanceof PassThrough)) return new PassThrough(e);\n n.call(this, e);\n }\n r(698)(PassThrough, n), PassThrough.prototype._transform = function (e, t, r) {\n r(null, e);\n };\n },\n 606: function (e) {\n var t,\n r,\n n = e.exports = {};\n function defaultSetTimout() {\n throw new Error(\"setTimeout has not been defined\");\n }\n function defaultClearTimeout() {\n throw new Error(\"clearTimeout has not been defined\");\n }\n function runTimeout(e) {\n if (t === setTimeout) return setTimeout(e, 0);\n if ((t === defaultSetTimout || !t) && setTimeout) return t = setTimeout, setTimeout(e, 0);\n try {\n return t(e, 0);\n } catch (r) {\n try {\n return t.call(null, e, 0);\n } catch (r) {\n return t.call(this, e, 0);\n }\n }\n }\n !function () {\n try {\n t = \"function\" == typeof setTimeout ? setTimeout : defaultSetTimout;\n } catch (e) {\n t = defaultSetTimout;\n }\n try {\n r = \"function\" == typeof clearTimeout ? clearTimeout : defaultClearTimeout;\n } catch (e) {\n r = defaultClearTimeout;\n }\n }();\n var a,\n o = [],\n s = !1,\n l = -1;\n function cleanUpNextTick() {\n s && a && (s = !1, a.length ? o = a.concat(o) : l = -1, o.length && drainQueue());\n }\n function drainQueue() {\n if (!s) {\n var e = runTimeout(cleanUpNextTick);\n s = !0;\n for (var t = o.length; t;) {\n for (a = o, o = []; ++l < t;) a && a[l].run();\n l = -1, t = o.length;\n }\n a = null, s = !1, function runClearTimeout(e) {\n if (r === clearTimeout) return clearTimeout(e);\n if ((r === defaultClearTimeout || !r) && clearTimeout) return r = clearTimeout, clearTimeout(e);\n try {\n return r(e);\n } catch (t) {\n try {\n return r.call(null, e);\n } catch (t) {\n return r.call(this, e);\n }\n }\n }(e);\n }\n }\n function Item(e, t) {\n this.fun = e, this.array = t;\n }\n function noop() {}\n n.nextTick = function (e) {\n var t = new Array(arguments.length - 1);\n if (arguments.length > 1) for (var r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];\n o.push(new Item(e, t)), 1 !== o.length || s || runTimeout(drainQueue);\n }, Item.prototype.run = function () {\n this.fun.apply(null, this.array);\n }, n.title = \"browser\", n.browser = !0, n.env = {}, n.argv = [], n.version = \"\", n.versions = {}, n.on = noop, n.addListener = noop, n.once = noop, n.off = noop, n.removeListener = noop, n.removeAllListeners = noop, n.emit = noop, n.prependListener = noop, n.prependOnceListener = noop, n.listeners = function (e) {\n return [];\n }, n.binding = function (e) {\n throw new Error(\"process.binding is not supported\");\n }, n.cwd = function () {\n return \"/\";\n }, n.chdir = function (e) {\n throw new Error(\"process.chdir is not supported\");\n }, n.umask = function () {\n return 0;\n };\n },\n 610: function (e, t, r) {\n e.exports = Transform;\n var n = r(48).F,\n a = n.ERR_METHOD_NOT_IMPLEMENTED,\n o = n.ERR_MULTIPLE_CALLBACK,\n s = n.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n l = n.ERR_TRANSFORM_WITH_LENGTH_0,\n i = r(382);\n function afterTransform(e, t) {\n var r = this._transformState;\n r.transforming = !1;\n var n = r.writecb;\n if (null === n) return this.emit(\"error\", new o());\n r.writechunk = null, r.writecb = null, null != t && this.push(t), n(e);\n var a = this._readableState;\n a.reading = !1, (a.needReadable || a.length < a.highWaterMark) && this._read(a.highWaterMark);\n }\n function Transform(e) {\n if (!(this instanceof Transform)) return new Transform(e);\n i.call(this, e), this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: !1,\n transforming: !1,\n writecb: null,\n writechunk: null,\n writeencoding: null\n }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (\"function\" == typeof e.transform && (this._transform = e.transform), \"function\" == typeof e.flush && (this._flush = e.flush)), this.on(\"prefinish\", prefinish);\n }\n function prefinish() {\n var e = this;\n \"function\" != typeof this._flush || this._readableState.destroyed ? done(this, null, null) : this._flush(function (t, r) {\n done(e, t, r);\n });\n }\n function done(e, t, r) {\n if (t) return e.emit(\"error\", t);\n if (null != r && e.push(r), e._writableState.length) throw new l();\n if (e._transformState.transforming) throw new s();\n return e.push(null);\n }\n r(698)(Transform, i), Transform.prototype.push = function (e, t) {\n return this._transformState.needTransform = !1, i.prototype.push.call(this, e, t);\n }, Transform.prototype._transform = function (e, t, r) {\n r(new a(\"_transform()\"));\n }, Transform.prototype._write = function (e, t, r) {\n var n = this._transformState;\n if (n.writecb = r, n.writechunk = e, n.writeencoding = t, !n.transforming) {\n var a = this._readableState;\n (n.needTransform || a.needReadable || a.length < a.highWaterMark) && this._read(a.highWaterMark);\n }\n }, Transform.prototype._read = function (e) {\n var t = this._transformState;\n null === t.writechunk || t.transforming ? t.needTransform = !0 : (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform));\n }, Transform.prototype._destroy = function (e, t) {\n i.prototype._destroy.call(this, e, function (e) {\n t(e);\n });\n };\n },\n 643: function (e, t, r) {\n function config(e) {\n try {\n if (!r.g.localStorage) return !1;\n } catch (e) {\n return !1;\n }\n var t = r.g.localStorage[e];\n return null != t && \"true\" === String(t).toLowerCase();\n }\n e.exports = function deprecate(e, t) {\n if (config(\"noDeprecation\")) return e;\n var r = !1;\n return function deprecated() {\n if (!r) {\n if (config(\"throwDeprecation\")) throw new Error(t);\n config(\"traceDeprecation\") ? console.trace(t) : console.warn(t), r = !0;\n }\n return e.apply(this, arguments);\n };\n };\n },\n 698: function (e) {\n \"function\" == typeof Object.create ? e.exports = function inherits(e, t) {\n t && (e.super_ = t, e.prototype = Object.create(t.prototype, {\n constructor: {\n value: e,\n enumerable: !1,\n writable: !0,\n configurable: !0\n }\n }));\n } : e.exports = function inherits(e, t) {\n if (t) {\n e.super_ = t;\n var TempCtor = function () {};\n TempCtor.prototype = t.prototype, e.prototype = new TempCtor(), e.prototype.constructor = e;\n }\n };\n },\n 708: function (e, t, r) {\n var n,\n a = r(606);\n function CorkedRequest(e) {\n var t = this;\n this.next = null, this.entry = null, this.finish = function () {\n !function onCorkedFinish(e, t, r) {\n var n = e.entry;\n e.entry = null;\n for (; n;) {\n var a = n.callback;\n t.pendingcb--, a(r), n = n.next;\n }\n t.corkedRequestsFree.next = e;\n }(t, e);\n };\n }\n e.exports = Writable, Writable.WritableState = WritableState;\n var o = {\n deprecate: r(643)\n },\n s = r(345),\n l = r(287).Buffer,\n i = (void 0 !== r.g ? r.g : \"undefined\" != typeof window ? window : \"undefined\" != typeof self ? self : {}).Uint8Array || function () {};\n var c,\n u = r(896),\n d = r(291).getHighWaterMark,\n p = r(48).F,\n m = p.ERR_INVALID_ARG_TYPE,\n f = p.ERR_METHOD_NOT_IMPLEMENTED,\n h = p.ERR_MULTIPLE_CALLBACK,\n g = p.ERR_STREAM_CANNOT_PIPE,\n y = p.ERR_STREAM_DESTROYED,\n S = p.ERR_STREAM_NULL_VALUES,\n _ = p.ERR_STREAM_WRITE_AFTER_END,\n v = p.ERR_UNKNOWN_ENCODING,\n b = u.errorOrDestroy;\n function nop() {}\n function WritableState(e, t, o) {\n n = n || r(382), e = e || {}, \"boolean\" != typeof o && (o = t instanceof n), this.objectMode = !!e.objectMode, o && (this.objectMode = this.objectMode || !!e.writableObjectMode), this.highWaterMark = d(this, e, \"writableHighWaterMark\", o), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;\n var s = !1 === e.decodeStrings;\n this.decodeStrings = !s, this.defaultEncoding = e.defaultEncoding || \"utf8\", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function (e) {\n !function onwrite(e, t) {\n var r = e._writableState,\n n = r.sync,\n o = r.writecb;\n if (\"function\" != typeof o) throw new h();\n if (function onwriteStateUpdate(e) {\n e.writing = !1, e.writecb = null, e.length -= e.writelen, e.writelen = 0;\n }(r), t) !function onwriteError(e, t, r, n, o) {\n --t.pendingcb, r ? (a.nextTick(o, n), a.nextTick(finishMaybe, e, t), e._writableState.errorEmitted = !0, b(e, n)) : (o(n), e._writableState.errorEmitted = !0, b(e, n), finishMaybe(e, t));\n }(e, r, n, t, o);else {\n var s = needFinish(r) || e.destroyed;\n s || r.corked || r.bufferProcessing || !r.bufferedRequest || clearBuffer(e, r), n ? a.nextTick(afterWrite, e, r, s, o) : afterWrite(e, r, s, o);\n }\n }(t, e);\n }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = !1 !== e.emitClose, this.autoDestroy = !!e.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new CorkedRequest(this);\n }\n function Writable(e) {\n var t = this instanceof (n = n || r(382));\n if (!t && !c.call(Writable, this)) return new Writable(e);\n this._writableState = new WritableState(e, this, t), this.writable = !0, e && (\"function\" == typeof e.write && (this._write = e.write), \"function\" == typeof e.writev && (this._writev = e.writev), \"function\" == typeof e.destroy && (this._destroy = e.destroy), \"function\" == typeof e.final && (this._final = e.final)), s.call(this);\n }\n function doWrite(e, t, r, n, a, o, s) {\n t.writelen = n, t.writecb = s, t.writing = !0, t.sync = !0, t.destroyed ? t.onwrite(new y(\"write\")) : r ? e._writev(a, t.onwrite) : e._write(a, o, t.onwrite), t.sync = !1;\n }\n function afterWrite(e, t, r, n) {\n r || function onwriteDrain(e, t) {\n 0 === t.length && t.needDrain && (t.needDrain = !1, e.emit(\"drain\"));\n }(e, t), t.pendingcb--, n(), finishMaybe(e, t);\n }\n function clearBuffer(e, t) {\n t.bufferProcessing = !0;\n var r = t.bufferedRequest;\n if (e._writev && r && r.next) {\n var n = t.bufferedRequestCount,\n a = new Array(n),\n o = t.corkedRequestsFree;\n o.entry = r;\n for (var s = 0, l = !0; r;) a[s] = r, r.isBuf || (l = !1), r = r.next, s += 1;\n a.allBuffers = l, doWrite(e, t, !0, t.length, a, \"\", o.finish), t.pendingcb++, t.lastBufferedRequest = null, o.next ? (t.corkedRequestsFree = o.next, o.next = null) : t.corkedRequestsFree = new CorkedRequest(t), t.bufferedRequestCount = 0;\n } else {\n for (; r;) {\n var i = r.chunk,\n c = r.encoding,\n u = r.callback;\n if (doWrite(e, t, !1, t.objectMode ? 1 : i.length, i, c, u), r = r.next, t.bufferedRequestCount--, t.writing) break;\n }\n null === r && (t.lastBufferedRequest = null);\n }\n t.bufferedRequest = r, t.bufferProcessing = !1;\n }\n function needFinish(e) {\n return e.ending && 0 === e.length && null === e.bufferedRequest && !e.finished && !e.writing;\n }\n function callFinal(e, t) {\n e._final(function (r) {\n t.pendingcb--, r && b(e, r), t.prefinished = !0, e.emit(\"prefinish\"), finishMaybe(e, t);\n });\n }\n function finishMaybe(e, t) {\n var r = needFinish(t);\n if (r && (function prefinish(e, t) {\n t.prefinished || t.finalCalled || (\"function\" != typeof e._final || t.destroyed ? (t.prefinished = !0, e.emit(\"prefinish\")) : (t.pendingcb++, t.finalCalled = !0, a.nextTick(callFinal, e, t)));\n }(e, t), 0 === t.pendingcb && (t.finished = !0, e.emit(\"finish\"), t.autoDestroy))) {\n var n = e._readableState;\n (!n || n.autoDestroy && n.endEmitted) && e.destroy();\n }\n return r;\n }\n r(698)(Writable, s), WritableState.prototype.getBuffer = function getBuffer() {\n for (var e = this.bufferedRequest, t = []; e;) t.push(e), e = e.next;\n return t;\n }, function () {\n try {\n Object.defineProperty(WritableState.prototype, \"buffer\", {\n get: o.deprecate(function writableStateBufferGetter() {\n return this.getBuffer();\n }, \"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\", \"DEP0003\")\n });\n } catch (e) {}\n }(), \"function\" == typeof Symbol && Symbol.hasInstance && \"function\" == typeof Function.prototype[Symbol.hasInstance] ? (c = Function.prototype[Symbol.hasInstance], Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(e) {\n return !!c.call(this, e) || this === Writable && e && e._writableState instanceof WritableState;\n }\n })) : c = function realHasInstance(e) {\n return e instanceof this;\n }, Writable.prototype.pipe = function () {\n b(this, new g());\n }, Writable.prototype.write = function (e, t, r) {\n var n = this._writableState,\n o = !1,\n s = !n.objectMode && function _isUint8Array(e) {\n return l.isBuffer(e) || e instanceof i;\n }(e);\n return s && !l.isBuffer(e) && (e = function _uint8ArrayToBuffer(e) {\n return l.from(e);\n }(e)), \"function\" == typeof t && (r = t, t = null), s ? t = \"buffer\" : t || (t = n.defaultEncoding), \"function\" != typeof r && (r = nop), n.ending ? function writeAfterEnd(e, t) {\n var r = new _();\n b(e, r), a.nextTick(t, r);\n }(this, r) : (s || function validChunk(e, t, r, n) {\n var o;\n return null === r ? o = new S() : \"string\" == typeof r || t.objectMode || (o = new m(\"chunk\", [\"string\", \"Buffer\"], r)), !o || (b(e, o), a.nextTick(n, o), !1);\n }(this, n, e, r)) && (n.pendingcb++, o = function writeOrBuffer(e, t, r, n, a, o) {\n if (!r) {\n var s = function decodeChunk(e, t, r) {\n e.objectMode || !1 === e.decodeStrings || \"string\" != typeof t || (t = l.from(t, r));\n return t;\n }(t, n, a);\n n !== s && (r = !0, a = \"buffer\", n = s);\n }\n var i = t.objectMode ? 1 : n.length;\n t.length += i;\n var c = t.length < t.highWaterMark;\n c || (t.needDrain = !0);\n if (t.writing || t.corked) {\n var u = t.lastBufferedRequest;\n t.lastBufferedRequest = {\n chunk: n,\n encoding: a,\n isBuf: r,\n callback: o,\n next: null\n }, u ? u.next = t.lastBufferedRequest : t.bufferedRequest = t.lastBufferedRequest, t.bufferedRequestCount += 1;\n } else doWrite(e, t, !1, i, n, a, o);\n return c;\n }(this, n, s, e, t, r)), o;\n }, Writable.prototype.cork = function () {\n this._writableState.corked++;\n }, Writable.prototype.uncork = function () {\n var e = this._writableState;\n e.corked && (e.corked--, e.writing || e.corked || e.bufferProcessing || !e.bufferedRequest || clearBuffer(this, e));\n }, Writable.prototype.setDefaultEncoding = function setDefaultEncoding(e) {\n if (\"string\" == typeof e && (e = e.toLowerCase()), !([\"hex\", \"utf8\", \"utf-8\", \"ascii\", \"binary\", \"base64\", \"ucs2\", \"ucs-2\", \"utf16le\", \"utf-16le\", \"raw\"].indexOf((e + \"\").toLowerCase()) > -1)) throw new v(e);\n return this._writableState.defaultEncoding = e, this;\n }, Object.defineProperty(Writable.prototype, \"writableBuffer\", {\n enumerable: !1,\n get: function get() {\n return this._writableState && this._writableState.getBuffer();\n }\n }), Object.defineProperty(Writable.prototype, \"writableHighWaterMark\", {\n enumerable: !1,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n }), Writable.prototype._write = function (e, t, r) {\n r(new f(\"_write()\"));\n }, Writable.prototype._writev = null, Writable.prototype.end = function (e, t, r) {\n var n = this._writableState;\n return \"function\" == typeof e ? (r = e, e = null, t = null) : \"function\" == typeof t && (r = t, t = null), null != e && this.write(e, t), n.corked && (n.corked = 1, this.uncork()), n.ending || function endWritable(e, t, r) {\n t.ending = !0, finishMaybe(e, t), r && (t.finished ? a.nextTick(r) : e.once(\"finish\", r));\n t.ended = !0, e.writable = !1;\n }(this, n, r), this;\n }, Object.defineProperty(Writable.prototype, \"writableLength\", {\n enumerable: !1,\n get: function get() {\n return this._writableState.length;\n }\n }), Object.defineProperty(Writable.prototype, \"destroyed\", {\n enumerable: !1,\n get: function get() {\n return void 0 !== this._writableState && this._writableState.destroyed;\n },\n set: function set(e) {\n this._writableState && (this._writableState.destroyed = e);\n }\n }), Writable.prototype.destroy = u.destroy, Writable.prototype._undestroy = u.undestroy, Writable.prototype._destroy = function (e, t) {\n t(e);\n };\n },\n 710: function (e, t, r) {\n var n = r(698),\n a = r(107),\n o = r(392),\n s = r(861).Buffer,\n l = new Array(64);\n function Sha224() {\n this.init(), this._w = l, o.call(this, 64, 56);\n }\n n(Sha224, a), Sha224.prototype.init = function () {\n return this._a = 3238371032, this._b = 914150663, this._c = 812702999, this._d = 4144912697, this._e = 4290775857, this._f = 1750603025, this._g = 1694076839, this._h = 3204075428, this;\n }, Sha224.prototype._hash = function () {\n var e = s.allocUnsafe(28);\n return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e;\n }, e.exports = Sha224;\n },\n 726: function (e, t, r) {\n function ownKeys(e, t) {\n var r = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n t && (n = n.filter(function (t) {\n return Object.getOwnPropertyDescriptor(e, t).enumerable;\n })), r.push.apply(r, n);\n }\n return r;\n }\n function _objectSpread(e) {\n for (var t = 1; t < arguments.length; t++) {\n var r = null != arguments[t] ? arguments[t] : {};\n t % 2 ? ownKeys(Object(r), !0).forEach(function (t) {\n _defineProperty(e, t, r[t]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ownKeys(Object(r)).forEach(function (t) {\n Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));\n });\n }\n return e;\n }\n function _defineProperty(e, t, r) {\n return (t = _toPropertyKey(t)) in e ? Object.defineProperty(e, t, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = r, e;\n }\n function _defineProperties(e, t) {\n for (var r = 0; r < t.length; r++) {\n var n = t[r];\n n.enumerable = n.enumerable || !1, n.configurable = !0, \"value\" in n && (n.writable = !0), Object.defineProperty(e, _toPropertyKey(n.key), n);\n }\n }\n function _toPropertyKey(e) {\n var t = function _toPrimitive(e, t) {\n if (\"object\" != typeof e || null === e) return e;\n var r = e[Symbol.toPrimitive];\n if (void 0 !== r) {\n var n = r.call(e, t || \"default\");\n if (\"object\" != typeof n) return n;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === t ? String : Number)(e);\n }(e, \"string\");\n return \"symbol\" == typeof t ? t : String(t);\n }\n var n = r(287).Buffer,\n a = r(340).inspect,\n o = a && a.custom || \"inspect\";\n function copyBuffer(e, t, r) {\n n.prototype.copy.call(e, t, r);\n }\n e.exports = function () {\n function BufferList() {\n !function _classCallCheck(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, BufferList), this.head = null, this.tail = null, this.length = 0;\n }\n return function _createClass(e, t, r) {\n return t && _defineProperties(e.prototype, t), r && _defineProperties(e, r), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n }(BufferList, [{\n key: \"push\",\n value: function push(e) {\n var t = {\n data: e,\n next: null\n };\n this.length > 0 ? this.tail.next = t : this.head = t, this.tail = t, ++this.length;\n }\n }, {\n key: \"unshift\",\n value: function unshift(e) {\n var t = {\n data: e,\n next: this.head\n };\n 0 === this.length && (this.tail = t), this.head = t, ++this.length;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (0 !== this.length) {\n var e = this.head.data;\n return 1 === this.length ? this.head = this.tail = null : this.head = this.head.next, --this.length, e;\n }\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.head = this.tail = null, this.length = 0;\n }\n }, {\n key: \"join\",\n value: function join(e) {\n if (0 === this.length) return \"\";\n for (var t = this.head, r = \"\" + t.data; t = t.next;) r += e + t.data;\n return r;\n }\n }, {\n key: \"concat\",\n value: function concat(e) {\n if (0 === this.length) return n.alloc(0);\n for (var t = n.allocUnsafe(e >>> 0), r = this.head, a = 0; r;) copyBuffer(r.data, t, a), a += r.data.length, r = r.next;\n return t;\n }\n }, {\n key: \"consume\",\n value: function consume(e, t) {\n var r;\n return e < this.head.data.length ? (r = this.head.data.slice(0, e), this.head.data = this.head.data.slice(e)) : r = e === this.head.data.length ? this.shift() : t ? this._getString(e) : this._getBuffer(e), r;\n }\n }, {\n key: \"first\",\n value: function first() {\n return this.head.data;\n }\n }, {\n key: \"_getString\",\n value: function _getString(e) {\n var t = this.head,\n r = 1,\n n = t.data;\n for (e -= n.length; t = t.next;) {\n var a = t.data,\n o = e > a.length ? a.length : e;\n if (o === a.length ? n += a : n += a.slice(0, e), 0 === (e -= o)) {\n o === a.length ? (++r, t.next ? this.head = t.next : this.head = this.tail = null) : (this.head = t, t.data = a.slice(o));\n break;\n }\n ++r;\n }\n return this.length -= r, n;\n }\n }, {\n key: \"_getBuffer\",\n value: function _getBuffer(e) {\n var t = n.allocUnsafe(e),\n r = this.head,\n a = 1;\n for (r.data.copy(t), e -= r.data.length; r = r.next;) {\n var o = r.data,\n s = e > o.length ? o.length : e;\n if (o.copy(t, t.length - e, 0, s), 0 === (e -= s)) {\n s === o.length ? (++a, r.next ? this.head = r.next : this.head = this.tail = null) : (this.head = r, r.data = o.slice(s));\n break;\n }\n ++a;\n }\n return this.length -= a, t;\n }\n }, {\n key: o,\n value: function value(e, t) {\n return a(this, _objectSpread(_objectSpread({}, t), {}, {\n depth: 0,\n customInspect: !1\n }));\n }\n }]), BufferList;\n }();\n },\n 737: function (e, t, r) {\n var n = r(698),\n a = r(392),\n o = r(861).Buffer,\n s = [1518500249, 1859775393, -1894007588, -899497514],\n l = new Array(80);\n function Sha1() {\n this.init(), this._w = l, a.call(this, 64, 56);\n }\n function rotl5(e) {\n return e << 5 | e >>> 27;\n }\n function rotl30(e) {\n return e << 30 | e >>> 2;\n }\n function ft(e, t, r, n) {\n return 0 === e ? t & r | ~t & n : 2 === e ? t & r | t & n | r & n : t ^ r ^ n;\n }\n n(Sha1, a), Sha1.prototype.init = function () {\n return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;\n }, Sha1.prototype._update = function (e) {\n for (var t, r = this._w, n = 0 | this._a, a = 0 | this._b, o = 0 | this._c, l = 0 | this._d, i = 0 | this._e, c = 0; c < 16; ++c) r[c] = e.readInt32BE(4 * c);\n for (; c < 80; ++c) r[c] = (t = r[c - 3] ^ r[c - 8] ^ r[c - 14] ^ r[c - 16]) << 1 | t >>> 31;\n for (var u = 0; u < 80; ++u) {\n var d = ~~(u / 20),\n p = rotl5(n) + ft(d, a, o, l) + i + r[u] + s[d] | 0;\n i = l, l = o, o = rotl30(a), a = n, n = p;\n }\n this._a = n + this._a | 0, this._b = a + this._b | 0, this._c = o + this._c | 0, this._d = l + this._d | 0, this._e = i + this._e | 0;\n }, Sha1.prototype._hash = function () {\n var e = o.allocUnsafe(20);\n return e.writeInt32BE(0 | this._a, 0), e.writeInt32BE(0 | this._b, 4), e.writeInt32BE(0 | this._c, 8), e.writeInt32BE(0 | this._d, 12), e.writeInt32BE(0 | this._e, 16), e;\n }, e.exports = Sha1;\n },\n 758: function (e, t, r) {\n var n;\n var a = r(48).F,\n o = a.ERR_MISSING_ARGS,\n s = a.ERR_STREAM_DESTROYED;\n function noop(e) {\n if (e) throw e;\n }\n function call(e) {\n e();\n }\n function pipe(e, t) {\n return e.pipe(t);\n }\n e.exports = function pipeline() {\n for (var e = arguments.length, t = new Array(e), a = 0; a < e; a++) t[a] = arguments[a];\n var l,\n i = function popCallback(e) {\n return e.length ? \"function\" != typeof e[e.length - 1] ? noop : e.pop() : noop;\n }(t);\n if (Array.isArray(t[0]) && (t = t[0]), t.length < 2) throw new o(\"streams\");\n var c = t.map(function (e, a) {\n var o = a < t.length - 1;\n return function destroyer(e, t, a, o) {\n o = function once(e) {\n var t = !1;\n return function () {\n t || (t = !0, e.apply(void 0, arguments));\n };\n }(o);\n var l = !1;\n e.on(\"close\", function () {\n l = !0;\n }), void 0 === n && (n = r(238)), n(e, {\n readable: t,\n writable: a\n }, function (e) {\n if (e) return o(e);\n l = !0, o();\n });\n var i = !1;\n return function (t) {\n if (!l && !i) return i = !0, function isRequest(e) {\n return e.setHeader && \"function\" == typeof e.abort;\n }(e) ? e.abort() : \"function\" == typeof e.destroy ? e.destroy() : void o(t || new s(\"pipe\"));\n };\n }(e, o, a > 0, function (e) {\n l || (l = e), e && c.forEach(call), o || (c.forEach(call), i(l));\n });\n });\n return t.reduce(pipe);\n };\n },\n 802: function (e, t, r) {\n var n = e.exports = function SHA(e) {\n e = e.toLowerCase();\n var t = n[e];\n if (!t) throw new Error(e + \" is not supported (we accept pull requests)\");\n return new t();\n };\n n.sha = r(816), n.sha1 = r(737), n.sha224 = r(710), n.sha256 = r(107), n.sha384 = r(827), n.sha512 = r(890);\n },\n 816: function (e, t, r) {\n var n = r(698),\n a = r(392),\n o = r(861).Buffer,\n s = [1518500249, 1859775393, -1894007588, -899497514],\n l = new Array(80);\n function Sha() {\n this.init(), this._w = l, a.call(this, 64, 56);\n }\n function rotl30(e) {\n return e << 30 | e >>> 2;\n }\n function ft(e, t, r, n) {\n return 0 === e ? t & r | ~t & n : 2 === e ? t & r | t & n | r & n : t ^ r ^ n;\n }\n n(Sha, a), Sha.prototype.init = function () {\n return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;\n }, Sha.prototype._update = function (e) {\n for (var t, r = this._w, n = 0 | this._a, a = 0 | this._b, o = 0 | this._c, l = 0 | this._d, i = 0 | this._e, c = 0; c < 16; ++c) r[c] = e.readInt32BE(4 * c);\n for (; c < 80; ++c) r[c] = r[c - 3] ^ r[c - 8] ^ r[c - 14] ^ r[c - 16];\n for (var u = 0; u < 80; ++u) {\n var d = ~~(u / 20),\n p = 0 | ((t = n) << 5 | t >>> 27) + ft(d, a, o, l) + i + r[u] + s[d];\n i = l, l = o, o = rotl30(a), a = n, n = p;\n }\n this._a = n + this._a | 0, this._b = a + this._b | 0, this._c = o + this._c | 0, this._d = l + this._d | 0, this._e = i + this._e | 0;\n }, Sha.prototype._hash = function () {\n var e = o.allocUnsafe(20);\n return e.writeInt32BE(0 | this._a, 0), e.writeInt32BE(0 | this._b, 4), e.writeInt32BE(0 | this._c, 8), e.writeInt32BE(0 | this._d, 12), e.writeInt32BE(0 | this._e, 16), e;\n }, e.exports = Sha;\n },\n 827: function (e, t, r) {\n var n = r(698),\n a = r(890),\n o = r(392),\n s = r(861).Buffer,\n l = new Array(160);\n function Sha384() {\n this.init(), this._w = l, o.call(this, 128, 112);\n }\n n(Sha384, a), Sha384.prototype.init = function () {\n return this._ah = 3418070365, this._bh = 1654270250, this._ch = 2438529370, this._dh = 355462360, this._eh = 1731405415, this._fh = 2394180231, this._gh = 3675008525, this._hh = 1203062813, this._al = 3238371032, this._bl = 914150663, this._cl = 812702999, this._dl = 4144912697, this._el = 4290775857, this._fl = 1750603025, this._gl = 1694076839, this._hl = 3204075428, this;\n }, Sha384.prototype._hash = function () {\n var e = s.allocUnsafe(48);\n function writeInt64BE(t, r, n) {\n e.writeInt32BE(t, n), e.writeInt32BE(r, n + 4);\n }\n return writeInt64BE(this._ah, this._al, 0), writeInt64BE(this._bh, this._bl, 8), writeInt64BE(this._ch, this._cl, 16), writeInt64BE(this._dh, this._dl, 24), writeInt64BE(this._eh, this._el, 32), writeInt64BE(this._fh, this._fl, 40), e;\n }, e.exports = Sha384;\n },\n 838: function () {},\n 861: function (e, t, r) {\n var n = r(287),\n a = n.Buffer;\n function copyProps(e, t) {\n for (var r in e) t[r] = e[r];\n }\n function SafeBuffer(e, t, r) {\n return a(e, t, r);\n }\n a.from && a.alloc && a.allocUnsafe && a.allocUnsafeSlow ? e.exports = n : (copyProps(n, t), t.Buffer = SafeBuffer), SafeBuffer.prototype = Object.create(a.prototype), copyProps(a, SafeBuffer), SafeBuffer.from = function (e, t, r) {\n if (\"number\" == typeof e) throw new TypeError(\"Argument must not be a number\");\n return a(e, t, r);\n }, SafeBuffer.alloc = function (e, t, r) {\n if (\"number\" != typeof e) throw new TypeError(\"Argument must be a number\");\n var n = a(e);\n return void 0 !== t ? \"string\" == typeof r ? n.fill(t, r) : n.fill(t) : n.fill(0), n;\n }, SafeBuffer.allocUnsafe = function (e) {\n if (\"number\" != typeof e) throw new TypeError(\"Argument must be a number\");\n return a(e);\n }, SafeBuffer.allocUnsafeSlow = function (e) {\n if (\"number\" != typeof e) throw new TypeError(\"Argument must be a number\");\n return n.SlowBuffer(e);\n };\n },\n 890: function (e, t, r) {\n var n = r(698),\n a = r(392),\n o = r(861).Buffer,\n s = [1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591],\n l = new Array(160);\n function Sha512() {\n this.init(), this._w = l, a.call(this, 128, 112);\n }\n function Ch(e, t, r) {\n return r ^ e & (t ^ r);\n }\n function maj(e, t, r) {\n return e & t | r & (e | t);\n }\n function sigma0(e, t) {\n return (e >>> 28 | t << 4) ^ (t >>> 2 | e << 30) ^ (t >>> 7 | e << 25);\n }\n function sigma1(e, t) {\n return (e >>> 14 | t << 18) ^ (e >>> 18 | t << 14) ^ (t >>> 9 | e << 23);\n }\n function Gamma0(e, t) {\n return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ e >>> 7;\n }\n function Gamma0l(e, t) {\n return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ (e >>> 7 | t << 25);\n }\n function Gamma1(e, t) {\n return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ e >>> 6;\n }\n function Gamma1l(e, t) {\n return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ (e >>> 6 | t << 26);\n }\n function getCarry(e, t) {\n return e >>> 0 < t >>> 0 ? 1 : 0;\n }\n n(Sha512, a), Sha512.prototype.init = function () {\n return this._ah = 1779033703, this._bh = 3144134277, this._ch = 1013904242, this._dh = 2773480762, this._eh = 1359893119, this._fh = 2600822924, this._gh = 528734635, this._hh = 1541459225, this._al = 4089235720, this._bl = 2227873595, this._cl = 4271175723, this._dl = 1595750129, this._el = 2917565137, this._fl = 725511199, this._gl = 4215389547, this._hl = 327033209, this;\n }, Sha512.prototype._update = function (e) {\n for (var t = this._w, r = 0 | this._ah, n = 0 | this._bh, a = 0 | this._ch, o = 0 | this._dh, l = 0 | this._eh, i = 0 | this._fh, c = 0 | this._gh, u = 0 | this._hh, d = 0 | this._al, p = 0 | this._bl, m = 0 | this._cl, f = 0 | this._dl, h = 0 | this._el, g = 0 | this._fl, y = 0 | this._gl, S = 0 | this._hl, _ = 0; _ < 32; _ += 2) t[_] = e.readInt32BE(4 * _), t[_ + 1] = e.readInt32BE(4 * _ + 4);\n for (; _ < 160; _ += 2) {\n var v = t[_ - 30],\n b = t[_ - 30 + 1],\n w = Gamma0(v, b),\n C = Gamma0l(b, v),\n x = Gamma1(v = t[_ - 4], b = t[_ - 4 + 1]),\n O = Gamma1l(b, v),\n k = t[_ - 14],\n N = t[_ - 14 + 1],\n A = t[_ - 32],\n I = t[_ - 32 + 1],\n R = C + N | 0,\n T = w + k + getCarry(R, C) | 0;\n T = (T = T + x + getCarry(R = R + O | 0, O) | 0) + A + getCarry(R = R + I | 0, I) | 0, t[_] = T, t[_ + 1] = R;\n }\n for (var B = 0; B < 160; B += 2) {\n T = t[B], R = t[B + 1];\n var j = maj(r, n, a),\n P = maj(d, p, m),\n M = sigma0(r, d),\n q = sigma0(d, r),\n L = sigma1(l, h),\n D = sigma1(h, l),\n U = s[B],\n $ = s[B + 1],\n J = Ch(l, i, c),\n V = Ch(h, g, y),\n K = S + D | 0,\n z = u + L + getCarry(K, S) | 0;\n z = (z = (z = z + J + getCarry(K = K + V | 0, V) | 0) + U + getCarry(K = K + $ | 0, $) | 0) + T + getCarry(K = K + R | 0, R) | 0;\n var F = q + P | 0,\n W = M + j + getCarry(F, q) | 0;\n u = c, S = y, c = i, y = g, i = l, g = h, l = o + z + getCarry(h = f + K | 0, f) | 0, o = a, f = m, a = n, m = p, n = r, p = d, r = z + W + getCarry(d = K + F | 0, K) | 0;\n }\n this._al = this._al + d | 0, this._bl = this._bl + p | 0, this._cl = this._cl + m | 0, this._dl = this._dl + f | 0, this._el = this._el + h | 0, this._fl = this._fl + g | 0, this._gl = this._gl + y | 0, this._hl = this._hl + S | 0, this._ah = this._ah + r + getCarry(this._al, d) | 0, this._bh = this._bh + n + getCarry(this._bl, p) | 0, this._ch = this._ch + a + getCarry(this._cl, m) | 0, this._dh = this._dh + o + getCarry(this._dl, f) | 0, this._eh = this._eh + l + getCarry(this._el, h) | 0, this._fh = this._fh + i + getCarry(this._fl, g) | 0, this._gh = this._gh + c + getCarry(this._gl, y) | 0, this._hh = this._hh + u + getCarry(this._hl, S) | 0;\n }, Sha512.prototype._hash = function () {\n var e = o.allocUnsafe(64);\n function writeInt64BE(t, r, n) {\n e.writeInt32BE(t, n), e.writeInt32BE(r, n + 4);\n }\n return writeInt64BE(this._ah, this._al, 0), writeInt64BE(this._bh, this._bl, 8), writeInt64BE(this._ch, this._cl, 16), writeInt64BE(this._dh, this._dl, 24), writeInt64BE(this._eh, this._el, 32), writeInt64BE(this._fh, this._fl, 40), writeInt64BE(this._gh, this._gl, 48), writeInt64BE(this._hh, this._hl, 56), e;\n }, e.exports = Sha512;\n },\n 896: function (e, t, r) {\n var n = r(606);\n function emitErrorAndCloseNT(e, t) {\n emitErrorNT(e, t), emitCloseNT(e);\n }\n function emitCloseNT(e) {\n e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit(\"close\");\n }\n function emitErrorNT(e, t) {\n e.emit(\"error\", t);\n }\n e.exports = {\n destroy: function destroy(e, t) {\n var r = this,\n a = this._readableState && this._readableState.destroyed,\n o = this._writableState && this._writableState.destroyed;\n return a || o ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, n.nextTick(emitErrorNT, this, e)) : n.nextTick(emitErrorNT, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function (e) {\n !t && e ? r._writableState ? r._writableState.errorEmitted ? n.nextTick(emitCloseNT, r) : (r._writableState.errorEmitted = !0, n.nextTick(emitErrorAndCloseNT, r, e)) : n.nextTick(emitErrorAndCloseNT, r, e) : t ? (n.nextTick(emitCloseNT, r), t(e)) : n.nextTick(emitCloseNT, r);\n }), this);\n },\n undestroy: function undestroy() {\n this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);\n },\n errorOrDestroy: function errorOrDestroy(e, t) {\n var r = e._readableState,\n n = e._writableState;\n r && r.autoDestroy || n && n.autoDestroy ? e.destroy(t) : e.emit(\"error\", t);\n }\n };\n },\n 919: function (e, t, r) {\n var n = r(287).Buffer;\n function isSpecificValue(e) {\n return e instanceof n || e instanceof Date || e instanceof RegExp;\n }\n function cloneSpecificValue(e) {\n if (e instanceof n) {\n var t = n.alloc ? n.alloc(e.length) : new n(e.length);\n return e.copy(t), t;\n }\n if (e instanceof Date) return new Date(e.getTime());\n if (e instanceof RegExp) return new RegExp(e);\n throw new Error(\"Unexpected situation\");\n }\n function deepCloneArray(e) {\n var t = [];\n return e.forEach(function (e, r) {\n \"object\" == typeof e && null !== e ? Array.isArray(e) ? t[r] = deepCloneArray(e) : isSpecificValue(e) ? t[r] = cloneSpecificValue(e) : t[r] = a({}, e) : t[r] = e;\n }), t;\n }\n function safeGetProperty(e, t) {\n return \"__proto__\" === t ? void 0 : e[t];\n }\n var a = e.exports = function () {\n if (arguments.length < 1 || \"object\" != typeof arguments[0]) return !1;\n if (arguments.length < 2) return arguments[0];\n var e,\n t,\n r = arguments[0];\n return Array.prototype.slice.call(arguments, 1).forEach(function (n) {\n \"object\" != typeof n || null === n || Array.isArray(n) || Object.keys(n).forEach(function (o) {\n return t = safeGetProperty(r, o), (e = safeGetProperty(n, o)) === r ? void 0 : \"object\" != typeof e || null === e ? void (r[o] = e) : Array.isArray(e) ? void (r[o] = deepCloneArray(e)) : isSpecificValue(e) ? void (r[o] = cloneSpecificValue(e)) : \"object\" != typeof t || null === t || Array.isArray(t) ? void (r[o] = a({}, e)) : void (r[o] = a(t, e));\n });\n }), r;\n };\n },\n 955: function (e, t, r) {\n var n,\n a = r(606);\n function _defineProperty(e, t, r) {\n return (t = function _toPropertyKey(e) {\n var t = function _toPrimitive(e, t) {\n if (\"object\" != typeof e || null === e) return e;\n var r = e[Symbol.toPrimitive];\n if (void 0 !== r) {\n var n = r.call(e, t || \"default\");\n if (\"object\" != typeof n) return n;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === t ? String : Number)(e);\n }(e, \"string\");\n return \"symbol\" == typeof t ? t : String(t);\n }(t)) in e ? Object.defineProperty(e, t, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = r, e;\n }\n var o = r(238),\n s = Symbol(\"lastResolve\"),\n l = Symbol(\"lastReject\"),\n i = Symbol(\"error\"),\n c = Symbol(\"ended\"),\n u = Symbol(\"lastPromise\"),\n d = Symbol(\"handlePromise\"),\n p = Symbol(\"stream\");\n function createIterResult(e, t) {\n return {\n value: e,\n done: t\n };\n }\n function readAndResolve(e) {\n var t = e[s];\n if (null !== t) {\n var r = e[p].read();\n null !== r && (e[u] = null, e[s] = null, e[l] = null, t(createIterResult(r, !1)));\n }\n }\n function onReadable(e) {\n a.nextTick(readAndResolve, e);\n }\n var m = Object.getPrototypeOf(function () {}),\n f = Object.setPrototypeOf((_defineProperty(n = {\n get stream() {\n return this[p];\n },\n next: function next() {\n var e = this,\n t = this[i];\n if (null !== t) return Promise.reject(t);\n if (this[c]) return Promise.resolve(createIterResult(void 0, !0));\n if (this[p].destroyed) return new Promise(function (t, r) {\n a.nextTick(function () {\n e[i] ? r(e[i]) : t(createIterResult(void 0, !0));\n });\n });\n var r,\n n = this[u];\n if (n) r = new Promise(function wrapForNext(e, t) {\n return function (r, n) {\n e.then(function () {\n t[c] ? r(createIterResult(void 0, !0)) : t[d](r, n);\n }, n);\n };\n }(n, this));else {\n var o = this[p].read();\n if (null !== o) return Promise.resolve(createIterResult(o, !1));\n r = new Promise(this[d]);\n }\n return this[u] = r, r;\n }\n }, Symbol.asyncIterator, function () {\n return this;\n }), _defineProperty(n, \"return\", function _return() {\n var e = this;\n return new Promise(function (t, r) {\n e[p].destroy(null, function (e) {\n e ? r(e) : t(createIterResult(void 0, !0));\n });\n });\n }), n), m);\n e.exports = function createReadableStreamAsyncIterator(e) {\n var t,\n r = Object.create(f, (_defineProperty(t = {}, p, {\n value: e,\n writable: !0\n }), _defineProperty(t, s, {\n value: null,\n writable: !0\n }), _defineProperty(t, l, {\n value: null,\n writable: !0\n }), _defineProperty(t, i, {\n value: null,\n writable: !0\n }), _defineProperty(t, c, {\n value: e._readableState.endEmitted,\n writable: !0\n }), _defineProperty(t, d, {\n value: function value(e, t) {\n var n = r[p].read();\n n ? (r[u] = null, r[s] = null, r[l] = null, e(createIterResult(n, !1))) : (r[s] = e, r[l] = t);\n },\n writable: !0\n }), t));\n return r[u] = null, o(e, function (e) {\n if (e && \"ERR_STREAM_PREMATURE_CLOSE\" !== e.code) {\n var t = r[l];\n return null !== t && (r[u] = null, r[s] = null, r[l] = null, t(e)), void (r[i] = e);\n }\n var n = r[s];\n null !== n && (r[u] = null, r[s] = null, r[l] = null, n(createIterResult(void 0, !0))), r[c] = !0;\n }), e.on(\"readable\", onReadable.bind(null, r)), r;\n };\n },\n 987: function (e) {\n e.exports = t;\n }\n },\n xe = {};\nfunction __webpack_require__(e) {\n var t = xe[e];\n if (void 0 !== t) return t.exports;\n var r = xe[e] = {\n exports: {}\n };\n return Ce[e](r, r.exports, __webpack_require__), r.exports;\n}\n__webpack_require__.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e.default;\n } : function () {\n return e;\n };\n return __webpack_require__.d(t, {\n a: t\n }), t;\n}, __webpack_require__.d = function (e, t) {\n for (var r in t) __webpack_require__.o(t, r) && !__webpack_require__.o(e, r) && Object.defineProperty(e, r, {\n enumerable: !0,\n get: t[r]\n });\n}, __webpack_require__.g = function () {\n if (\"object\" == typeof globalThis) return globalThis;\n try {\n return this || new Function(\"return this\")();\n } catch (e) {\n if (\"object\" == typeof window) return window;\n }\n}(), __webpack_require__.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n}, __webpack_require__.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n};\nvar Oe = {};\n__webpack_require__.d(Oe, {\n A: function () {\n return nl;\n }\n});\nvar ke = {};\n__webpack_require__.r(ke), __webpack_require__.d(ke, {\n CLEAR: function () {\n return ct;\n },\n CLEAR_BY: function () {\n return ut;\n },\n NEW_AUTH_ERR: function () {\n return it;\n },\n NEW_SPEC_ERR: function () {\n return st;\n },\n NEW_SPEC_ERR_BATCH: function () {\n return lt;\n },\n NEW_THROWN_ERR: function () {\n return at;\n },\n NEW_THROWN_ERR_BATCH: function () {\n return ot;\n },\n clear: function () {\n return clear;\n },\n clearBy: function () {\n return clearBy;\n },\n newAuthErr: function () {\n return newAuthErr;\n },\n newSpecErr: function () {\n return newSpecErr;\n },\n newSpecErrBatch: function () {\n return newSpecErrBatch;\n },\n newThrownErr: function () {\n return newThrownErr;\n },\n newThrownErrBatch: function () {\n return newThrownErrBatch;\n }\n});\nvar Ne = {};\n__webpack_require__.r(Ne), __webpack_require__.d(Ne, {\n AUTHORIZE: function () {\n return Rt;\n },\n AUTHORIZE_OAUTH2: function () {\n return jt;\n },\n CONFIGURE_AUTH: function () {\n return Mt;\n },\n LOGOUT: function () {\n return Tt;\n },\n PRE_AUTHORIZE_OAUTH2: function () {\n return Bt;\n },\n RESTORE_AUTHORIZATION: function () {\n return qt;\n },\n SHOW_AUTH_POPUP: function () {\n return It;\n },\n VALIDATE: function () {\n return Pt;\n },\n authPopup: function () {\n return authPopup;\n },\n authorize: function () {\n return authorize;\n },\n authorizeAccessCodeWithBasicAuthentication: function () {\n return authorizeAccessCodeWithBasicAuthentication;\n },\n authorizeAccessCodeWithFormParams: function () {\n return authorizeAccessCodeWithFormParams;\n },\n authorizeApplication: function () {\n return authorizeApplication;\n },\n authorizeOauth2: function () {\n return authorizeOauth2;\n },\n authorizeOauth2WithPersistOption: function () {\n return authorizeOauth2WithPersistOption;\n },\n authorizePassword: function () {\n return authorizePassword;\n },\n authorizeRequest: function () {\n return authorizeRequest;\n },\n authorizeWithPersistOption: function () {\n return authorizeWithPersistOption;\n },\n configureAuth: function () {\n return configureAuth;\n },\n logout: function () {\n return logout;\n },\n logoutWithPersistOption: function () {\n return logoutWithPersistOption;\n },\n persistAuthorizationIfNeeded: function () {\n return persistAuthorizationIfNeeded;\n },\n preAuthorizeImplicit: function () {\n return preAuthorizeImplicit;\n },\n restoreAuthorization: function () {\n return restoreAuthorization;\n },\n showDefinitions: function () {\n return showDefinitions;\n }\n});\nvar Ae = {};\n__webpack_require__.r(Ae), __webpack_require__.d(Ae, {\n authorized: function () {\n return Jt;\n },\n definitionsForRequirements: function () {\n return definitionsForRequirements;\n },\n definitionsToAuthorize: function () {\n return $t;\n },\n getConfigs: function () {\n return Vt;\n },\n getDefinitionsByNames: function () {\n return getDefinitionsByNames;\n },\n isAuthorized: function () {\n return isAuthorized;\n },\n shownDefinitions: function () {\n return Ut;\n }\n});\nvar Ie = {};\n__webpack_require__.r(Ie), __webpack_require__.d(Ie, {\n TOGGLE_CONFIGS: function () {\n return Xt;\n },\n UPDATE_CONFIGS: function () {\n return Gt;\n },\n downloadConfig: function () {\n return downloadConfig;\n },\n getConfigByUrl: function () {\n return getConfigByUrl;\n },\n loaded: function () {\n return actions_loaded;\n },\n toggle: function () {\n return toggle;\n },\n update: function () {\n return update;\n }\n});\nvar Re = {};\n__webpack_require__.r(Re), __webpack_require__.d(Re, {\n get: function () {\n return get;\n }\n});\nvar Te = {};\n__webpack_require__.r(Te), __webpack_require__.d(Te, {\n transform: function () {\n return transform;\n }\n});\nvar Be = {};\n__webpack_require__.r(Be), __webpack_require__.d(Be, {\n transform: function () {\n return parameter_oneof_transform;\n }\n});\nvar je = {};\n__webpack_require__.r(je), __webpack_require__.d(je, {\n allErrors: function () {\n return lr;\n },\n lastError: function () {\n return ir;\n }\n});\nvar Pe = {};\n__webpack_require__.r(Pe), __webpack_require__.d(Pe, {\n SHOW: function () {\n return mr;\n },\n UPDATE_FILTER: function () {\n return dr;\n },\n UPDATE_LAYOUT: function () {\n return ur;\n },\n UPDATE_MODE: function () {\n return pr;\n },\n changeMode: function () {\n return changeMode;\n },\n show: function () {\n return actions_show;\n },\n updateFilter: function () {\n return updateFilter;\n },\n updateLayout: function () {\n return updateLayout;\n }\n});\nvar Me = {};\n__webpack_require__.r(Me), __webpack_require__.d(Me, {\n current: function () {\n return current;\n },\n currentFilter: function () {\n return currentFilter;\n },\n isShown: function () {\n return isShown;\n },\n showSummary: function () {\n return hr;\n },\n whatMode: function () {\n return whatMode;\n }\n});\nvar qe = {};\n__webpack_require__.r(qe), __webpack_require__.d(qe, {\n taggedOperations: function () {\n return taggedOperations;\n }\n});\nvar Le = {};\n__webpack_require__.r(Le), __webpack_require__.d(Le, {\n requestSnippetGenerator_curl_bash: function () {\n return requestSnippetGenerator_curl_bash;\n },\n requestSnippetGenerator_curl_cmd: function () {\n return requestSnippetGenerator_curl_cmd;\n },\n requestSnippetGenerator_curl_powershell: function () {\n return requestSnippetGenerator_curl_powershell;\n }\n});\nvar De = {};\n__webpack_require__.r(De), __webpack_require__.d(De, {\n getActiveLanguage: function () {\n return Er;\n },\n getDefaultExpanded: function () {\n return Sr;\n },\n getGenerators: function () {\n return yr;\n },\n getSnippetGenerators: function () {\n return getSnippetGenerators;\n }\n});\nvar Ue = {};\n__webpack_require__.r(Ue), __webpack_require__.d(Ue, {\n JsonSchemaArrayItemFile: function () {\n return JsonSchemaArrayItemFile;\n },\n JsonSchemaArrayItemText: function () {\n return JsonSchemaArrayItemText;\n },\n JsonSchemaForm: function () {\n return JsonSchemaForm;\n },\n JsonSchema_array: function () {\n return JsonSchema_array;\n },\n JsonSchema_boolean: function () {\n return JsonSchema_boolean;\n },\n JsonSchema_object: function () {\n return JsonSchema_object;\n },\n JsonSchema_string: function () {\n return JsonSchema_string;\n }\n});\nvar $e = {};\n__webpack_require__.r($e), __webpack_require__.d($e, {\n allowTryItOutFor: function () {\n return allowTryItOutFor;\n },\n basePath: function () {\n return pn;\n },\n canExecuteScheme: function () {\n return canExecuteScheme;\n },\n consumes: function () {\n return sn;\n },\n consumesOptionsFor: function () {\n return consumesOptionsFor;\n },\n contentTypeValues: function () {\n return contentTypeValues;\n },\n currentProducesFor: function () {\n return currentProducesFor;\n },\n definitions: function () {\n return dn;\n },\n externalDocs: function () {\n return en;\n },\n findDefinition: function () {\n return findDefinition;\n },\n getOAS3RequiredRequestBodyContentType: function () {\n return getOAS3RequiredRequestBodyContentType;\n },\n getParameter: function () {\n return getParameter;\n },\n hasHost: function () {\n return vn;\n },\n host: function () {\n return mn;\n },\n info: function () {\n return Zr;\n },\n isMediaTypeSchemaPropertiesEqual: function () {\n return isMediaTypeSchemaPropertiesEqual;\n },\n isOAS3: function () {\n return Qr;\n },\n lastError: function () {\n return Kr;\n },\n mutatedRequestFor: function () {\n return mutatedRequestFor;\n },\n mutatedRequests: function () {\n return _n;\n },\n operationScheme: function () {\n return operationScheme;\n },\n operationWithMeta: function () {\n return operationWithMeta;\n },\n operations: function () {\n return on;\n },\n operationsWithRootInherited: function () {\n return hn;\n },\n operationsWithTags: function () {\n return yn;\n },\n parameterInclusionSettingFor: function () {\n return parameterInclusionSettingFor;\n },\n parameterValues: function () {\n return parameterValues;\n },\n parameterWithMeta: function () {\n return parameterWithMeta;\n },\n parameterWithMetaByIdentity: function () {\n return parameterWithMetaByIdentity;\n },\n parametersIncludeIn: function () {\n return parametersIncludeIn;\n },\n parametersIncludeType: function () {\n return parametersIncludeType;\n },\n paths: function () {\n return nn;\n },\n produces: function () {\n return ln;\n },\n producesOptionsFor: function () {\n return producesOptionsFor;\n },\n requestFor: function () {\n return requestFor;\n },\n requests: function () {\n return Sn;\n },\n responseFor: function () {\n return responseFor;\n },\n responses: function () {\n return En;\n },\n schemes: function () {\n return fn;\n },\n security: function () {\n return cn;\n },\n securityDefinitions: function () {\n return un;\n },\n semver: function () {\n return rn;\n },\n spec: function () {\n return spec;\n },\n specJS: function () {\n return Gr;\n },\n specJson: function () {\n return Hr;\n },\n specJsonWithResolvedSubtrees: function () {\n return Yr;\n },\n specResolved: function () {\n return Xr;\n },\n specResolvedSubtree: function () {\n return specResolvedSubtree;\n },\n specSource: function () {\n return Wr;\n },\n specStr: function () {\n return Fr;\n },\n tagDetails: function () {\n return tagDetails;\n },\n taggedOperations: function () {\n return selectors_taggedOperations;\n },\n tags: function () {\n return gn;\n },\n url: function () {\n return zr;\n },\n validOperationMethods: function () {\n return an;\n },\n validateBeforeExecute: function () {\n return validateBeforeExecute;\n },\n validationErrors: function () {\n return validationErrors;\n },\n version: function () {\n return tn;\n }\n});\nvar Je = {};\n__webpack_require__.r(Je), __webpack_require__.d(Je, {\n CLEAR_REQUEST: function () {\n return qn;\n },\n CLEAR_RESPONSE: function () {\n return Mn;\n },\n CLEAR_VALIDATE_PARAMS: function () {\n return Ln;\n },\n LOG_REQUEST: function () {\n return Pn;\n },\n SET_MUTATED_REQUEST: function () {\n return jn;\n },\n SET_REQUEST: function () {\n return Bn;\n },\n SET_RESPONSE: function () {\n return Tn;\n },\n SET_SCHEME: function () {\n return Jn;\n },\n UPDATE_EMPTY_PARAM_INCLUSION: function () {\n return In;\n },\n UPDATE_JSON: function () {\n return Nn;\n },\n UPDATE_OPERATION_META_VALUE: function () {\n return Dn;\n },\n UPDATE_PARAM: function () {\n return An;\n },\n UPDATE_RESOLVED: function () {\n return Un;\n },\n UPDATE_RESOLVED_SUBTREE: function () {\n return $n;\n },\n UPDATE_SPEC: function () {\n return On;\n },\n UPDATE_URL: function () {\n return kn;\n },\n VALIDATE_PARAMS: function () {\n return Rn;\n },\n changeConsumesValue: function () {\n return changeConsumesValue;\n },\n changeParam: function () {\n return changeParam;\n },\n changeParamByIdentity: function () {\n return changeParamByIdentity;\n },\n changeProducesValue: function () {\n return changeProducesValue;\n },\n clearRequest: function () {\n return clearRequest;\n },\n clearResponse: function () {\n return clearResponse;\n },\n clearValidateParams: function () {\n return clearValidateParams;\n },\n execute: function () {\n return actions_execute;\n },\n executeRequest: function () {\n return executeRequest;\n },\n invalidateResolvedSubtreeCache: function () {\n return invalidateResolvedSubtreeCache;\n },\n logRequest: function () {\n return logRequest;\n },\n parseToJson: function () {\n return parseToJson;\n },\n requestResolvedSubtree: function () {\n return requestResolvedSubtree;\n },\n resolveSpec: function () {\n return resolveSpec;\n },\n setMutatedRequest: function () {\n return setMutatedRequest;\n },\n setRequest: function () {\n return setRequest;\n },\n setResponse: function () {\n return setResponse;\n },\n setScheme: function () {\n return setScheme;\n },\n updateEmptyParamInclusion: function () {\n return updateEmptyParamInclusion;\n },\n updateJsonSpec: function () {\n return updateJsonSpec;\n },\n updateResolved: function () {\n return updateResolved;\n },\n updateResolvedSubtree: function () {\n return updateResolvedSubtree;\n },\n updateSpec: function () {\n return updateSpec;\n },\n updateUrl: function () {\n return updateUrl;\n },\n validateParams: function () {\n return validateParams;\n }\n});\nvar Ve = {};\n__webpack_require__.r(Ve), __webpack_require__.d(Ve, {\n executeRequest: function () {\n return wrap_actions_executeRequest;\n },\n updateJsonSpec: function () {\n return wrap_actions_updateJsonSpec;\n },\n updateSpec: function () {\n return wrap_actions_updateSpec;\n },\n validateParams: function () {\n return wrap_actions_validateParams;\n }\n});\nvar Ke = {};\n__webpack_require__.r(Ke), __webpack_require__.d(Ke, {\n Button: function () {\n return Button;\n },\n Col: function () {\n return Col;\n },\n Collapse: function () {\n return Collapse;\n },\n Container: function () {\n return Container;\n },\n Input: function () {\n return Input;\n },\n Link: function () {\n return Link;\n },\n Row: function () {\n return Row;\n },\n Select: function () {\n return Select;\n },\n TextArea: function () {\n return TextArea;\n }\n});\nvar ze = {};\n__webpack_require__.r(ze), __webpack_require__.d(ze, {\n basePath: function () {\n return Wa;\n },\n consumes: function () {\n return Ha;\n },\n definitions: function () {\n return Va;\n },\n findDefinition: function () {\n return Ja;\n },\n hasHost: function () {\n return Ka;\n },\n host: function () {\n return Fa;\n },\n produces: function () {\n return Ga;\n },\n schemes: function () {\n return Xa;\n },\n securityDefinitions: function () {\n return za;\n },\n validOperationMethods: function () {\n return wrap_selectors_validOperationMethods;\n }\n});\nvar Fe = {};\n__webpack_require__.r(Fe), __webpack_require__.d(Fe, {\n definitionsToAuthorize: function () {\n return Ya;\n }\n});\nvar We = {};\n__webpack_require__.r(We), __webpack_require__.d(We, {\n callbacksOperations: function () {\n return eo;\n },\n findSchema: function () {\n return findSchema;\n },\n isOAS3: function () {\n return selectors_isOAS3;\n },\n isOAS30: function () {\n return selectors_isOAS30;\n },\n isSwagger2: function () {\n return selectors_isSwagger2;\n },\n servers: function () {\n return Za;\n }\n});\nvar He = {};\n__webpack_require__.r(He), __webpack_require__.d(He, {\n CLEAR_REQUEST_BODY_VALIDATE_ERROR: function () {\n return vo;\n },\n CLEAR_REQUEST_BODY_VALUE: function () {\n return bo;\n },\n SET_REQUEST_BODY_VALIDATE_ERROR: function () {\n return _o;\n },\n UPDATE_ACTIVE_EXAMPLES_MEMBER: function () {\n return go;\n },\n UPDATE_REQUEST_BODY_INCLUSION: function () {\n return ho;\n },\n UPDATE_REQUEST_BODY_VALUE: function () {\n return mo;\n },\n UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG: function () {\n return fo;\n },\n UPDATE_REQUEST_CONTENT_TYPE: function () {\n return yo;\n },\n UPDATE_RESPONSE_CONTENT_TYPE: function () {\n return Eo;\n },\n UPDATE_SELECTED_SERVER: function () {\n return po;\n },\n UPDATE_SERVER_VARIABLE_VALUE: function () {\n return So;\n },\n clearRequestBodyValidateError: function () {\n return clearRequestBodyValidateError;\n },\n clearRequestBodyValue: function () {\n return clearRequestBodyValue;\n },\n initRequestBodyValidateError: function () {\n return initRequestBodyValidateError;\n },\n setActiveExamplesMember: function () {\n return setActiveExamplesMember;\n },\n setRequestBodyInclusion: function () {\n return setRequestBodyInclusion;\n },\n setRequestBodyValidateError: function () {\n return setRequestBodyValidateError;\n },\n setRequestBodyValue: function () {\n return setRequestBodyValue;\n },\n setRequestContentType: function () {\n return setRequestContentType;\n },\n setResponseContentType: function () {\n return setResponseContentType;\n },\n setRetainRequestBodyValueFlag: function () {\n return setRetainRequestBodyValueFlag;\n },\n setSelectedServer: function () {\n return setSelectedServer;\n },\n setServerVariableValue: function () {\n return setServerVariableValue;\n }\n});\nvar Ge = {};\n__webpack_require__.r(Ge), __webpack_require__.d(Ge, {\n activeExamplesMember: function () {\n return Io;\n },\n hasUserEditedBody: function () {\n return ko;\n },\n requestBodyErrors: function () {\n return Ao;\n },\n requestBodyInclusionSetting: function () {\n return No;\n },\n requestBodyValue: function () {\n return xo;\n },\n requestContentType: function () {\n return Ro;\n },\n responseContentType: function () {\n return To;\n },\n selectDefaultRequestBodyValue: function () {\n return selectDefaultRequestBodyValue;\n },\n selectedServer: function () {\n return Co;\n },\n serverEffectiveValue: function () {\n return Po;\n },\n serverVariableValue: function () {\n return Bo;\n },\n serverVariables: function () {\n return jo;\n },\n shouldRetainRequestBodyValue: function () {\n return Oo;\n },\n validOperationMethods: function () {\n return qo;\n },\n validateBeforeExecute: function () {\n return Mo;\n },\n validateShallowRequired: function () {\n return validateShallowRequired;\n }\n});\nvar Xe = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n Component: function () {\n return r.Component;\n },\n PureComponent: function () {\n return r.PureComponent;\n },\n createContext: function () {\n return r.createContext;\n },\n createElement: function () {\n return r.createElement;\n },\n default: function () {\n return r.default;\n },\n forwardRef: function () {\n return r.forwardRef;\n },\n useCallback: function () {\n return r.useCallback;\n },\n useContext: function () {\n return r.useContext;\n },\n useEffect: function () {\n return r.useEffect;\n },\n useMemo: function () {\n return r.useMemo;\n },\n useRef: function () {\n return r.useRef;\n },\n useState: function () {\n return r.useState;\n }\n }),\n Ye = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n applyMiddleware: function () {\n return n.applyMiddleware;\n },\n bindActionCreators: function () {\n return n.bindActionCreators;\n },\n compose: function () {\n return n.compose;\n },\n createStore: function () {\n return n.createStore;\n }\n }),\n Qe = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n List: function () {\n return a.List;\n },\n Map: function () {\n return a.Map;\n },\n OrderedMap: function () {\n return a.OrderedMap;\n },\n Seq: function () {\n return a.Seq;\n },\n Set: function () {\n return a.Set;\n },\n default: function () {\n return a.default;\n },\n fromJS: function () {\n return a.fromJS;\n }\n }),\n Ze = __webpack_require__(919),\n et = __webpack_require__.n(Ze),\n tt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n combineReducers: function () {\n return o.combineReducers;\n }\n }),\n rt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n serializeError: function () {\n return s.serializeError;\n }\n }),\n nt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return l.default;\n }\n });\nconst at = \"err_new_thrown_err\",\n ot = \"err_new_thrown_err_batch\",\n st = \"err_new_spec_err\",\n lt = \"err_new_spec_err_batch\",\n it = \"err_new_auth_err\",\n ct = \"err_clear\",\n ut = \"err_clear_by\";\nfunction newThrownErr(e) {\n return {\n type: at,\n payload: (0, rt.serializeError)(e)\n };\n}\nfunction newThrownErrBatch(e) {\n return {\n type: ot,\n payload: e\n };\n}\nfunction newSpecErr(e) {\n return {\n type: st,\n payload: e\n };\n}\nfunction newSpecErrBatch(e) {\n return {\n type: lt,\n payload: e\n };\n}\nfunction newAuthErr(e) {\n return {\n type: it,\n payload: e\n };\n}\nfunction clear(e = {}) {\n return {\n type: ct,\n payload: e\n };\n}\nfunction clearBy(e = () => !0) {\n return {\n type: ut,\n payload: e\n };\n}\nvar dt = function makeWindow() {\n var e = {\n location: {},\n history: {},\n open: () => {},\n close: () => {},\n File: function () {},\n FormData: function () {}\n };\n if (\"undefined\" == typeof window) return e;\n try {\n e = window;\n for (var t of [\"File\", \"Blob\", \"FormData\"]) t in window && (e[t] = window[t]);\n } catch (e) {\n console.error(e);\n }\n return e;\n }(),\n pt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n sanitizeUrl: function () {\n return i.sanitizeUrl;\n }\n }),\n mt = (function (e) {\n var t = {};\n __webpack_require__.d(t, e);\n }({}), function (e) {\n var t = {};\n __webpack_require__.d(t, e);\n }({}), function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return d.default;\n }\n })),\n ht = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return p.default;\n }\n }),\n gt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return m.default;\n }\n }),\n yt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return f.default;\n }\n }),\n Et = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return h.default;\n }\n }),\n St = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return g.default;\n }\n }),\n _t = __webpack_require__(209),\n vt = __webpack_require__.n(_t),\n bt = __webpack_require__(802),\n wt = __webpack_require__.n(bt);\nconst Ct = Qe.default.Set.of(\"type\", \"format\", \"items\", \"default\", \"maximum\", \"exclusiveMaximum\", \"minimum\", \"exclusiveMinimum\", \"maxLength\", \"minLength\", \"pattern\", \"maxItems\", \"minItems\", \"uniqueItems\", \"enum\", \"multipleOf\");\nfunction getParameterSchema(e, {\n isOAS3: t\n} = {}) {\n if (!Qe.default.Map.isMap(e)) return {\n schema: Qe.default.Map(),\n parameterContentMediaType: null\n };\n if (!t) return \"body\" === e.get(\"in\") ? {\n schema: e.get(\"schema\", Qe.default.Map()),\n parameterContentMediaType: null\n } : {\n schema: e.filter((e, t) => Ct.includes(t)),\n parameterContentMediaType: null\n };\n if (e.get(\"content\")) {\n const t = e.get(\"content\", Qe.default.Map({})).keySeq().first();\n return {\n schema: e.getIn([\"content\", t, \"schema\"], Qe.default.Map()),\n parameterContentMediaType: t\n };\n }\n return {\n schema: e.get(\"schema\") ? e.get(\"schema\", Qe.default.Map()) : Qe.default.Map(),\n parameterContentMediaType: null\n };\n}\nvar xt = __webpack_require__(287).Buffer;\nconst Ot = \"default\",\n isImmutable = e => Qe.default.Iterable.isIterable(e);\nfunction objectify(e) {\n return isObject(e) ? isImmutable(e) ? e.toJS() : e : {};\n}\nfunction fromJSOrdered(e) {\n if (isImmutable(e)) return e;\n if (e instanceof dt.File) return e;\n if (!isObject(e)) return e;\n if (Array.isArray(e)) return Qe.default.Seq(e).map(fromJSOrdered).toList();\n if ((0, Et.default)(e.entries)) {\n const t = function createObjWithHashedKeys(e) {\n if (!(0, Et.default)(e.entries)) return e;\n const t = {},\n r = \"_**[]\",\n n = {};\n for (let a of e.entries()) if (t[a[0]] || n[a[0]] && n[a[0]].containsMultiple) {\n if (!n[a[0]]) {\n n[a[0]] = {\n containsMultiple: !0,\n length: 1\n }, t[`${a[0]}${r}${n[a[0]].length}`] = t[a[0]], delete t[a[0]];\n }\n n[a[0]].length += 1, t[`${a[0]}${r}${n[a[0]].length}`] = a[1];\n } else t[a[0]] = a[1];\n return t;\n }(e);\n return Qe.default.OrderedMap(t).map(fromJSOrdered);\n }\n return Qe.default.OrderedMap(e).map(fromJSOrdered);\n}\nfunction normalizeArray(e) {\n return Array.isArray(e) ? e : [e];\n}\nfunction isFn(e) {\n return \"function\" == typeof e;\n}\nfunction isObject(e) {\n return !!e && \"object\" == typeof e;\n}\nfunction isFunc(e) {\n return \"function\" == typeof e;\n}\nfunction isArray(e) {\n return Array.isArray(e);\n}\nconst kt = mt.default;\nfunction objMap(e, t) {\n return Object.keys(e).reduce((r, n) => (r[n] = t(e[n], n), r), {});\n}\nfunction objReduce(e, t) {\n return Object.keys(e).reduce((r, n) => {\n let a = t(e[n], n);\n return a && \"object\" == typeof a && Object.assign(r, a), r;\n }, {});\n}\nfunction systemThunkMiddleware(e) {\n return ({\n dispatch: t,\n getState: r\n }) => t => r => \"function\" == typeof r ? r(e()) : t(r);\n}\nfunction validateValueBySchema(e, t, r, n, a) {\n if (!t) return [];\n let o = [],\n s = t.get(\"nullable\"),\n l = t.get(\"required\"),\n i = t.get(\"maximum\"),\n c = t.get(\"minimum\"),\n u = t.get(\"type\"),\n d = t.get(\"format\"),\n p = t.get(\"maxLength\"),\n m = t.get(\"minLength\"),\n f = t.get(\"uniqueItems\"),\n h = t.get(\"maxItems\"),\n g = t.get(\"minItems\"),\n y = t.get(\"pattern\");\n const S = r || !0 === l,\n _ = null != e,\n v = S || _ && \"array\" === u || !(!S && !_),\n b = s && null === e;\n if (S && !_ && !b && !n && !u) return o.push(\"Required field is not provided\"), o;\n if (b || !u || !v) return [];\n let w = \"string\" === u && e,\n C = \"array\" === u && Array.isArray(e) && e.length,\n x = \"array\" === u && Qe.default.List.isList(e) && e.count();\n const O = [w, C, x, \"array\" === u && \"string\" == typeof e && e, \"file\" === u && e instanceof dt.File, \"boolean\" === u && (e || !1 === e), \"number\" === u && (e || 0 === e), \"integer\" === u && (e || 0 === e), \"object\" === u && \"object\" == typeof e && null !== e, \"object\" === u && \"string\" == typeof e && e].some(e => !!e);\n if (S && !O && !n) return o.push(\"Required field is not provided\"), o;\n if (\"object\" === u && (null === a || \"application/json\" === a)) {\n let r = e;\n if (\"string\" == typeof e) try {\n r = JSON.parse(e);\n } catch (e) {\n return o.push(\"Parameter string value must be valid JSON\"), o;\n }\n t && t.has(\"required\") && isFunc(l.isList) && l.isList() && l.forEach(e => {\n void 0 === r[e] && o.push({\n propKey: e,\n error: \"Required property not found\"\n });\n }), t && t.has(\"properties\") && t.get(\"properties\").forEach((e, t) => {\n const s = validateValueBySchema(r[t], e, !1, n, a);\n o.push(...s.map(e => ({\n propKey: t,\n error: e\n })));\n });\n }\n if (y) {\n let t = ((e, t) => {\n if (!new RegExp(t).test(e)) return \"Value must follow pattern \" + t;\n })(e, y);\n t && o.push(t);\n }\n if (g && \"array\" === u) {\n let t = ((e, t) => {\n if (!e && t >= 1 || e && e.length < t) return `Array must contain at least ${t} item${1 === t ? \"\" : \"s\"}`;\n })(e, g);\n t && o.push(t);\n }\n if (h && \"array\" === u) {\n let t = ((e, t) => {\n if (e && e.length > t) return `Array must not contain more then ${t} item${1 === t ? \"\" : \"s\"}`;\n })(e, h);\n t && o.push({\n needRemove: !0,\n error: t\n });\n }\n if (f && \"array\" === u) {\n let t = ((e, t) => {\n if (e && (\"true\" === t || !0 === t)) {\n const t = (0, Qe.fromJS)(e),\n r = t.toSet();\n if (e.length > r.size) {\n let e = (0, Qe.Set)();\n if (t.forEach((r, n) => {\n t.filter(e => isFunc(e.equals) ? e.equals(r) : e === r).size > 1 && (e = e.add(n));\n }), 0 !== e.size) return e.map(e => ({\n index: e,\n error: \"No duplicates allowed.\"\n })).toArray();\n }\n }\n })(e, f);\n t && o.push(...t);\n }\n if (p || 0 === p) {\n let t = ((e, t) => {\n if (e.length > t) return `Value must be no longer than ${t} character${1 !== t ? \"s\" : \"\"}`;\n })(e, p);\n t && o.push(t);\n }\n if (m) {\n let t = ((e, t) => {\n if (e.length < t) return `Value must be at least ${t} character${1 !== t ? \"s\" : \"\"}`;\n })(e, m);\n t && o.push(t);\n }\n if (i || 0 === i) {\n let t = ((e, t) => {\n if (e > t) return `Value must be less than ${t}`;\n })(e, i);\n t && o.push(t);\n }\n if (c || 0 === c) {\n let t = ((e, t) => {\n if (e < t) return `Value must be greater than ${t}`;\n })(e, c);\n t && o.push(t);\n }\n if (\"string\" === u) {\n let t;\n if (t = \"date-time\" === d ? (e => {\n if (isNaN(Date.parse(e))) return \"Value must be a DateTime\";\n })(e) : \"uuid\" === d ? (e => {\n if (e = e.toString().toLowerCase(), !/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(e)) return \"Value must be a Guid\";\n })(e) : (e => {\n if (e && \"string\" != typeof e) return \"Value must be a string\";\n })(e), !t) return o;\n o.push(t);\n } else if (\"boolean\" === u) {\n let t = (e => {\n if (\"true\" !== e && \"false\" !== e && !0 !== e && !1 !== e) return \"Value must be a boolean\";\n })(e);\n if (!t) return o;\n o.push(t);\n } else if (\"number\" === u) {\n let t = (e => {\n if (!/^-?\\d+(\\.?\\d+)?$/.test(e)) return \"Value must be a number\";\n })(e);\n if (!t) return o;\n o.push(t);\n } else if (\"integer\" === u) {\n let t = (e => {\n if (!/^-?\\d+$/.test(e)) return \"Value must be an integer\";\n })(e);\n if (!t) return o;\n o.push(t);\n } else if (\"array\" === u) {\n if (!C && !x) return o;\n e && e.forEach((e, r) => {\n const s = validateValueBySchema(e, t.get(\"items\"), !1, n, a);\n o.push(...s.map(e => ({\n index: r,\n error: e\n })));\n });\n } else if (\"file\" === u) {\n let t = (e => {\n if (e && !(e instanceof dt.File)) return \"Value must be a file\";\n })(e);\n if (!t) return o;\n o.push(t);\n }\n return o;\n}\nconst btoa = e => {\n let t;\n return t = e instanceof xt ? e : xt.from(e.toString(), \"utf-8\"), t.toString(\"base64\");\n },\n Nt = {\n operationsSorter: {\n alpha: (e, t) => e.get(\"path\").localeCompare(t.get(\"path\")),\n method: (e, t) => e.get(\"method\").localeCompare(t.get(\"method\"))\n },\n tagsSorter: {\n alpha: (e, t) => e.localeCompare(t)\n }\n },\n buildFormData = e => {\n let t = [];\n for (let r in e) {\n let n = e[r];\n void 0 !== n && \"\" !== n && t.push([r, \"=\", encodeURIComponent(n).replace(/%20/g, \"+\")].join(\"\"));\n }\n return t.join(\"&\");\n },\n shallowEqualKeys = (e, t, r) => !!(0, ht.default)(r, r => (0, yt.default)(e[r], t[r]));\nfunction sanitizeUrl(e) {\n return \"string\" != typeof e || \"\" === e ? \"\" : (0, pt.sanitizeUrl)(e);\n}\nfunction requiresValidationURL(e) {\n return !(!e || e.indexOf(\"localhost\") >= 0 || e.indexOf(\"127.0.0.1\") >= 0 || \"none\" === e);\n}\nconst createDeepLinkPath = e => \"string\" == typeof e || e instanceof String ? e.trim().replace(/\\s/g, \"%20\") : \"\",\n escapeDeepLinkPath = e => (0, St.default)(createDeepLinkPath(e).replace(/%20/g, \"_\")),\n getExtensions = e => e.filter((e, t) => /^x-/.test(t)),\n getCommonExtensions = e => e.filter((e, t) => /^pattern|maxLength|minLength|maximum|minimum/.test(t));\nfunction deeplyStripKey(e, t, r = () => !0) {\n if (\"object\" != typeof e || Array.isArray(e) || null === e || !t) return e;\n const n = Object.assign({}, e);\n return Object.keys(n).forEach(e => {\n e === t && r(n[e], e) ? delete n[e] : n[e] = deeplyStripKey(n[e], t, r);\n }), n;\n}\nfunction stringify(e) {\n if (\"string\" == typeof e) return e;\n if (e && e.toJS && (e = e.toJS()), \"object\" == typeof e && null !== e) try {\n return JSON.stringify(e, null, 2);\n } catch (t) {\n return String(e);\n }\n return null == e ? \"\" : e.toString();\n}\nfunction paramToIdentifier(e, {\n returnAll: t = !1,\n allowHashes: r = !0\n} = {}) {\n if (!Qe.default.Map.isMap(e)) throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");\n const n = e.get(\"name\"),\n a = e.get(\"in\");\n let o = [];\n return e && e.hashCode && a && n && r && o.push(`${a}.${n}.hash-${e.hashCode()}`), a && n && o.push(`${a}.${n}`), o.push(n), t ? o : o[0] || \"\";\n}\nfunction paramToValue(e, t) {\n return paramToIdentifier(e, {\n returnAll: !0\n }).map(e => t[e]).filter(e => void 0 !== e)[0];\n}\nfunction b64toB64UrlEncoded(e) {\n return e.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nconst isEmptyValue = e => !e || !(!isImmutable(e) || !e.isEmpty()),\n idFn = e => e;\nclass Store {\n constructor(e = {}) {\n et()(this, {\n state: {},\n plugins: [],\n system: {\n configs: {},\n fn: {},\n components: {},\n rootInjects: {},\n statePlugins: {}\n },\n boundSystem: {},\n toolbox: {}\n }, e), this.getSystem = this._getSystem.bind(this), this.store = function configureStore(e, t, r) {\n return function createStoreWithMiddleware(e, t, r) {\n let n = [systemThunkMiddleware(r)];\n const a = dt.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || Ye.compose;\n return (0, Ye.createStore)(e, t, a((0, Ye.applyMiddleware)(...n)));\n }(e, t, r);\n }(idFn, (0, Qe.fromJS)(this.state), this.getSystem), this.buildSystem(!1), this.register(this.plugins);\n }\n getStore() {\n return this.store;\n }\n register(e, t = !0) {\n var r = combinePlugins(e, this.getSystem());\n systemExtend(this.system, r), t && this.buildSystem();\n callAfterLoad.call(this.system, e, this.getSystem()) && this.buildSystem();\n }\n buildSystem(e = !0) {\n let t = this.getStore().dispatch,\n r = this.getStore().getState;\n this.boundSystem = Object.assign({}, this.getRootInjects(), this.getWrappedAndBoundActions(t), this.getWrappedAndBoundSelectors(r, this.getSystem), this.getStateThunks(r), this.getFn(), this.getConfigs()), e && this.rebuildReducer();\n }\n _getSystem() {\n return this.boundSystem;\n }\n getRootInjects() {\n return Object.assign({\n getSystem: this.getSystem,\n getStore: this.getStore.bind(this),\n getComponents: this.getComponents.bind(this),\n getState: this.getStore().getState,\n getConfigs: this._getConfigs.bind(this),\n Im: Qe.default,\n React: Xe.default\n }, this.system.rootInjects || {});\n }\n _getConfigs() {\n return this.system.configs;\n }\n getConfigs() {\n return {\n configs: this.system.configs\n };\n }\n setConfigs(e) {\n this.system.configs = e;\n }\n rebuildReducer() {\n this.store.replaceReducer(function buildReducer(e) {\n return function allReducers(e) {\n let t = Object.keys(e).reduce((t, r) => (t[r] = function makeReducer(e) {\n return (t = new Qe.Map(), r) => {\n if (!e) return t;\n let n = e[r.type];\n if (n) {\n const e = wrapWithTryCatch(n)(t, r);\n return null === e ? t : e;\n }\n return t;\n };\n }(e[r]), t), {});\n if (!Object.keys(t).length) return idFn;\n return (0, tt.combineReducers)(t);\n }(objMap(e, e => e.reducers));\n }(this.system.statePlugins));\n }\n getType(e) {\n let t = e[0].toUpperCase() + e.slice(1);\n return objReduce(this.system.statePlugins, (r, n) => {\n let a = r[e];\n if (a) return {\n [n + t]: a\n };\n });\n }\n getSelectors() {\n return this.getType(\"selectors\");\n }\n getActions() {\n return objMap(this.getType(\"actions\"), e => objReduce(e, (e, t) => {\n if (isFn(e)) return {\n [t]: e\n };\n }));\n }\n getWrappedAndBoundActions(e) {\n return objMap(this.getBoundActions(e), (e, t) => {\n let r = this.system.statePlugins[t.slice(0, -7)].wrapActions;\n return r ? objMap(e, (e, t) => {\n let n = r[t];\n return n ? (Array.isArray(n) || (n = [n]), n.reduce((e, t) => {\n let newAction = (...r) => t(e, this.getSystem())(...r);\n if (!isFn(newAction)) throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");\n return wrapWithTryCatch(newAction);\n }, e || Function.prototype)) : e;\n }) : e;\n });\n }\n getWrappedAndBoundSelectors(e, t) {\n return objMap(this.getBoundSelectors(e, t), (t, r) => {\n let n = [r.slice(0, -9)],\n a = this.system.statePlugins[n].wrapSelectors;\n return a ? objMap(t, (t, r) => {\n let o = a[r];\n return o ? (Array.isArray(o) || (o = [o]), o.reduce((t, r) => {\n let wrappedSelector = (...a) => r(t, this.getSystem())(e().getIn(n), ...a);\n if (!isFn(wrappedSelector)) throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");\n return wrappedSelector;\n }, t || Function.prototype)) : t;\n }) : t;\n });\n }\n getStates(e) {\n return Object.keys(this.system.statePlugins).reduce((t, r) => (t[r] = e.get(r), t), {});\n }\n getStateThunks(e) {\n return Object.keys(this.system.statePlugins).reduce((t, r) => (t[r] = () => e().get(r), t), {});\n }\n getFn() {\n return {\n fn: this.system.fn\n };\n }\n getComponents(e) {\n const t = this.system.components[e];\n return Array.isArray(t) ? t.reduce((e, t) => t(e, this.getSystem())) : void 0 !== e ? this.system.components[e] : this.system.components;\n }\n getBoundSelectors(e, t) {\n return objMap(this.getSelectors(), (r, n) => {\n let a = [n.slice(0, -9)];\n return objMap(r, r => (...n) => {\n let o = wrapWithTryCatch(r).apply(null, [e().getIn(a), ...n]);\n return \"function\" == typeof o && (o = wrapWithTryCatch(o)(t())), o;\n });\n });\n }\n getBoundActions(e) {\n e = e || this.getStore().dispatch;\n const t = this.getActions(),\n process = e => \"function\" != typeof e ? objMap(e, e => process(e)) : (...t) => {\n var r = null;\n try {\n r = e(...t);\n } catch (e) {\n r = {\n type: at,\n error: !0,\n payload: (0, rt.serializeError)(e)\n };\n } finally {\n return r;\n }\n };\n return objMap(t, t => (0, Ye.bindActionCreators)(process(t), e));\n }\n getMapStateToProps() {\n return () => Object.assign({}, this.getSystem());\n }\n getMapDispatchToProps(e) {\n return t => et()({}, this.getWrappedAndBoundActions(t), this.getFn(), e);\n }\n}\nfunction combinePlugins(e, t) {\n return isObject(e) && !isArray(e) ? (0, nt.default)({}, e) : isFunc(e) ? combinePlugins(e(t), t) : isArray(e) ? e.map(e => combinePlugins(e, t)).reduce(systemExtend, {\n components: t.getComponents()\n }) : {};\n}\nfunction callAfterLoad(e, t, {\n hasLoaded: r\n} = {}) {\n let n = r;\n return isObject(e) && !isArray(e) && \"function\" == typeof e.afterLoad && (n = !0, wrapWithTryCatch(e.afterLoad).call(this, t)), isFunc(e) ? callAfterLoad.call(this, e(t), t, {\n hasLoaded: n\n }) : isArray(e) ? e.map(e => callAfterLoad.call(this, e, t, {\n hasLoaded: n\n })) : n;\n}\nfunction systemExtend(e = {}, t = {}) {\n if (!isObject(e)) return {};\n if (!isObject(t)) return e;\n t.wrapComponents && (objMap(t.wrapComponents, (r, n) => {\n const a = e.components && e.components[n];\n a && Array.isArray(a) ? (e.components[n] = a.concat([r]), delete t.wrapComponents[n]) : a && (e.components[n] = [a, r], delete t.wrapComponents[n]);\n }), Object.keys(t.wrapComponents).length || delete t.wrapComponents);\n const {\n statePlugins: r\n } = e;\n if (isObject(r)) for (let e in r) {\n const n = r[e];\n if (!isObject(n)) continue;\n const {\n wrapActions: a,\n wrapSelectors: o\n } = n;\n if (isObject(a)) for (let r in a) {\n let n = a[r];\n Array.isArray(n) || (n = [n], a[r] = n), t && t.statePlugins && t.statePlugins[e] && t.statePlugins[e].wrapActions && t.statePlugins[e].wrapActions[r] && (t.statePlugins[e].wrapActions[r] = a[r].concat(t.statePlugins[e].wrapActions[r]));\n }\n if (isObject(o)) for (let r in o) {\n let n = o[r];\n Array.isArray(n) || (n = [n], o[r] = n), t && t.statePlugins && t.statePlugins[e] && t.statePlugins[e].wrapSelectors && t.statePlugins[e].wrapSelectors[r] && (t.statePlugins[e].wrapSelectors[r] = o[r].concat(t.statePlugins[e].wrapSelectors[r]));\n }\n }\n return et()(e, t);\n}\nfunction wrapWithTryCatch(e, {\n logErrors: t = !0\n} = {}) {\n return \"function\" != typeof e ? e : function (...r) {\n try {\n return e.call(this, ...r);\n } catch (e) {\n return t && console.error(e), null;\n }\n };\n}\nvar At = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n default: function () {\n return y.default;\n }\n});\nconst It = \"show_popup\",\n Rt = \"authorize\",\n Tt = \"logout\",\n Bt = \"pre_authorize_oauth2\",\n jt = \"authorize_oauth2\",\n Pt = \"validate\",\n Mt = \"configure_auth\",\n qt = \"restore_authorization\";\nfunction showDefinitions(e) {\n return {\n type: It,\n payload: e\n };\n}\nfunction authorize(e) {\n return {\n type: Rt,\n payload: e\n };\n}\nconst authorizeWithPersistOption = e => ({\n authActions: t\n}) => {\n t.authorize(e), t.persistAuthorizationIfNeeded();\n};\nfunction logout(e) {\n return {\n type: Tt,\n payload: e\n };\n}\nconst logoutWithPersistOption = e => ({\n authActions: t\n }) => {\n t.logout(e), t.persistAuthorizationIfNeeded();\n },\n preAuthorizeImplicit = e => ({\n authActions: t,\n errActions: r\n }) => {\n let {\n auth: n,\n token: a,\n isValid: o\n } = e,\n {\n schema: s,\n name: l\n } = n,\n i = s.get(\"flow\");\n delete dt.swaggerUIRedirectOauth2, \"accessCode\" === i || o || r.newAuthErr({\n authId: l,\n source: \"auth\",\n level: \"warning\",\n message: \"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"\n }), a.error ? r.newAuthErr({\n authId: l,\n source: \"auth\",\n level: \"error\",\n message: JSON.stringify(a)\n }) : t.authorizeOauth2WithPersistOption({\n auth: n,\n token: a\n });\n };\nfunction authorizeOauth2(e) {\n return {\n type: jt,\n payload: e\n };\n}\nconst authorizeOauth2WithPersistOption = e => ({\n authActions: t\n }) => {\n t.authorizeOauth2(e), t.persistAuthorizationIfNeeded();\n },\n authorizePassword = e => ({\n authActions: t\n }) => {\n let {\n schema: r,\n name: n,\n username: a,\n password: o,\n passwordType: s,\n clientId: l,\n clientSecret: i\n } = e,\n c = {\n grant_type: \"password\",\n scope: e.scopes.join(\" \"),\n username: a,\n password: o\n },\n u = {};\n switch (s) {\n case \"request-body\":\n !function setClientIdAndSecret(e, t, r) {\n t && Object.assign(e, {\n client_id: t\n });\n r && Object.assign(e, {\n client_secret: r\n });\n }(c, l, i);\n break;\n case \"basic\":\n u.Authorization = \"Basic \" + btoa(l + \":\" + i);\n break;\n default:\n console.warn(`Warning: invalid passwordType ${s} was passed, not including client id and secret`);\n }\n return t.authorizeRequest({\n body: buildFormData(c),\n url: r.get(\"tokenUrl\"),\n name: n,\n headers: u,\n query: {},\n auth: e\n });\n };\nconst authorizeApplication = e => ({\n authActions: t\n }) => {\n let {\n schema: r,\n scopes: n,\n name: a,\n clientId: o,\n clientSecret: s\n } = e,\n l = {\n Authorization: \"Basic \" + btoa(o + \":\" + s)\n },\n i = {\n grant_type: \"client_credentials\",\n scope: n.join(\" \")\n };\n return t.authorizeRequest({\n body: buildFormData(i),\n name: a,\n url: r.get(\"tokenUrl\"),\n auth: e,\n headers: l\n });\n },\n authorizeAccessCodeWithFormParams = ({\n auth: e,\n redirectUrl: t\n }) => ({\n authActions: r\n }) => {\n let {\n schema: n,\n name: a,\n clientId: o,\n clientSecret: s,\n codeVerifier: l\n } = e,\n i = {\n grant_type: \"authorization_code\",\n code: e.code,\n client_id: o,\n client_secret: s,\n redirect_uri: t,\n code_verifier: l\n };\n return r.authorizeRequest({\n body: buildFormData(i),\n name: a,\n url: n.get(\"tokenUrl\"),\n auth: e\n });\n },\n authorizeAccessCodeWithBasicAuthentication = ({\n auth: e,\n redirectUrl: t\n }) => ({\n authActions: r\n }) => {\n let {\n schema: n,\n name: a,\n clientId: o,\n clientSecret: s,\n codeVerifier: l\n } = e,\n i = {\n Authorization: \"Basic \" + btoa(o + \":\" + s)\n },\n c = {\n grant_type: \"authorization_code\",\n code: e.code,\n client_id: o,\n redirect_uri: t,\n code_verifier: l\n };\n return r.authorizeRequest({\n body: buildFormData(c),\n name: a,\n url: n.get(\"tokenUrl\"),\n auth: e,\n headers: i\n });\n },\n authorizeRequest = e => ({\n fn: t,\n getConfigs: r,\n authActions: n,\n errActions: a,\n oas3Selectors: o,\n specSelectors: s,\n authSelectors: l\n }) => {\n let i,\n {\n body: c,\n query: u = {},\n headers: d = {},\n name: p,\n url: m,\n auth: f\n } = e,\n {\n additionalQueryStringParams: h\n } = l.getConfigs() || {};\n if (s.isOAS3()) {\n let e = o.serverEffectiveValue(o.selectedServer());\n i = (0, At.default)(m, e, !0);\n } else i = (0, At.default)(m, s.url(), !0);\n \"object\" == typeof h && (i.query = Object.assign({}, i.query, h));\n const g = i.toString();\n let y = Object.assign({\n Accept: \"application/json, text/plain, */*\",\n \"Content-Type\": \"application/x-www-form-urlencoded\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n }, d);\n t.fetch({\n url: g,\n method: \"post\",\n headers: y,\n query: u,\n body: c,\n requestInterceptor: r().requestInterceptor,\n responseInterceptor: r().responseInterceptor\n }).then(function (e) {\n let t = JSON.parse(e.data),\n r = t && (t.error || \"\"),\n o = t && (t.parseError || \"\");\n e.ok ? r || o ? a.newAuthErr({\n authId: p,\n level: \"error\",\n source: \"auth\",\n message: JSON.stringify(t)\n }) : n.authorizeOauth2WithPersistOption({\n auth: f,\n token: t\n }) : a.newAuthErr({\n authId: p,\n level: \"error\",\n source: \"auth\",\n message: e.statusText\n });\n }).catch(e => {\n let t = new Error(e).message;\n if (e.response && e.response.data) {\n const r = e.response.data;\n try {\n const e = \"string\" == typeof r ? JSON.parse(r) : r;\n e.error && (t += `, error: ${e.error}`), e.error_description && (t += `, description: ${e.error_description}`);\n } catch (e) {}\n }\n a.newAuthErr({\n authId: p,\n level: \"error\",\n source: \"auth\",\n message: t\n });\n });\n };\nfunction configureAuth(e) {\n return {\n type: Mt,\n payload: e\n };\n}\nfunction restoreAuthorization(e) {\n return {\n type: qt,\n payload: e\n };\n}\nconst persistAuthorizationIfNeeded = () => ({\n authSelectors: e,\n getConfigs: t\n }) => {\n if (!t().persistAuthorization) return;\n const r = e.authorized().toJS();\n localStorage.setItem(\"authorized\", JSON.stringify(r));\n },\n authPopup = (e, t) => () => {\n dt.swaggerUIRedirectOauth2 = t, dt.open(e);\n };\nvar Lt = {\n [It]: (e, {\n payload: t\n }) => e.set(\"showDefinitions\", t),\n [Rt]: (e, {\n payload: t\n }) => {\n let r = (0, Qe.fromJS)(t),\n n = e.get(\"authorized\") || (0, Qe.Map)();\n return r.entrySeq().forEach(([t, r]) => {\n if (!isFunc(r.getIn)) return e.set(\"authorized\", n);\n let a = r.getIn([\"schema\", \"type\"]);\n if (\"apiKey\" === a || \"http\" === a) n = n.set(t, r);else if (\"basic\" === a) {\n let e = r.getIn([\"value\", \"username\"]),\n a = r.getIn([\"value\", \"password\"]);\n n = n.setIn([t, \"value\"], {\n username: e,\n header: \"Basic \" + btoa(e + \":\" + a)\n }), n = n.setIn([t, \"schema\"], r.get(\"schema\"));\n }\n }), e.set(\"authorized\", n);\n },\n [jt]: (e, {\n payload: t\n }) => {\n let r,\n {\n auth: n,\n token: a\n } = t;\n n.token = Object.assign({}, a), r = (0, Qe.fromJS)(n);\n let o = e.get(\"authorized\") || (0, Qe.Map)();\n return o = o.set(r.get(\"name\"), r), e.set(\"authorized\", o);\n },\n [Tt]: (e, {\n payload: t\n }) => {\n let r = e.get(\"authorized\").withMutations(e => {\n t.forEach(t => {\n e.delete(t);\n });\n });\n return e.set(\"authorized\", r);\n },\n [Mt]: (e, {\n payload: t\n }) => e.set(\"configs\", t),\n [qt]: (e, {\n payload: t\n }) => e.set(\"authorized\", (0, Qe.fromJS)(t.authorized))\n },\n Dt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n createSelector: function () {\n return S.createSelector;\n }\n });\nconst state = e => e,\n Ut = (0, Dt.createSelector)(state, e => e.get(\"showDefinitions\")),\n $t = (0, Dt.createSelector)(state, () => ({\n specSelectors: e\n }) => {\n let t = e.securityDefinitions() || (0, Qe.Map)({}),\n r = (0, Qe.List)();\n return t.entrySeq().forEach(([e, t]) => {\n let n = (0, Qe.Map)();\n n = n.set(e, t), r = r.push(n);\n }), r;\n }),\n getDefinitionsByNames = (e, t) => ({\n specSelectors: e\n }) => {\n console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");\n let r = e.securityDefinitions(),\n n = (0, Qe.List)();\n return t.valueSeq().forEach(e => {\n let t = (0, Qe.Map)();\n e.entrySeq().forEach(([e, n]) => {\n let a,\n o = r.get(e);\n \"oauth2\" === o.get(\"type\") && n.size && (a = o.get(\"scopes\"), a.keySeq().forEach(e => {\n n.contains(e) || (a = a.delete(e));\n }), o = o.set(\"allowedScopes\", a)), t = t.set(e, o);\n }), n = n.push(t);\n }), n;\n },\n definitionsForRequirements = (e, t = (0, Qe.List)()) => ({\n authSelectors: e\n }) => {\n const r = e.definitionsToAuthorize() || (0, Qe.List)();\n let n = (0, Qe.List)();\n return r.forEach(e => {\n let r = t.find(t => t.get(e.keySeq().first()));\n r && (e.forEach((t, n) => {\n if (\"oauth2\" === t.get(\"type\")) {\n const a = r.get(n);\n let o = t.get(\"scopes\");\n Qe.List.isList(a) && Qe.Map.isMap(o) && (o.keySeq().forEach(e => {\n a.contains(e) || (o = o.delete(e));\n }), e = e.set(n, t.set(\"scopes\", o)));\n }\n }), n = n.push(e));\n }), n;\n },\n Jt = (0, Dt.createSelector)(state, e => e.get(\"authorized\") || (0, Qe.Map)()),\n isAuthorized = (e, t) => ({\n authSelectors: e\n }) => {\n let r = e.authorized();\n return Qe.List.isList(t) ? !!t.toJS().filter(e => -1 === Object.keys(e).map(e => !!r.get(e)).indexOf(!1)).length : null;\n },\n Vt = (0, Dt.createSelector)(state, e => e.get(\"configs\")),\n execute = (e, {\n authSelectors: t,\n specSelectors: r\n }) => ({\n path: n,\n method: a,\n operation: o,\n extras: s\n }) => {\n let l = {\n authorized: t.authorized() && t.authorized().toJS(),\n definitions: r.securityDefinitions() && r.securityDefinitions().toJS(),\n specSecurity: r.security() && r.security().toJS()\n };\n return e({\n path: n,\n method: a,\n operation: o,\n securities: l,\n ...s\n });\n },\n loaded = (e, t) => r => {\n const {\n getConfigs: n,\n authActions: a\n } = t,\n o = n();\n if (e(r), o.persistAuthorization) {\n const e = localStorage.getItem(\"authorized\");\n e && a.restoreAuthorization({\n authorized: JSON.parse(e)\n });\n }\n },\n wrap_actions_authorize = (e, t) => r => {\n e(r);\n if (t.getConfigs().persistAuthorization) try {\n const [{\n schema: e,\n value: t\n }] = Object.values(r),\n n = \"apiKey\" === e.get(\"type\"),\n a = \"cookie\" === e.get(\"in\");\n n && a && (document.cookie = `${e.get(\"name\")}=${t}; SameSite=None; Secure`);\n } catch (e) {\n console.error(\"Error persisting cookie based apiKey in document.cookie.\", e);\n }\n },\n wrap_actions_logout = (e, t) => r => {\n const n = t.getConfigs(),\n a = t.authSelectors.authorized();\n try {\n n.persistAuthorization && Array.isArray(r) && r.forEach(e => {\n const t = a.get(e, {}),\n r = \"apiKey\" === t.getIn([\"schema\", \"type\"]),\n n = \"cookie\" === t.getIn([\"schema\", \"in\"]);\n if (r && n) {\n const e = t.getIn([\"schema\", \"name\"]);\n document.cookie = `${e}=; Max-Age=-99999999`;\n }\n });\n } catch (e) {\n console.error(\"Error deleting cookie based apiKey from document.cookie.\", e);\n }\n e(r);\n };\nvar Kt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return _.default;\n }\n }),\n zt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return v.default;\n }\n });\nclass LockAuthIcon extends Xe.default.Component {\n mapStateToProps(e, t) {\n return {\n state: e,\n ownProps: (0, zt.default)(t, Object.keys(t.getSystem()))\n };\n }\n render() {\n const {\n getComponent: e,\n ownProps: t\n } = this.props,\n r = e(\"LockIcon\");\n return Xe.default.createElement(r, t);\n }\n}\nvar Ft = LockAuthIcon;\nclass UnlockAuthIcon extends Xe.default.Component {\n mapStateToProps(e, t) {\n return {\n state: e,\n ownProps: (0, zt.default)(t, Object.keys(t.getSystem()))\n };\n }\n render() {\n const {\n getComponent: e,\n ownProps: t\n } = this.props,\n r = e(\"UnlockIcon\");\n return Xe.default.createElement(r, t);\n }\n}\nvar Wt = UnlockAuthIcon;\nfunction auth() {\n return {\n afterLoad(e) {\n this.rootInjects = this.rootInjects || {}, this.rootInjects.initOAuth = e.authActions.configureAuth, this.rootInjects.preauthorizeApiKey = preauthorizeApiKey.bind(null, e), this.rootInjects.preauthorizeBasic = preauthorizeBasic.bind(null, e);\n },\n components: {\n LockAuthIcon: Ft,\n UnlockAuthIcon: Wt,\n LockAuthOperationIcon: Ft,\n UnlockAuthOperationIcon: Wt\n },\n statePlugins: {\n auth: {\n reducers: Lt,\n actions: Ne,\n selectors: Ae,\n wrapActions: {\n authorize: wrap_actions_authorize,\n logout: wrap_actions_logout\n }\n },\n configs: {\n wrapActions: {\n loaded\n }\n },\n spec: {\n wrapActions: {\n execute\n }\n }\n }\n };\n}\nfunction preauthorizeBasic(e, t, r, n) {\n const {\n authActions: {\n authorize: a\n },\n specSelectors: {\n specJson: o,\n isOAS3: s\n }\n } = e,\n l = s() ? [\"components\", \"securitySchemes\"] : [\"securityDefinitions\"],\n i = o().getIn([...l, t]);\n return i ? a({\n [t]: {\n value: {\n username: r,\n password: n\n },\n schema: i.toJS()\n }\n }) : null;\n}\nfunction preauthorizeApiKey(e, t, r) {\n const {\n authActions: {\n authorize: n\n },\n specSelectors: {\n specJson: a,\n isOAS3: o\n }\n } = e,\n s = o() ? [\"components\", \"securitySchemes\"] : [\"securityDefinitions\"],\n l = a().getIn([...s, t]);\n return l ? n({\n [t]: {\n value: r,\n schema: l.toJS()\n }\n }) : null;\n}\nvar Ht = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n JSON_SCHEMA: function () {\n return b.JSON_SCHEMA;\n },\n default: function () {\n return b.default;\n }\n});\nconst Gt = \"configs_update\",\n Xt = \"configs_toggle\";\nfunction update(e, t) {\n return {\n type: Gt,\n payload: {\n [e]: t\n }\n };\n}\nfunction toggle(e) {\n return {\n type: Xt,\n payload: e\n };\n}\nconst actions_loaded = () => () => {},\n downloadConfig = e => t => {\n const {\n fn: {\n fetch: r\n }\n } = t;\n return r(e);\n },\n getConfigByUrl = (e, t) => r => {\n const {\n specActions: n,\n configsActions: a\n } = r;\n if (e) return a.downloadConfig(e).then(next, next);\n function next(a) {\n a instanceof Error || a.status >= 400 ? (n.updateLoadingStatus(\"failedConfig\"), n.updateLoadingStatus(\"failedConfig\"), n.updateUrl(\"\"), console.error(a.statusText + \" \" + e.url), t(null)) : t(((e, t) => {\n try {\n return Ht.default.load(e);\n } catch (e) {\n return t && t.errActions.newThrownErr(new Error(e)), {};\n }\n })(a.text, r));\n }\n },\n get = (e, t) => e.getIn(Array.isArray(t) ? t : [t]);\nvar Yt = {\n [Gt]: (e, t) => e.merge((0, Qe.fromJS)(t.payload)),\n [Xt]: (e, t) => {\n const r = t.payload,\n n = e.get(r);\n return e.set(r, !n);\n }\n};\nfunction configsPlugin() {\n return {\n statePlugins: {\n configs: {\n reducers: Yt,\n actions: Ie,\n selectors: Re\n }\n }\n };\n}\nconst setHash = e => e ? history.pushState(null, null, `#${e}`) : window.location.hash = \"\";\nvar Qt = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n default: function () {\n return w.default;\n }\n});\nconst Zt = \"layout_scroll_to\",\n er = \"layout_clear_scroll\";\nvar tr = {\n fn: {\n getScrollParent: function getScrollParent(e, t) {\n const r = document.documentElement;\n let n = getComputedStyle(e);\n const a = \"absolute\" === n.position,\n o = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/;\n if (\"fixed\" === n.position) return r;\n for (let t = e; t = t.parentElement;) if (n = getComputedStyle(t), (!a || \"static\" !== n.position) && o.test(n.overflow + n.overflowY + n.overflowX)) return t;\n return r;\n }\n },\n statePlugins: {\n layout: {\n actions: {\n scrollToElement: (e, t) => r => {\n try {\n t = t || r.fn.getScrollParent(e), Qt.default.createScroller(t).to(e);\n } catch (e) {\n console.error(e);\n }\n },\n scrollTo: e => ({\n type: Zt,\n payload: Array.isArray(e) ? e : [e]\n }),\n clearScrollTo: () => ({\n type: er\n }),\n readyToScroll: (e, t) => r => {\n const n = r.layoutSelectors.getScrollToKey();\n Qe.default.is(n, (0, Qe.fromJS)(e)) && (r.layoutActions.scrollToElement(t), r.layoutActions.clearScrollTo());\n },\n parseDeepLinkHash: e => ({\n layoutActions: t,\n layoutSelectors: r,\n getConfigs: n\n }) => {\n if (n().deepLinking && e) {\n let n = e.slice(1);\n \"!\" === n[0] && (n = n.slice(1)), \"/\" === n[0] && (n = n.slice(1));\n const a = n.split(\"/\").map(e => e || \"\"),\n o = r.isShownKeyFromUrlHashArray(a),\n [s, l = \"\", i = \"\"] = o;\n if (\"operations\" === s) {\n const e = r.isShownKeyFromUrlHashArray([l]);\n l.indexOf(\"_\") > -1 && (console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"), t.show(e.map(e => e.replace(/_/g, \" \")), !0)), t.show(e, !0);\n }\n (l.indexOf(\"_\") > -1 || i.indexOf(\"_\") > -1) && (console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"), t.show(o.map(e => e.replace(/_/g, \" \")), !0)), t.show(o, !0), t.scrollTo(o);\n }\n }\n },\n selectors: {\n getScrollToKey: e => e.get(\"scrollToKey\"),\n isShownKeyFromUrlHashArray(e, t) {\n const [r, n] = t;\n return n ? [\"operations\", r, n] : r ? [\"operations-tag\", r] : [];\n },\n urlHashArrayFromIsShownKey(e, t) {\n let [r, n, a] = t;\n return \"operations\" == r ? [n, a] : \"operations-tag\" == r ? [n] : [];\n }\n },\n reducers: {\n [Zt]: (e, t) => e.set(\"scrollToKey\", Qe.default.fromJS(t.payload)),\n [er]: e => e.delete(\"scrollToKey\")\n },\n wrapActions: {\n show: (e, {\n getConfigs: t,\n layoutSelectors: r\n }) => (...n) => {\n if (e(...n), t().deepLinking) try {\n let [e, t] = n;\n e = Array.isArray(e) ? e : [e];\n const a = r.urlHashArrayFromIsShownKey(e);\n if (!a.length) return;\n const [o, s] = a;\n if (!t) return setHash(\"/\");\n 2 === a.length ? setHash(createDeepLinkPath(`/${encodeURIComponent(o)}/${encodeURIComponent(s)}`)) : 1 === a.length && setHash(createDeepLinkPath(`/${encodeURIComponent(o)}`));\n } catch (e) {\n console.error(e);\n }\n }\n }\n }\n }\n },\n rr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return C.default;\n }\n });\nvar operation_wrapper = (e, t) => class OperationWrapper extends Xe.default.Component {\n onLoad = e => {\n const {\n operation: r\n } = this.props,\n {\n tag: n,\n operationId: a\n } = r.toObject();\n let {\n isShownKey: o\n } = r.toObject();\n o = o || [\"operations\", n, a], t.layoutActions.readyToScroll(o, e);\n };\n render() {\n return Xe.default.createElement(\"span\", {\n ref: this.onLoad\n }, Xe.default.createElement(e, this.props));\n }\n};\nvar operation_tag_wrapper = (e, t) => class OperationTagWrapper extends Xe.default.Component {\n onLoad = e => {\n const {\n tag: r\n } = this.props,\n n = [\"operations-tag\", r];\n t.layoutActions.readyToScroll(n, e);\n };\n render() {\n return Xe.default.createElement(\"span\", {\n ref: this.onLoad\n }, Xe.default.createElement(e, this.props));\n }\n};\nfunction deep_linking() {\n return [tr, {\n statePlugins: {\n configs: {\n wrapActions: {\n loaded: (e, t) => (...r) => {\n e(...r);\n const n = decodeURIComponent(window.location.hash);\n t.layoutActions.parseDeepLinkHash(n);\n }\n }\n }\n },\n wrapComponents: {\n operation: operation_wrapper,\n OperationTag: operation_tag_wrapper\n }\n }];\n}\nvar nr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n default: function () {\n return x.default;\n }\n});\nfunction transform(e) {\n return e.map(e => {\n let t = \"is not of a type(s)\",\n r = e.get(\"message\").indexOf(t);\n if (r > -1) {\n let t = e.get(\"message\").slice(r + 19).split(\",\");\n return e.set(\"message\", e.get(\"message\").slice(0, r) + function makeNewMessage(e) {\n return e.reduce((e, t, r, n) => r === n.length - 1 && n.length > 1 ? e + \"or \" + t : n[r + 1] && n.length > 2 ? e + t + \", \" : n[r + 1] ? e + t + \" \" : e + t, \"should be a\");\n }(t));\n }\n return e;\n });\n}\nvar ar = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n default: function () {\n return O.default;\n }\n});\nfunction parameter_oneof_transform(e, {\n jsSpec: t\n}) {\n return e;\n}\nconst or = [Te, Be];\nfunction transformErrors(e) {\n let t = {\n jsSpec: {}\n },\n r = (0, nr.default)(or, (e, r) => {\n try {\n return r.transform(e, t).filter(e => !!e);\n } catch (t) {\n return console.error(\"Transformer error:\", t), e;\n }\n }, e);\n return r.filter(e => !!e).map(e => (!e.get(\"line\") && e.get(\"path\"), e));\n}\nlet sr = {\n line: 0,\n level: \"error\",\n message: \"Unknown error\"\n};\nconst lr = (0, Dt.createSelector)(e => e, e => e.get(\"errors\", (0, Qe.List)())),\n ir = (0, Dt.createSelector)(lr, e => e.last());\nfunction err(e) {\n return {\n statePlugins: {\n err: {\n reducers: {\n [at]: (e, {\n payload: t\n }) => {\n let r = Object.assign(sr, t, {\n type: \"thrown\"\n });\n return e.update(\"errors\", e => (e || (0, Qe.List)()).push((0, Qe.fromJS)(r))).update(\"errors\", e => transformErrors(e));\n },\n [ot]: (e, {\n payload: t\n }) => (t = t.map(e => (0, Qe.fromJS)(Object.assign(sr, e, {\n type: \"thrown\"\n }))), e.update(\"errors\", e => (e || (0, Qe.List)()).concat((0, Qe.fromJS)(t))).update(\"errors\", e => transformErrors(e))),\n [st]: (e, {\n payload: t\n }) => {\n let r = (0, Qe.fromJS)(t);\n return r = r.set(\"type\", \"spec\"), e.update(\"errors\", e => (e || (0, Qe.List)()).push((0, Qe.fromJS)(r)).sortBy(e => e.get(\"line\"))).update(\"errors\", e => transformErrors(e));\n },\n [lt]: (e, {\n payload: t\n }) => (t = t.map(e => (0, Qe.fromJS)(Object.assign(sr, e, {\n type: \"spec\"\n }))), e.update(\"errors\", e => (e || (0, Qe.List)()).concat((0, Qe.fromJS)(t))).update(\"errors\", e => transformErrors(e))),\n [it]: (e, {\n payload: t\n }) => {\n let r = (0, Qe.fromJS)(Object.assign({}, t));\n return r = r.set(\"type\", \"auth\"), e.update(\"errors\", e => (e || (0, Qe.List)()).push((0, Qe.fromJS)(r))).update(\"errors\", e => transformErrors(e));\n },\n [ct]: (e, {\n payload: t\n }) => {\n if (!t || !e.get(\"errors\")) return e;\n let r = e.get(\"errors\").filter(e => e.keySeq().every(r => {\n const n = e.get(r),\n a = t[r];\n return !a || n !== a;\n }));\n return e.merge({\n errors: r\n });\n },\n [ut]: (e, {\n payload: t\n }) => {\n if (!t || \"function\" != typeof t) return e;\n let r = e.get(\"errors\").filter(e => t(e));\n return e.merge({\n errors: r\n });\n }\n },\n actions: ke,\n selectors: je\n }\n }\n };\n}\nfunction opsFilter(e, t) {\n return e.filter((e, r) => -1 !== r.indexOf(t));\n}\nfunction filter() {\n return {\n fn: {\n opsFilter\n }\n };\n}\nvar cr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n default: function () {\n return k.default;\n }\n});\nvar arrow_up = ({\n className: e = null,\n width: t = 20,\n height: r = 20,\n ...n\n}) => Xe.default.createElement(\"svg\", (0, cr.default)({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n className: e,\n width: t,\n height: r,\n \"aria-hidden\": \"true\",\n focusable: \"false\"\n}, n), Xe.default.createElement(\"path\", {\n d: \"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"\n}));\nvar arrow_down = ({\n className: e = null,\n width: t = 20,\n height: r = 20,\n ...n\n}) => Xe.default.createElement(\"svg\", (0, cr.default)({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n className: e,\n width: t,\n height: r,\n \"aria-hidden\": \"true\",\n focusable: \"false\"\n}, n), Xe.default.createElement(\"path\", {\n d: \"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"\n}));\nvar arrow = ({\n className: e = null,\n width: t = 20,\n height: r = 20,\n ...n\n}) => Xe.default.createElement(\"svg\", (0, cr.default)({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n className: e,\n width: t,\n height: r,\n \"aria-hidden\": \"true\",\n focusable: \"false\"\n}, n), Xe.default.createElement(\"path\", {\n d: \"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"\n}));\nvar components_close = ({\n className: e = null,\n width: t = 20,\n height: r = 20,\n ...n\n}) => Xe.default.createElement(\"svg\", (0, cr.default)({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n className: e,\n width: t,\n height: r,\n \"aria-hidden\": \"true\",\n focusable: \"false\"\n}, n), Xe.default.createElement(\"path\", {\n d: \"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"\n}));\nvar copy = ({\n className: e = null,\n width: t = 15,\n height: r = 16,\n ...n\n}) => Xe.default.createElement(\"svg\", (0, cr.default)({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 15 16\",\n className: e,\n width: t,\n height: r,\n \"aria-hidden\": \"true\",\n focusable: \"false\"\n}, n), Xe.default.createElement(\"g\", {\n transform: \"translate(2, -1)\"\n}, Xe.default.createElement(\"path\", {\n fill: \"#ffffff\",\n fillRule: \"evenodd\",\n d: \"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"\n})));\nvar lock = ({\n className: e = null,\n width: t = 20,\n height: r = 20,\n ...n\n}) => Xe.default.createElement(\"svg\", (0, cr.default)({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n className: e,\n width: t,\n height: r,\n \"aria-hidden\": \"true\",\n focusable: \"false\"\n}, n), Xe.default.createElement(\"path\", {\n d: \"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"\n}));\nvar unlock = ({\n className: e = null,\n width: t = 20,\n height: r = 20,\n ...n\n}) => Xe.default.createElement(\"svg\", (0, cr.default)({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 20 20\",\n className: e,\n width: t,\n height: r,\n \"aria-hidden\": \"true\",\n focusable: \"false\"\n}, n), Xe.default.createElement(\"path\", {\n d: \"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"\n}));\nvar icons = () => ({\n components: {\n ArrowUpIcon: arrow_up,\n ArrowDownIcon: arrow_down,\n ArrowIcon: arrow,\n CloseIcon: components_close,\n CopyIcon: copy,\n LockIcon: lock,\n UnlockIcon: unlock\n }\n});\nconst ur = \"layout_update_layout\",\n dr = \"layout_update_filter\",\n pr = \"layout_update_mode\",\n mr = \"layout_show\";\nfunction updateLayout(e) {\n return {\n type: ur,\n payload: e\n };\n}\nfunction updateFilter(e) {\n return {\n type: dr,\n payload: e\n };\n}\nfunction actions_show(e, t = !0) {\n return e = normalizeArray(e), {\n type: mr,\n payload: {\n thing: e,\n shown: t\n }\n };\n}\nfunction changeMode(e, t = \"\") {\n return e = normalizeArray(e), {\n type: pr,\n payload: {\n thing: e,\n mode: t\n }\n };\n}\nvar fr = {\n [ur]: (e, t) => e.set(\"layout\", t.payload),\n [dr]: (e, t) => e.set(\"filter\", t.payload),\n [mr]: (e, t) => {\n const r = t.payload.shown,\n n = (0, Qe.fromJS)(t.payload.thing);\n return e.update(\"shown\", (0, Qe.fromJS)({}), e => e.set(n, r));\n },\n [pr]: (e, t) => {\n let r = t.payload.thing,\n n = t.payload.mode;\n return e.setIn([\"modes\"].concat(r), (n || \"\") + \"\");\n }\n};\nconst current = e => e.get(\"layout\"),\n currentFilter = e => e.get(\"filter\"),\n isShown = (e, t, r) => (t = normalizeArray(t), e.get(\"shown\", (0, Qe.fromJS)({})).get((0, Qe.fromJS)(t), r)),\n whatMode = (e, t, r = \"\") => (t = normalizeArray(t), e.getIn([\"modes\", ...t], r)),\n hr = (0, Dt.createSelector)(e => e, e => !isShown(e, \"editor\")),\n taggedOperations = (e, t) => (r, ...n) => {\n let a = e(r, ...n);\n const {\n fn: o,\n layoutSelectors: s,\n getConfigs: l\n } = t.getSystem(),\n i = l(),\n {\n maxDisplayedTags: c\n } = i;\n let u = s.currentFilter();\n return u && !0 !== u && (a = o.opsFilter(a, u)), c >= 0 && (a = a.slice(0, c)), a;\n };\nfunction plugins_layout() {\n return {\n statePlugins: {\n layout: {\n reducers: fr,\n actions: Pe,\n selectors: Me\n },\n spec: {\n wrapSelectors: qe\n }\n }\n };\n}\nfunction logs({\n configs: e\n}) {\n const t = {\n debug: 0,\n info: 1,\n log: 2,\n warn: 3,\n error: 4\n },\n getLevel = e => t[e] || -1;\n let {\n logLevel: r\n } = e,\n n = getLevel(r);\n function log(e, ...t) {\n getLevel(e) >= n && console[e](...t);\n }\n return log.warn = log.bind(null, \"warn\"), log.error = log.bind(null, \"error\"), log.info = log.bind(null, \"info\"), log.debug = log.bind(null, \"debug\"), {\n rootInjects: {\n log\n }\n };\n}\nlet gr = !1;\nfunction on_complete() {\n return {\n statePlugins: {\n spec: {\n wrapActions: {\n updateSpec: e => (...t) => (gr = !0, e(...t)),\n updateJsonSpec: (e, t) => (...r) => {\n const n = t.getConfigs().onComplete;\n return gr && \"function\" == typeof n && (setTimeout(n, 0), gr = !1), e(...r);\n }\n }\n }\n }\n };\n}\nconst extractKey = e => {\n const t = \"_**[]\";\n return e.indexOf(t) < 0 ? e : e.split(t)[0].trim();\n },\n escapeShell = e => \"-d \" === e || /^[_\\/-]/g.test(e) ? e : \"'\" + e.replace(/'/g, \"'\\\\''\") + \"'\",\n escapeCMD = e => \"-d \" === (e = e.replace(/\\^/g, \"^^\").replace(/\\\\\"/g, '\\\\\\\\\"').replace(/\"/g, '\"\"').replace(/\\n/g, \"^\\n\")) ? e.replace(/-d /g, \"-d ^\\n\") : /^[_\\/-]/g.test(e) ? e : '\"' + e + '\"',\n escapePowershell = e => {\n if (\"-d \" === e) return e;\n if (/\\n/.test(e)) {\n return `@\"\\n${e.replace(/`/g, \"``\").replace(/\\$/g, \"`$\")}\\n\"@`;\n }\n if (!/^[_\\/-]/.test(e)) {\n return `'${e.replace(/'/g, \"''\")}'`;\n }\n return e;\n };\nconst curlify = (e, t, r, n = \"\") => {\n let a = !1,\n o = \"\";\n const addWords = (...e) => o += \" \" + e.map(t).join(\" \"),\n addWordsWithoutLeadingSpace = (...e) => o += e.map(t).join(\" \"),\n addNewLine = () => o += ` ${r}`,\n addIndent = (e = 1) => o += \" \".repeat(e);\n let s = e.get(\"headers\");\n o += \"curl\" + n;\n const l = e.get(\"curlOptions\");\n if (Qe.List.isList(l) && !l.isEmpty() && addWords(...e.get(\"curlOptions\")), addWords(\"-X\", e.get(\"method\")), addNewLine(), addIndent(), addWordsWithoutLeadingSpace(`${e.get(\"url\")}`), s && s.size) for (let t of e.get(\"headers\").entries()) {\n addNewLine(), addIndent();\n let [e, r] = t;\n addWordsWithoutLeadingSpace(\"-H\", `${e}: ${r}`), a = a || /^content-type$/i.test(e) && /^multipart\\/form-data$/i.test(r);\n }\n const i = e.get(\"body\");\n if (i) {\n if (a && [\"POST\", \"PUT\", \"PATCH\"].includes(e.get(\"method\"))) for (let [e, t] of i.entrySeq()) {\n let r = extractKey(e);\n addNewLine(), addIndent(), addWordsWithoutLeadingSpace(\"-F\"), t instanceof dt.File && \"string\" == typeof t.valueOf() ? addWords(`${r}=${t.data}${t.type ? `;type=${t.type}` : \"\"}`) : t instanceof dt.File ? addWords(`${r}=@${t.name}${t.type ? `;type=${t.type}` : \"\"}`) : addWords(`${r}=${t}`);\n } else if (i instanceof dt.File) addNewLine(), addIndent(), addWordsWithoutLeadingSpace(`--data-binary '@${i.name}'`);else {\n addNewLine(), addIndent(), addWordsWithoutLeadingSpace(\"-d \");\n let t = i;\n Qe.Map.isMap(t) ? addWordsWithoutLeadingSpace(function getStringBodyOfMap(e) {\n let t = [];\n for (let [r, n] of e.get(\"body\").entrySeq()) {\n let e = extractKey(r);\n n instanceof dt.File ? t.push(` \"${e}\": {\\n \"name\": \"${n.name}\"${n.type ? `,\\n \"type\": \"${n.type}\"` : \"\"}\\n }`) : t.push(` \"${e}\": ${JSON.stringify(n, null, 2).replace(/(\\r\\n|\\r|\\n)/g, \"\\n \")}`);\n }\n return `{\\n${t.join(\",\\n\")}\\n}`;\n }(e)) : (\"string\" != typeof t && (t = JSON.stringify(t)), addWordsWithoutLeadingSpace(t));\n }\n } else i || \"POST\" !== e.get(\"method\") || (addNewLine(), addIndent(), addWordsWithoutLeadingSpace(\"-d ''\"));\n return o;\n },\n requestSnippetGenerator_curl_powershell = e => curlify(e, escapePowershell, \"`\\n\", \".exe\"),\n requestSnippetGenerator_curl_bash = e => curlify(e, escapeShell, \"\\\\\\n\"),\n requestSnippetGenerator_curl_cmd = e => curlify(e, escapeCMD, \"^\\n\"),\n request_snippets_selectors_state = e => e || (0, Qe.Map)(),\n yr = (0, Dt.createSelector)(request_snippets_selectors_state, e => {\n const t = e.get(\"languages\"),\n r = e.get(\"generators\", (0, Qe.Map)());\n return !t || t.isEmpty() ? r : r.filter((e, r) => t.includes(r));\n }),\n getSnippetGenerators = e => ({\n fn: t\n }) => yr(e).map((e, r) => {\n const n = (e => t[`requestSnippetGenerator_${e}`])(r);\n return \"function\" != typeof n ? null : e.set(\"fn\", n);\n }).filter(e => e),\n Er = (0, Dt.createSelector)(request_snippets_selectors_state, e => e.get(\"activeLanguage\")),\n Sr = (0, Dt.createSelector)(request_snippets_selectors_state, e => e.get(\"defaultExpanded\"));\nvar _r = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return N.default;\n }\n }),\n vr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n CopyToClipboard: function () {\n return A.CopyToClipboard;\n }\n });\nconst br = {\n cursor: \"pointer\",\n lineHeight: 1,\n display: \"inline-flex\",\n backgroundColor: \"rgb(250, 250, 250)\",\n paddingBottom: \"0\",\n paddingTop: \"0\",\n border: \"1px solid rgb(51, 51, 51)\",\n borderRadius: \"4px 4px 0 0\",\n boxShadow: \"none\",\n borderBottom: \"none\"\n },\n wr = {\n cursor: \"pointer\",\n lineHeight: 1,\n display: \"inline-flex\",\n backgroundColor: \"rgb(51, 51, 51)\",\n boxShadow: \"none\",\n border: \"1px solid rgb(51, 51, 51)\",\n paddingBottom: \"0\",\n paddingTop: \"0\",\n borderRadius: \"4px 4px 0 0\",\n marginTop: \"-5px\",\n marginRight: \"-5px\",\n marginLeft: \"-5px\",\n zIndex: \"9999\",\n borderBottom: \"none\"\n };\nvar request_snippets = ({\n request: e,\n requestSnippetsSelectors: t,\n getComponent: r\n }) => {\n const n = (0, Xe.useRef)(null),\n a = r(\"ArrowUpIcon\"),\n o = r(\"ArrowDownIcon\"),\n s = r(\"SyntaxHighlighter\", !0),\n [l, i] = (0, Xe.useState)(t.getSnippetGenerators()?.keySeq().first()),\n [c, u] = (0, Xe.useState)(t?.getDefaultExpanded()),\n d = t.getSnippetGenerators(),\n p = d.get(l),\n m = p.get(\"fn\")(e),\n handleSetIsExpanded = () => {\n u(!c);\n },\n handleGetBtnStyle = e => e === l ? wr : br,\n handlePreventYScrollingBeyondElement = e => {\n const {\n target: t,\n deltaY: r\n } = e,\n {\n scrollHeight: n,\n offsetHeight: a,\n scrollTop: o\n } = t;\n n > a && (0 === o && r < 0 || a + o >= n && r > 0) && e.preventDefault();\n };\n return (0, Xe.useEffect)(() => {}, []), (0, Xe.useEffect)(() => {\n const e = Array.from(n.current.childNodes).filter(e => !!e.nodeType && e.classList?.contains(\"curl-command\"));\n return e.forEach(e => e.addEventListener(\"mousewheel\", handlePreventYScrollingBeyondElement, {\n passive: !1\n })), () => {\n e.forEach(e => e.removeEventListener(\"mousewheel\", handlePreventYScrollingBeyondElement));\n };\n }, [e]), Xe.default.createElement(\"div\", {\n className: \"request-snippets\",\n ref: n\n }, Xe.default.createElement(\"div\", {\n style: {\n width: \"100%\",\n display: \"flex\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n marginBottom: \"15px\"\n }\n }, Xe.default.createElement(\"h4\", {\n onClick: () => handleSetIsExpanded(),\n style: {\n cursor: \"pointer\"\n }\n }, \"Snippets\"), Xe.default.createElement(\"button\", {\n onClick: () => handleSetIsExpanded(),\n style: {\n border: \"none\",\n background: \"none\"\n },\n title: c ? \"Collapse operation\" : \"Expand operation\"\n }, c ? Xe.default.createElement(o, {\n className: \"arrow\",\n width: \"10\",\n height: \"10\"\n }) : Xe.default.createElement(a, {\n className: \"arrow\",\n width: \"10\",\n height: \"10\"\n }))), c && Xe.default.createElement(\"div\", {\n className: \"curl-command\"\n }, Xe.default.createElement(\"div\", {\n style: {\n paddingLeft: \"15px\",\n paddingRight: \"10px\",\n width: \"100%\",\n display: \"flex\"\n }\n }, d.entrySeq().map(([e, t]) => Xe.default.createElement(\"div\", {\n className: (0, _r.default)(\"btn\", {\n active: e === l\n }),\n style: handleGetBtnStyle(e),\n key: e,\n onClick: () => (e => {\n l !== e && i(e);\n })(e)\n }, Xe.default.createElement(\"h4\", {\n style: e === l ? {\n color: \"white\"\n } : {}\n }, t.get(\"title\"))))), Xe.default.createElement(\"div\", {\n className: \"copy-to-clipboard\"\n }, Xe.default.createElement(vr.CopyToClipboard, {\n text: m\n }, Xe.default.createElement(\"button\", null))), Xe.default.createElement(\"div\", null, Xe.default.createElement(s, {\n language: p.get(\"syntax\"),\n className: \"curl microlight\",\n renderPlainText: ({\n children: e,\n PlainTextViewer: t\n }) => Xe.default.createElement(t, {\n className: \"curl\"\n }, e)\n }, m))));\n },\n plugins_request_snippets = () => ({\n components: {\n RequestSnippets: request_snippets\n },\n fn: Le,\n statePlugins: {\n requestSnippets: {\n selectors: De\n }\n }\n });\nclass ModelCollapse extends Xe.Component {\n static defaultProps = {\n collapsedContent: \"{...}\",\n expanded: !1,\n title: null,\n onToggle: () => {},\n hideSelfOnExpand: !1,\n specPath: Qe.default.List([])\n };\n constructor(e, t) {\n super(e, t);\n let {\n expanded: r,\n collapsedContent: n\n } = this.props;\n this.state = {\n expanded: r,\n collapsedContent: n || ModelCollapse.defaultProps.collapsedContent\n };\n }\n componentDidMount() {\n const {\n hideSelfOnExpand: e,\n expanded: t,\n modelName: r\n } = this.props;\n e && t && this.props.onToggle(r, t);\n }\n UNSAFE_componentWillReceiveProps(e) {\n this.props.expanded !== e.expanded && this.setState({\n expanded: e.expanded\n });\n }\n toggleCollapsed = () => {\n this.props.onToggle && this.props.onToggle(this.props.modelName, !this.state.expanded), this.setState({\n expanded: !this.state.expanded\n });\n };\n onLoad = e => {\n if (e && this.props.layoutSelectors) {\n const t = this.props.layoutSelectors.getScrollToKey();\n Qe.default.is(t, this.props.specPath) && this.toggleCollapsed(), this.props.layoutActions.readyToScroll(this.props.specPath, e.parentElement);\n }\n };\n render() {\n const {\n title: e,\n classes: t\n } = this.props;\n return this.state.expanded && this.props.hideSelfOnExpand ? Xe.default.createElement(\"span\", {\n className: t || \"\"\n }, this.props.children) : Xe.default.createElement(\"span\", {\n className: t || \"\",\n ref: this.onLoad\n }, Xe.default.createElement(\"button\", {\n \"aria-expanded\": this.state.expanded,\n className: \"model-box-control\",\n onClick: this.toggleCollapsed\n }, e && Xe.default.createElement(\"span\", {\n className: \"pointer\"\n }, e), Xe.default.createElement(\"span\", {\n className: \"model-toggle\" + (this.state.expanded ? \"\" : \" collapsed\")\n }), !this.state.expanded && Xe.default.createElement(\"span\", null, this.state.collapsedContent)), this.state.expanded && this.props.children);\n }\n}\nconst useTabs = ({\n initialTab: e,\n isExecute: t,\n schema: r,\n example: n\n}) => {\n const a = (0, Xe.useMemo)(() => ({\n example: \"example\",\n model: \"model\"\n }), []),\n o = (0, Xe.useMemo)(() => Object.keys(a), [a]).includes(e) && r && !t ? e : a.example,\n s = (e => {\n const t = (0, Xe.useRef)();\n return (0, Xe.useEffect)(() => {\n t.current = e;\n }), t.current;\n })(t),\n [l, i] = (0, Xe.useState)(o),\n c = (0, Xe.useCallback)(e => {\n i(e.target.dataset.name);\n }, []);\n return (0, Xe.useEffect)(() => {\n s && !t && n && i(a.example);\n }, [s, t, n]), {\n activeTab: l,\n onTabChange: c,\n tabs: a\n };\n};\nvar model_example = ({\n schema: e,\n example: t,\n isExecute: r = !1,\n specPath: n,\n includeWriteOnly: a = !1,\n includeReadOnly: o = !1,\n getComponent: s,\n getConfigs: l,\n specSelectors: i\n}) => {\n const {\n defaultModelRendering: c,\n defaultModelExpandDepth: u\n } = l(),\n d = s(\"ModelWrapper\"),\n p = s(\"HighlightCode\", !0),\n m = vt()(5).toString(\"base64\"),\n f = vt()(5).toString(\"base64\"),\n h = vt()(5).toString(\"base64\"),\n g = vt()(5).toString(\"base64\"),\n y = i.isOAS3(),\n {\n activeTab: S,\n tabs: _,\n onTabChange: v\n } = useTabs({\n initialTab: c,\n isExecute: r,\n schema: e,\n example: t\n });\n return Xe.default.createElement(\"div\", {\n className: \"model-example\"\n }, Xe.default.createElement(\"ul\", {\n className: \"tab\",\n role: \"tablist\"\n }, Xe.default.createElement(\"li\", {\n className: (0, _r.default)(\"tabitem\", {\n active: S === _.example\n }),\n role: \"presentation\"\n }, Xe.default.createElement(\"button\", {\n \"aria-controls\": f,\n \"aria-selected\": S === _.example,\n className: \"tablinks\",\n \"data-name\": \"example\",\n id: m,\n onClick: v,\n role: \"tab\"\n }, r ? \"Edit Value\" : \"Example Value\")), e && Xe.default.createElement(\"li\", {\n className: (0, _r.default)(\"tabitem\", {\n active: S === _.model\n }),\n role: \"presentation\"\n }, Xe.default.createElement(\"button\", {\n \"aria-controls\": g,\n \"aria-selected\": S === _.model,\n className: (0, _r.default)(\"tablinks\", {\n inactive: r\n }),\n \"data-name\": \"model\",\n id: h,\n onClick: v,\n role: \"tab\"\n }, y ? \"Schema\" : \"Model\"))), S === _.example && Xe.default.createElement(\"div\", {\n \"aria-hidden\": S !== _.example,\n \"aria-labelledby\": m,\n \"data-name\": \"examplePanel\",\n id: f,\n role: \"tabpanel\",\n tabIndex: \"0\"\n }, t || Xe.default.createElement(p, null, \"(no example available\")), S === _.model && Xe.default.createElement(\"div\", {\n \"aria-hidden\": S === _.example,\n \"aria-labelledby\": h,\n \"data-name\": \"modelPanel\",\n id: g,\n role: \"tabpanel\",\n tabIndex: \"0\"\n }, Xe.default.createElement(d, {\n schema: e,\n getComponent: s,\n getConfigs: l,\n specSelectors: i,\n expandDepth: u,\n specPath: n,\n includeReadOnly: o,\n includeWriteOnly: a\n })));\n};\nclass ModelWrapper extends Xe.Component {\n onToggle = (e, t) => {\n this.props.layoutActions && this.props.layoutActions.show(this.props.fullPath, t);\n };\n render() {\n let {\n getComponent: e,\n getConfigs: t\n } = this.props;\n const r = e(\"Model\");\n let n;\n return this.props.layoutSelectors && (n = this.props.layoutSelectors.isShown(this.props.fullPath)), Xe.default.createElement(\"div\", {\n className: \"model-box\"\n }, Xe.default.createElement(r, (0, cr.default)({}, this.props, {\n getConfigs: t,\n expanded: n,\n depth: 1,\n onToggle: this.onToggle,\n expandDepth: this.props.expandDepth || 0\n })));\n }\n}\nvar Cr,\n xr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return I.default;\n }\n });\nfunction _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var r = arguments[t];\n for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);\n }\n return e;\n }, _extends.apply(null, arguments);\n}\nvar rolling_load = e => Xe.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 200,\n height: 200,\n className: \"rolling-load_svg__lds-rolling\",\n preserveAspectRatio: \"xMidYMid\",\n style: {\n backgroundImage: \"none\",\n backgroundPosition: \"initial initial\",\n backgroundRepeat: \"initial initial\"\n },\n viewBox: \"0 0 100 100\"\n}, e), Cr || (Cr = Xe.createElement(\"circle\", {\n cx: 50,\n cy: 50,\n r: 35,\n fill: \"none\",\n stroke: \"#555\",\n strokeDasharray: \"164.93361431346415 56.97787143782138\",\n strokeWidth: 10\n}, Xe.createElement(\"animateTransform\", {\n attributeName: \"transform\",\n begin: \"0s\",\n calcMode: \"linear\",\n dur: \"1s\",\n keyTimes: \"0;1\",\n repeatCount: \"indefinite\",\n type: \"rotate\",\n values: \"0 50 50;360 50 50\"\n}))));\nconst decodeRefName = e => {\n const t = e.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n try {\n return decodeURIComponent(t);\n } catch {\n return t;\n }\n};\nclass Model extends xr.default {\n static propTypes = {\n schema: rr.default.map.isRequired,\n getComponent: Kt.default.func.isRequired,\n getConfigs: Kt.default.func.isRequired,\n specSelectors: Kt.default.object.isRequired,\n name: Kt.default.string,\n displayName: Kt.default.string,\n isRef: Kt.default.bool,\n required: Kt.default.bool,\n expandDepth: Kt.default.number,\n depth: Kt.default.number,\n specPath: rr.default.list.isRequired,\n includeReadOnly: Kt.default.bool,\n includeWriteOnly: Kt.default.bool\n };\n getModelName = e => -1 !== e.indexOf(\"#/definitions/\") ? decodeRefName(e.replace(/^.*#\\/definitions\\//, \"\")) : -1 !== e.indexOf(\"#/components/schemas/\") ? decodeRefName(e.replace(/^.*#\\/components\\/schemas\\//, \"\")) : void 0;\n getRefSchema = e => {\n let {\n specSelectors: t\n } = this.props;\n return t.findDefinition(e);\n };\n render() {\n let {\n getComponent: e,\n getConfigs: t,\n specSelectors: r,\n schema: n,\n required: a,\n name: o,\n isRef: s,\n specPath: l,\n displayName: i,\n includeReadOnly: c,\n includeWriteOnly: u\n } = this.props;\n const d = e(\"ObjectModel\"),\n p = e(\"ArrayModel\"),\n m = e(\"PrimitiveModel\");\n let f = \"object\",\n h = n && n.get(\"$$ref\"),\n g = n && n.get(\"$ref\");\n if (!o && h && (o = this.getModelName(h)), g) {\n const e = this.getModelName(g),\n t = this.getRefSchema(e);\n Qe.Map.isMap(t) ? (n = t.mergeDeep(n), h || (n = n.set(\"$$ref\", g), h = g)) : Qe.Map.isMap(n) && 1 === n.size && (n = null, o = g);\n }\n if (!n) return Xe.default.createElement(\"span\", {\n className: \"model model-title\"\n }, Xe.default.createElement(\"span\", {\n className: \"model-title__text\"\n }, i || o), !g && Xe.default.createElement(rolling_load, {\n height: \"20px\",\n width: \"20px\"\n }));\n const y = r.isOAS3() && n.get(\"deprecated\");\n switch (s = void 0 !== s ? s : !!h, f = n && n.get(\"type\") || f, f) {\n case \"object\":\n return Xe.default.createElement(d, (0, cr.default)({\n className: \"object\"\n }, this.props, {\n specPath: l,\n getConfigs: t,\n schema: n,\n name: o,\n deprecated: y,\n isRef: s,\n includeReadOnly: c,\n includeWriteOnly: u\n }));\n case \"array\":\n return Xe.default.createElement(p, (0, cr.default)({\n className: \"array\"\n }, this.props, {\n getConfigs: t,\n schema: n,\n name: o,\n deprecated: y,\n required: a,\n includeReadOnly: c,\n includeWriteOnly: u\n }));\n default:\n return Xe.default.createElement(m, (0, cr.default)({}, this.props, {\n getComponent: e,\n getConfigs: t,\n schema: n,\n name: o,\n deprecated: y,\n required: a\n }));\n }\n }\n}\nclass Models extends Xe.Component {\n getSchemaBasePath = () => this.props.specSelectors.isOAS3() ? [\"components\", \"schemas\"] : [\"definitions\"];\n getCollapsedContent = () => \" \";\n handleToggle = (e, t) => {\n const {\n layoutActions: r\n } = this.props;\n r.show([...this.getSchemaBasePath(), e], t), t && this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(), e]);\n };\n onLoadModels = e => {\n e && this.props.layoutActions.readyToScroll(this.getSchemaBasePath(), e);\n };\n onLoadModel = e => {\n if (e) {\n const t = e.getAttribute(\"data-name\");\n this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(), t], e);\n }\n };\n render() {\n let {\n specSelectors: e,\n getComponent: t,\n layoutSelectors: r,\n layoutActions: n,\n getConfigs: a\n } = this.props,\n o = e.definitions(),\n {\n docExpansion: s,\n defaultModelsExpandDepth: l\n } = a();\n if (!o.size || l < 0) return null;\n const i = this.getSchemaBasePath();\n let c = r.isShown(i, l > 0 && \"none\" !== s);\n const u = e.isOAS3(),\n d = t(\"ModelWrapper\"),\n p = t(\"Collapse\"),\n m = t(\"ModelCollapse\"),\n f = t(\"JumpToPath\", !0),\n h = t(\"ArrowUpIcon\"),\n g = t(\"ArrowDownIcon\");\n return Xe.default.createElement(\"section\", {\n className: c ? \"models is-open\" : \"models\",\n ref: this.onLoadModels\n }, Xe.default.createElement(\"h4\", null, Xe.default.createElement(\"button\", {\n \"aria-expanded\": c,\n className: \"models-control\",\n onClick: () => n.show(i, !c)\n }, Xe.default.createElement(\"span\", null, u ? \"Schemas\" : \"Models\"), c ? Xe.default.createElement(h, null) : Xe.default.createElement(g, null))), Xe.default.createElement(p, {\n isOpened: c\n }, o.entrySeq().map(([o]) => {\n const s = [...i, o],\n c = Qe.default.List(s),\n u = e.specResolvedSubtree(s),\n p = e.specJson().getIn(s),\n h = Qe.Map.isMap(u) ? u : Qe.default.Map(),\n g = Qe.Map.isMap(p) ? p : Qe.default.Map(),\n y = h.get(\"title\") || g.get(\"title\") || o,\n S = r.isShown(s, !1);\n S && 0 === h.size && g.size > 0 && this.props.specActions.requestResolvedSubtree(s);\n const _ = Xe.default.createElement(d, {\n name: o,\n expandDepth: l,\n schema: h || Qe.default.Map(),\n displayName: y,\n fullPath: s,\n specPath: c,\n getComponent: t,\n specSelectors: e,\n getConfigs: a,\n layoutSelectors: r,\n layoutActions: n,\n includeReadOnly: !0,\n includeWriteOnly: !0\n }),\n v = Xe.default.createElement(\"span\", {\n className: \"model-box\"\n }, Xe.default.createElement(\"span\", {\n className: \"model model-title\"\n }, y));\n return Xe.default.createElement(\"div\", {\n id: `model-${o}`,\n className: \"model-container\",\n key: `models-section-${o}`,\n \"data-name\": o,\n ref: this.onLoadModel\n }, Xe.default.createElement(\"span\", {\n className: \"models-jump-to-path\"\n }, Xe.default.createElement(f, {\n specPath: c\n })), Xe.default.createElement(m, {\n classes: \"model-box\",\n collapsedContent: this.getCollapsedContent(o),\n onToggle: this.handleToggle,\n title: v,\n displayName: y,\n modelName: o,\n specPath: c,\n layoutSelectors: r,\n layoutActions: n,\n hideSelfOnExpand: !0,\n expanded: l > 0 && S\n }, _));\n }).toArray()));\n }\n}\nvar enum_model = ({\n value: e,\n getComponent: t\n}) => {\n let r = t(\"ModelCollapse\"),\n n = Xe.default.createElement(\"span\", null, \"Array [ \", e.count(), \" ]\");\n return Xe.default.createElement(\"span\", {\n className: \"prop-enum\"\n }, \"Enum:\", Xe.default.createElement(\"br\", null), Xe.default.createElement(r, {\n collapsedContent: n\n }, \"[ \", e.map(String).join(\", \"), \" ]\"));\n};\nclass ObjectModel extends Xe.Component {\n render() {\n let {\n schema: e,\n name: t,\n displayName: r,\n isRef: n,\n getComponent: a,\n getConfigs: o,\n depth: s,\n onToggle: l,\n expanded: i,\n specPath: c,\n ...u\n } = this.props,\n {\n specSelectors: d,\n expandDepth: p,\n includeReadOnly: m,\n includeWriteOnly: f\n } = u;\n const {\n isOAS3: h\n } = d;\n if (!e) return null;\n const {\n showExtensions: g\n } = o();\n let y = e.get(\"description\"),\n S = e.get(\"properties\"),\n _ = e.get(\"additionalProperties\"),\n v = e.get(\"title\") || r || t,\n b = e.get(\"required\"),\n w = e.filter((e, t) => -1 !== [\"maxProperties\", \"minProperties\", \"nullable\", \"example\"].indexOf(t)),\n C = e.get(\"deprecated\"),\n x = e.getIn([\"externalDocs\", \"url\"]),\n O = e.getIn([\"externalDocs\", \"description\"]);\n const k = a(\"JumpToPath\", !0),\n N = a(\"Markdown\", !0),\n A = a(\"Model\"),\n I = a(\"ModelCollapse\"),\n R = a(\"Property\"),\n T = a(\"Link\"),\n JumpToPathSection = () => Xe.default.createElement(\"span\", {\n className: \"model-jump-to-path\"\n }, Xe.default.createElement(k, {\n specPath: c\n })),\n B = Xe.default.createElement(\"span\", null, Xe.default.createElement(\"span\", null, \"{\"), \"...\", Xe.default.createElement(\"span\", null, \"}\"), n ? Xe.default.createElement(JumpToPathSection, null) : \"\"),\n j = d.isOAS3() ? e.get(\"allOf\") : null,\n P = d.isOAS3() ? e.get(\"anyOf\") : null,\n M = d.isOAS3() ? e.get(\"oneOf\") : null,\n q = d.isOAS3() ? e.get(\"not\") : null,\n L = v && Xe.default.createElement(\"span\", {\n className: \"model-title\"\n }, n && e.get(\"$$ref\") && Xe.default.createElement(\"span\", {\n className: \"model-hint\"\n }, e.get(\"$$ref\")), Xe.default.createElement(\"span\", {\n className: \"model-title__text\"\n }, v));\n return Xe.default.createElement(\"span\", {\n className: \"model\"\n }, Xe.default.createElement(I, {\n modelName: t,\n title: L,\n onToggle: l,\n expanded: !!i || s <= p,\n collapsedContent: B\n }, Xe.default.createElement(\"span\", {\n className: \"brace-open object\"\n }, \"{\"), n ? Xe.default.createElement(JumpToPathSection, null) : null, Xe.default.createElement(\"span\", {\n className: \"inner-object\"\n }, Xe.default.createElement(\"table\", {\n className: \"model\"\n }, Xe.default.createElement(\"tbody\", null, y ? Xe.default.createElement(\"tr\", {\n className: \"description\"\n }, Xe.default.createElement(\"td\", null, \"description:\"), Xe.default.createElement(\"td\", null, Xe.default.createElement(N, {\n source: y\n }))) : null, x && Xe.default.createElement(\"tr\", {\n className: \"external-docs\"\n }, Xe.default.createElement(\"td\", null, \"externalDocs:\"), Xe.default.createElement(\"td\", null, Xe.default.createElement(T, {\n target: \"_blank\",\n href: sanitizeUrl(x)\n }, O || x))), C ? Xe.default.createElement(\"tr\", {\n className: \"property\"\n }, Xe.default.createElement(\"td\", null, \"deprecated:\"), Xe.default.createElement(\"td\", null, \"true\")) : null, S && S.size ? S.entrySeq().filter(([, e]) => (!e.get(\"readOnly\") || m) && (!e.get(\"writeOnly\") || f)).map(([e, r]) => {\n let n = h() && r.get(\"deprecated\"),\n l = Qe.List.isList(b) && b.contains(e),\n i = [\"property-row\"];\n return n && i.push(\"deprecated\"), l && i.push(\"required\"), Xe.default.createElement(\"tr\", {\n key: e,\n className: i.join(\" \")\n }, Xe.default.createElement(\"td\", null, e, l && Xe.default.createElement(\"span\", {\n className: \"star\"\n }, \"*\")), Xe.default.createElement(\"td\", null, Xe.default.createElement(A, (0, cr.default)({\n key: `object-${t}-${e}_${r}`\n }, u, {\n required: l,\n getComponent: a,\n specPath: c.push(\"properties\", e),\n getConfigs: o,\n schema: r,\n depth: s + 1\n }))));\n }).toArray() : null, g ? Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"td\", null, \" \")) : null, g ? e.entrySeq().map(([e, t]) => {\n if (\"x-\" !== e.slice(0, 2)) return;\n const r = t ? t.toJS ? t.toJS() : t : null;\n return Xe.default.createElement(\"tr\", {\n key: e,\n className: \"extension\"\n }, Xe.default.createElement(\"td\", null, e), Xe.default.createElement(\"td\", null, JSON.stringify(r)));\n }).toArray() : null, _ && _.size ? Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"td\", null, \"< * >:\"), Xe.default.createElement(\"td\", null, Xe.default.createElement(A, (0, cr.default)({}, u, {\n required: !1,\n getComponent: a,\n specPath: c.push(\"additionalProperties\"),\n getConfigs: o,\n schema: _,\n depth: s + 1\n })))) : null, j ? Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"td\", null, \"allOf ->\"), Xe.default.createElement(\"td\", null, j.map((e, t) => Xe.default.createElement(\"div\", {\n key: t\n }, Xe.default.createElement(A, (0, cr.default)({}, u, {\n required: !1,\n getComponent: a,\n specPath: c.push(\"allOf\", t),\n getConfigs: o,\n schema: e,\n depth: s + 1\n })))))) : null, P ? Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"td\", null, \"anyOf ->\"), Xe.default.createElement(\"td\", null, P.map((e, t) => Xe.default.createElement(\"div\", {\n key: t\n }, Xe.default.createElement(A, (0, cr.default)({}, u, {\n required: !1,\n getComponent: a,\n specPath: c.push(\"anyOf\", t),\n getConfigs: o,\n schema: e,\n depth: s + 1\n })))))) : null, M ? Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"td\", null, \"oneOf ->\"), Xe.default.createElement(\"td\", null, M.map((e, t) => Xe.default.createElement(\"div\", {\n key: t\n }, Xe.default.createElement(A, (0, cr.default)({}, u, {\n required: !1,\n getComponent: a,\n specPath: c.push(\"oneOf\", t),\n getConfigs: o,\n schema: e,\n depth: s + 1\n })))))) : null, q ? Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"td\", null, \"not ->\"), Xe.default.createElement(\"td\", null, Xe.default.createElement(\"div\", null, Xe.default.createElement(A, (0, cr.default)({}, u, {\n required: !1,\n getComponent: a,\n specPath: c.push(\"not\"),\n getConfigs: o,\n schema: q,\n depth: s + 1\n }))))) : null))), Xe.default.createElement(\"span\", {\n className: \"brace-close\"\n }, \"}\")), w.size ? w.entrySeq().map(([e, t]) => Xe.default.createElement(R, {\n key: `${e}-${t}`,\n propKey: e,\n propVal: t,\n propClass: \"property\"\n })) : null);\n }\n}\nclass ArrayModel extends Xe.Component {\n render() {\n let {\n getComponent: e,\n getConfigs: t,\n schema: r,\n depth: n,\n expandDepth: a,\n name: o,\n displayName: s,\n specPath: l\n } = this.props,\n i = r.get(\"description\"),\n c = r.get(\"items\"),\n u = r.get(\"title\") || s || o,\n d = r.filter((e, t) => -1 === [\"type\", \"items\", \"description\", \"$$ref\", \"externalDocs\"].indexOf(t)),\n p = r.getIn([\"externalDocs\", \"url\"]),\n m = r.getIn([\"externalDocs\", \"description\"]);\n const f = e(\"Markdown\", !0),\n h = e(\"ModelCollapse\"),\n g = e(\"Model\"),\n y = e(\"Property\"),\n S = e(\"Link\"),\n _ = u && Xe.default.createElement(\"span\", {\n className: \"model-title\"\n }, Xe.default.createElement(\"span\", {\n className: \"model-title__text\"\n }, u));\n return Xe.default.createElement(\"span\", {\n className: \"model\"\n }, Xe.default.createElement(h, {\n title: _,\n expanded: n <= a,\n collapsedContent: \"[...]\"\n }, \"[\", d.size ? d.entrySeq().map(([e, t]) => Xe.default.createElement(y, {\n key: `${e}-${t}`,\n propKey: e,\n propVal: t,\n propClass: \"property\"\n })) : null, i ? Xe.default.createElement(f, {\n source: i\n }) : d.size ? Xe.default.createElement(\"div\", {\n className: \"markdown\"\n }) : null, p && Xe.default.createElement(\"div\", {\n className: \"external-docs\"\n }, Xe.default.createElement(S, {\n target: \"_blank\",\n href: sanitizeUrl(p)\n }, m || p)), Xe.default.createElement(\"span\", null, Xe.default.createElement(g, (0, cr.default)({}, this.props, {\n getConfigs: t,\n specPath: l.push(\"items\"),\n name: null,\n schema: c,\n required: !1,\n depth: n + 1\n }))), \"]\"));\n }\n}\nconst Or = \"property primitive\";\nclass Primitive extends Xe.Component {\n render() {\n let {\n schema: e,\n getComponent: t,\n getConfigs: r,\n name: n,\n displayName: a,\n depth: o,\n expandDepth: s\n } = this.props;\n const {\n showExtensions: l\n } = r();\n if (!e || !e.get) return Xe.default.createElement(\"div\", null);\n let i = e.get(\"type\"),\n c = e.get(\"format\"),\n u = e.get(\"xml\"),\n d = e.get(\"enum\"),\n p = e.get(\"title\") || a || n,\n m = e.get(\"description\"),\n f = getExtensions(e),\n h = e.filter((e, t) => -1 === [\"enum\", \"type\", \"format\", \"description\", \"$$ref\", \"externalDocs\"].indexOf(t)).filterNot((e, t) => f.has(t)),\n g = e.getIn([\"externalDocs\", \"url\"]),\n y = e.getIn([\"externalDocs\", \"description\"]);\n const S = t(\"Markdown\", !0),\n _ = t(\"EnumModel\"),\n v = t(\"Property\"),\n b = t(\"ModelCollapse\"),\n w = t(\"Link\"),\n C = p && Xe.default.createElement(\"span\", {\n className: \"model-title\"\n }, Xe.default.createElement(\"span\", {\n className: \"model-title__text\"\n }, p));\n return Xe.default.createElement(\"span\", {\n className: \"model\"\n }, Xe.default.createElement(b, {\n title: C,\n expanded: o <= s,\n collapsedContent: \"[...]\"\n }, Xe.default.createElement(\"span\", {\n className: \"prop\"\n }, n && o > 1 && Xe.default.createElement(\"span\", {\n className: \"prop-name\"\n }, p), Xe.default.createElement(\"span\", {\n className: \"prop-type\"\n }, i), c && Xe.default.createElement(\"span\", {\n className: \"prop-format\"\n }, \"($\", c, \")\"), h.size ? h.entrySeq().map(([e, t]) => Xe.default.createElement(v, {\n key: `${e}-${t}`,\n propKey: e,\n propVal: t,\n propClass: Or\n })) : null, l && f.size ? f.entrySeq().map(([e, t]) => Xe.default.createElement(v, {\n key: `${e}-${t}`,\n propKey: e,\n propVal: t,\n propClass: Or\n })) : null, m ? Xe.default.createElement(S, {\n source: m\n }) : null, g && Xe.default.createElement(\"div\", {\n className: \"external-docs\"\n }, Xe.default.createElement(w, {\n target: \"_blank\",\n href: sanitizeUrl(g)\n }, y || g)), u && u.size ? Xe.default.createElement(\"span\", null, Xe.default.createElement(\"br\", null), Xe.default.createElement(\"span\", {\n className: Or\n }, \"xml:\"), u.entrySeq().map(([e, t]) => Xe.default.createElement(\"span\", {\n key: `${e}-${t}`,\n className: Or\n }, Xe.default.createElement(\"br\", null), \"   \", e, \": \", String(t))).toArray()) : null, d && Xe.default.createElement(_, {\n value: d,\n getComponent: t\n }))));\n }\n}\nclass Schemes extends Xe.default.Component {\n UNSAFE_componentWillMount() {\n let {\n schemes: e\n } = this.props;\n this.setScheme(e.first());\n }\n UNSAFE_componentWillReceiveProps(e) {\n this.props.currentScheme && e.schemes.includes(this.props.currentScheme) || this.setScheme(e.schemes.first());\n }\n onChange = e => {\n this.setScheme(e.target.value);\n };\n setScheme = e => {\n let {\n path: t,\n method: r,\n specActions: n\n } = this.props;\n n.setScheme(e, t, r);\n };\n render() {\n let {\n schemes: e,\n currentScheme: t\n } = this.props;\n return Xe.default.createElement(\"label\", {\n htmlFor: \"schemes\"\n }, Xe.default.createElement(\"span\", {\n className: \"schemes-title\"\n }, \"Schemes\"), Xe.default.createElement(\"select\", {\n onChange: this.onChange,\n value: t,\n id: \"schemes\"\n }, e.valueSeq().map(e => Xe.default.createElement(\"option\", {\n value: e,\n key: e\n }, e)).toArray()));\n }\n}\nclass SchemesContainer extends Xe.default.Component {\n render() {\n const {\n specActions: e,\n specSelectors: t,\n getComponent: r\n } = this.props,\n n = t.operationScheme(),\n a = t.schemes(),\n o = r(\"schemes\");\n return a && a.size ? Xe.default.createElement(o, {\n currentScheme: n,\n schemes: a,\n specActions: e\n }) : null;\n }\n}\nvar kr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n default: function () {\n return R.default;\n }\n});\nconst Nr = {\n value: \"\",\n onChange: () => {},\n schema: {},\n keyName: \"\",\n required: !1,\n errors: (0, Qe.List)()\n};\nlet JsonSchemaForm = /*#__PURE__*/(() => {\n class JsonSchemaForm extends Xe.Component {\n static defaultProps = Nr;\n componentDidMount() {\n const {\n dispatchInitialValue: e,\n value: t,\n onChange: r\n } = this.props;\n e ? r(t) : !1 === e && r(\"\");\n }\n render() {\n let {\n schema: e,\n errors: t,\n value: r,\n onChange: n,\n getComponent: a,\n fn: o,\n disabled: s\n } = this.props;\n const l = e && e.get ? e.get(\"format\") : null,\n i = e && e.get ? e.get(\"type\") : null;\n let getComponentSilently = e => a(e, !1, {\n failSilently: !0\n }),\n c = i ? getComponentSilently(l ? `JsonSchema_${i}_${l}` : `JsonSchema_${i}`) : a(\"JsonSchema_string\");\n return c || (c = a(\"JsonSchema_string\")), Xe.default.createElement(c, (0, cr.default)({}, this.props, {\n errors: t,\n fn: o,\n getComponent: a,\n value: r,\n onChange: n,\n schema: e,\n disabled: s\n }));\n }\n }\n return JsonSchemaForm;\n})();\nlet JsonSchema_string = /*#__PURE__*/(() => {\n class JsonSchema_string extends Xe.Component {\n static defaultProps = Nr;\n onChange = e => {\n const t = this.props.schema && \"file\" === this.props.schema.get(\"type\") ? e.target.files[0] : e.target.value;\n this.props.onChange(t, this.props.keyName);\n };\n onEnumChange = e => this.props.onChange(e);\n render() {\n let {\n getComponent: e,\n value: t,\n schema: r,\n errors: n,\n required: a,\n description: o,\n disabled: s\n } = this.props;\n const l = r && r.get ? r.get(\"enum\") : null,\n i = r && r.get ? r.get(\"format\") : null,\n c = r && r.get ? r.get(\"type\") : null,\n u = r && r.get ? r.get(\"in\") : null;\n if (t || (t = \"\"), n = n.toJS ? n.toJS() : [], l) {\n const r = e(\"Select\");\n return Xe.default.createElement(r, {\n className: n.length ? \"invalid\" : \"\",\n title: n.length ? n : \"\",\n allowedValues: [...l],\n value: t,\n allowEmptyValue: !a,\n disabled: s,\n onChange: this.onEnumChange\n });\n }\n const d = s || u && \"formData\" === u && !(\"FormData\" in window),\n p = e(\"Input\");\n return c && \"file\" === c ? Xe.default.createElement(p, {\n type: \"file\",\n className: n.length ? \"invalid\" : \"\",\n title: n.length ? n : \"\",\n onChange: this.onChange,\n disabled: d\n }) : Xe.default.createElement(kr.default, {\n type: i && \"password\" === i ? \"password\" : \"text\",\n className: n.length ? \"invalid\" : \"\",\n title: n.length ? n : \"\",\n value: t,\n minLength: 0,\n debounceTimeout: 350,\n placeholder: o,\n onChange: this.onChange,\n disabled: d\n });\n }\n }\n return JsonSchema_string;\n})();\nlet JsonSchema_array = /*#__PURE__*/(() => {\n class JsonSchema_array extends Xe.PureComponent {\n static defaultProps = Nr;\n constructor(e, t) {\n super(e, t), this.state = {\n value: valueOrEmptyList(e.value),\n schema: e.schema\n };\n }\n UNSAFE_componentWillReceiveProps(e) {\n const t = valueOrEmptyList(e.value);\n t !== this.state.value && this.setState({\n value: t\n }), e.schema !== this.state.schema && this.setState({\n schema: e.schema\n });\n }\n onChange = () => {\n this.props.onChange(this.state.value);\n };\n onItemChange = (e, t) => {\n this.setState(({\n value: r\n }) => ({\n value: r.set(t, e)\n }), this.onChange);\n };\n removeItem = e => {\n this.setState(({\n value: t\n }) => ({\n value: t.delete(e)\n }), this.onChange);\n };\n addItem = () => {\n const {\n fn: e\n } = this.props;\n let t = valueOrEmptyList(this.state.value);\n this.setState(() => ({\n value: t.push(e.getSampleSchema(this.state.schema.get(\"items\"), !1, {\n includeWriteOnly: !0\n }))\n }), this.onChange);\n };\n onEnumChange = e => {\n this.setState(() => ({\n value: e\n }), this.onChange);\n };\n render() {\n let {\n getComponent: e,\n required: t,\n schema: r,\n errors: n,\n fn: a,\n disabled: o\n } = this.props;\n n = n.toJS ? n.toJS() : Array.isArray(n) ? n : [];\n const s = n.filter(e => \"string\" == typeof e),\n l = n.filter(e => void 0 !== e.needRemove).map(e => e.error),\n i = this.state.value,\n c = !!(i && i.count && i.count() > 0),\n u = r.getIn([\"items\", \"enum\"]),\n d = r.getIn([\"items\", \"type\"]),\n p = r.getIn([\"items\", \"format\"]),\n m = r.get(\"items\");\n let f,\n h = !1,\n g = \"file\" === d || \"string\" === d && \"binary\" === p;\n if (d && p ? f = e(`JsonSchema_${d}_${p}`) : \"boolean\" !== d && \"array\" !== d && \"object\" !== d || (f = e(`JsonSchema_${d}`)), f || g || (h = !0), u) {\n const r = e(\"Select\");\n return Xe.default.createElement(r, {\n className: n.length ? \"invalid\" : \"\",\n title: n.length ? n : \"\",\n multiple: !0,\n value: i,\n disabled: o,\n allowedValues: u,\n allowEmptyValue: !t,\n onChange: this.onEnumChange\n });\n }\n const y = e(\"Button\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-array\"\n }, c ? i.map((t, r) => {\n const s = (0, Qe.fromJS)([...n.filter(e => e.index === r).map(e => e.error)]);\n return Xe.default.createElement(\"div\", {\n key: r,\n className: \"json-schema-form-item\"\n }, g ? Xe.default.createElement(JsonSchemaArrayItemFile, {\n value: t,\n onChange: e => this.onItemChange(e, r),\n disabled: o,\n errors: s,\n getComponent: e\n }) : h ? Xe.default.createElement(JsonSchemaArrayItemText, {\n value: t,\n onChange: e => this.onItemChange(e, r),\n disabled: o,\n errors: s\n }) : Xe.default.createElement(f, (0, cr.default)({}, this.props, {\n value: t,\n onChange: e => this.onItemChange(e, r),\n disabled: o,\n errors: s,\n schema: m,\n getComponent: e,\n fn: a\n })), o ? null : Xe.default.createElement(y, {\n className: `btn btn-sm json-schema-form-item-remove ${l.length ? \"invalid\" : null}`,\n title: l.length ? l : \"\",\n onClick: () => this.removeItem(r)\n }, \" - \"));\n }) : null, o ? null : Xe.default.createElement(y, {\n className: `btn btn-sm json-schema-form-item-add ${s.length ? \"invalid\" : null}`,\n title: s.length ? s : \"\",\n onClick: this.addItem\n }, \"Add \", d ? `${d} ` : \"\", \"item\"));\n }\n }\n return JsonSchema_array;\n})();\nlet JsonSchemaArrayItemText = /*#__PURE__*/(() => {\n class JsonSchemaArrayItemText extends Xe.Component {\n static defaultProps = Nr;\n onChange = e => {\n const t = e.target.value;\n this.props.onChange(t, this.props.keyName);\n };\n render() {\n let {\n value: e,\n errors: t,\n description: r,\n disabled: n\n } = this.props;\n return e || (e = \"\"), t = t.toJS ? t.toJS() : [], Xe.default.createElement(kr.default, {\n type: \"text\",\n className: t.length ? \"invalid\" : \"\",\n title: t.length ? t : \"\",\n value: e,\n minLength: 0,\n debounceTimeout: 350,\n placeholder: r,\n onChange: this.onChange,\n disabled: n\n });\n }\n }\n return JsonSchemaArrayItemText;\n})();\nlet JsonSchemaArrayItemFile = /*#__PURE__*/(() => {\n class JsonSchemaArrayItemFile extends Xe.Component {\n static defaultProps = Nr;\n onFileChange = e => {\n const t = e.target.files[0];\n this.props.onChange(t, this.props.keyName);\n };\n render() {\n let {\n getComponent: e,\n errors: t,\n disabled: r\n } = this.props;\n const n = e(\"Input\"),\n a = r || !(\"FormData\" in window);\n return Xe.default.createElement(n, {\n type: \"file\",\n className: t.length ? \"invalid\" : \"\",\n title: t.length ? t : \"\",\n onChange: this.onFileChange,\n disabled: a\n });\n }\n }\n return JsonSchemaArrayItemFile;\n})();\nlet JsonSchema_boolean = /*#__PURE__*/(() => {\n class JsonSchema_boolean extends Xe.Component {\n static defaultProps = Nr;\n onEnumChange = e => this.props.onChange(e);\n render() {\n let {\n getComponent: e,\n value: t,\n errors: r,\n schema: n,\n required: a,\n disabled: o\n } = this.props;\n r = r.toJS ? r.toJS() : [];\n let s = n && n.get ? n.get(\"enum\") : null,\n l = !s || !a,\n i = !s && [\"true\", \"false\"];\n const c = e(\"Select\");\n return Xe.default.createElement(c, {\n className: r.length ? \"invalid\" : \"\",\n title: r.length ? r : \"\",\n value: String(t),\n disabled: o,\n allowedValues: s ? [...s] : i,\n allowEmptyValue: l,\n onChange: this.onEnumChange\n });\n }\n }\n return JsonSchema_boolean;\n})();\nconst stringifyObjectErrors = e => e.map(e => {\n const t = void 0 !== e.propKey ? e.propKey : e.index;\n let r = \"string\" == typeof e ? e : \"string\" == typeof e.error ? e.error : null;\n if (!t && r) return r;\n let n = e.error,\n a = `/${e.propKey}`;\n for (; \"object\" == typeof n;) {\n const e = void 0 !== n.propKey ? n.propKey : n.index;\n if (void 0 === e) break;\n if (a += `/${e}`, !n.error) break;\n n = n.error;\n }\n return `${a}: ${n}`;\n});\nlet JsonSchema_object = /*#__PURE__*/(() => {\n class JsonSchema_object extends Xe.PureComponent {\n constructor() {\n super();\n }\n static defaultProps = Nr;\n onChange = e => {\n this.props.onChange(e);\n };\n handleOnChange = e => {\n const t = e.target.value;\n this.onChange(t);\n };\n render() {\n let {\n getComponent: e,\n value: t,\n errors: r,\n disabled: n\n } = this.props;\n const a = e(\"TextArea\");\n return r = r.toJS ? r.toJS() : Array.isArray(r) ? r : [], Xe.default.createElement(\"div\", null, Xe.default.createElement(a, {\n className: (0, _r.default)({\n invalid: r.length\n }),\n title: r.length ? stringifyObjectErrors(r).join(\", \") : \"\",\n value: stringify(t),\n disabled: n,\n onChange: this.handleOnChange\n }));\n }\n }\n return JsonSchema_object;\n})();\nfunction valueOrEmptyList(e) {\n return Qe.List.isList(e) ? e : Array.isArray(e) ? (0, Qe.fromJS)(e) : (0, Qe.List)();\n}\nvar json_schema_5 = () => ({\n components: {\n modelExample: model_example,\n ModelWrapper,\n ModelCollapse,\n Model,\n Models,\n EnumModel: enum_model,\n ObjectModel,\n ArrayModel,\n PrimitiveModel: Primitive,\n schemes: Schemes,\n SchemesContainer,\n ...Ue\n }\n }),\n Ar = __webpack_require__(123),\n Ir = __webpack_require__.n(Ar),\n Rr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return T.default;\n }\n }),\n Tr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return B.default;\n }\n });\nconst shallowArrayEquals = e => t => Array.isArray(e) && Array.isArray(t) && e.length === t.length && e.every((e, r) => e === t[r]),\n list = (...e) => e;\nclass Cache extends Map {\n delete(e) {\n const t = Array.from(this.keys()).find(shallowArrayEquals(e));\n return super.delete(t);\n }\n get(e) {\n const t = Array.from(this.keys()).find(shallowArrayEquals(e));\n return super.get(t);\n }\n has(e) {\n return -1 !== Array.from(this.keys()).findIndex(shallowArrayEquals(e));\n }\n}\nvar utils_memoizeN = (e, t = list) => {\n const {\n Cache: r\n } = mt.default;\n mt.default.Cache = Cache;\n const n = (0, mt.default)(e, t);\n return mt.default.Cache = r, n;\n};\nconst Br = {\n string: e => e.pattern ? (e => {\n try {\n return new Rr.default(e).gen();\n } catch (e) {\n return \"string\";\n }\n })(e.pattern) : \"string\",\n string_email: () => \"user@example.com\",\n \"string_date-time\": () => new Date().toISOString(),\n string_date: () => new Date().toISOString().substring(0, 10),\n string_uuid: () => \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n string_hostname: () => \"example.com\",\n string_ipv4: () => \"198.51.100.42\",\n string_ipv6: () => \"2001:0db8:5b96:0000:0000:426f:8e17:642a\",\n number: () => 0,\n number_float: () => 0,\n integer: () => 0,\n boolean: e => \"boolean\" != typeof e.default || e.default\n },\n primitive = e => {\n e = objectify(e);\n let {\n type: t,\n format: r\n } = e,\n n = Br[`${t}_${r}`] || Br[t];\n return isFunc(n) ? n(e) : \"Unknown Type: \" + e.type;\n },\n sanitizeRef = e => deeplyStripKey(e, \"$$ref\", e => \"string\" == typeof e && e.indexOf(\"#\") > -1),\n jr = [\"maxProperties\", \"minProperties\"],\n Pr = [\"minItems\", \"maxItems\"],\n Mr = [\"minimum\", \"maximum\", \"exclusiveMinimum\", \"exclusiveMaximum\"],\n qr = [\"minLength\", \"maxLength\"],\n mergeJsonSchema = (e, t, r = {}) => {\n const n = {\n ...e\n };\n if ([\"example\", \"default\", \"enum\", \"xml\", \"type\", ...jr, ...Pr, ...Mr, ...qr].forEach(e => (e => {\n void 0 === n[e] && void 0 !== t[e] && (n[e] = t[e]);\n })(e)), void 0 !== t.required && Array.isArray(t.required) && (void 0 !== n.required && n.required.length || (n.required = []), t.required.forEach(e => {\n n.required.includes(e) || n.required.push(e);\n })), t.properties) {\n n.properties || (n.properties = {});\n let e = objectify(t.properties);\n for (let a in e) Object.prototype.hasOwnProperty.call(e, a) && (e[a] && e[a].deprecated || e[a] && e[a].readOnly && !r.includeReadOnly || e[a] && e[a].writeOnly && !r.includeWriteOnly || n.properties[a] || (n.properties[a] = e[a], !t.required && Array.isArray(t.required) && -1 !== t.required.indexOf(a) && (n.required ? n.required.push(a) : n.required = [a])));\n }\n return t.items && (n.items || (n.items = {}), n.items = mergeJsonSchema(n.items, t.items, r)), n;\n },\n sampleFromSchemaGeneric = (e, t = {}, r = void 0, n = !1) => {\n e && isFunc(e.toJS) && (e = e.toJS());\n let a = void 0 !== r || e && void 0 !== e.example || e && void 0 !== e.default;\n const o = !a && e && e.oneOf && e.oneOf.length > 0,\n s = !a && e && e.anyOf && e.anyOf.length > 0;\n if (!a && (o || s)) {\n const r = objectify(o ? e.oneOf[0] : e.anyOf[0]);\n if (!(e = mergeJsonSchema(e, r, t)).xml && r.xml && (e.xml = r.xml), void 0 !== e.example && void 0 !== r.example) a = !0;else if (r.properties) {\n e.properties || (e.properties = {});\n let n = objectify(r.properties);\n for (let a in n) Object.prototype.hasOwnProperty.call(n, a) && (n[a] && n[a].deprecated || n[a] && n[a].readOnly && !t.includeReadOnly || n[a] && n[a].writeOnly && !t.includeWriteOnly || e.properties[a] || (e.properties[a] = n[a], !r.required && Array.isArray(r.required) && -1 !== r.required.indexOf(a) && (e.required ? e.required.push(a) : e.required = [a])));\n }\n }\n const l = {};\n let {\n xml: i,\n type: c,\n example: u,\n properties: d,\n additionalProperties: p,\n items: m\n } = e || {},\n {\n includeReadOnly: f,\n includeWriteOnly: h\n } = t;\n i = i || {};\n let g,\n {\n name: y,\n prefix: S,\n namespace: _\n } = i,\n v = {};\n if (n && (y = y || \"notagname\", g = (S ? S + \":\" : \"\") + y, _)) {\n l[S ? \"xmlns:\" + S : \"xmlns\"] = _;\n }\n n && (v[g] = []);\n const schemaHasAny = t => t.some(t => Object.prototype.hasOwnProperty.call(e, t));\n e && !c && (d || p || schemaHasAny(jr) ? c = \"object\" : m || schemaHasAny(Pr) ? c = \"array\" : schemaHasAny(Mr) ? (c = \"number\", e.type = \"number\") : a || e.enum || (c = \"string\", e.type = \"string\"));\n const handleMinMaxItems = t => {\n if (null != e?.maxItems && (t = t.slice(0, e?.maxItems)), null != e?.minItems) {\n let r = 0;\n for (; t.length < e?.minItems;) t.push(t[r++ % t.length]);\n }\n return t;\n },\n b = objectify(d);\n let w,\n C = 0;\n const hasExceededMaxProperties = () => e && null !== e.maxProperties && void 0 !== e.maxProperties && C >= e.maxProperties,\n canAddProperty = t => !e || null === e.maxProperties || void 0 === e.maxProperties || !hasExceededMaxProperties() && (!(t => !(e && e.required && e.required.length && e.required.includes(t)))(t) || e.maxProperties - C - (() => {\n if (!e || !e.required) return 0;\n let t = 0;\n return n ? e.required.forEach(e => t += void 0 === v[e] ? 0 : 1) : e.required.forEach(e => t += void 0 === v[g]?.find(t => void 0 !== t[e]) ? 0 : 1), e.required.length - t;\n })() > 0);\n if (w = n ? (r, a = void 0) => {\n if (e && b[r]) {\n if (b[r].xml = b[r].xml || {}, b[r].xml.attribute) {\n const e = Array.isArray(b[r].enum) ? b[r].enum[0] : void 0,\n t = b[r].example,\n n = b[r].default;\n return void (l[b[r].xml.name || r] = void 0 !== t ? t : void 0 !== n ? n : void 0 !== e ? e : primitive(b[r]));\n }\n b[r].xml.name = b[r].xml.name || r;\n } else b[r] || !1 === p || (b[r] = {\n xml: {\n name: r\n }\n });\n let o = sampleFromSchemaGeneric(e && b[r] || void 0, t, a, n);\n canAddProperty(r) && (C++, Array.isArray(o) ? v[g] = v[g].concat(o) : v[g].push(o));\n } : (r, a) => {\n if (canAddProperty(r)) {\n if (Object.prototype.hasOwnProperty.call(e, \"discriminator\") && e.discriminator && Object.prototype.hasOwnProperty.call(e.discriminator, \"mapping\") && e.discriminator.mapping && Object.prototype.hasOwnProperty.call(e, \"$$ref\") && e.$$ref && e.discriminator.propertyName === r) {\n for (let t in e.discriminator.mapping) if (-1 !== e.$$ref.search(e.discriminator.mapping[t])) {\n v[r] = t;\n break;\n }\n } else v[r] = sampleFromSchemaGeneric(b[r], t, a, n);\n C++;\n }\n }, a) {\n let a;\n if (a = sanitizeRef(void 0 !== r ? r : void 0 !== u ? u : e.default), !n) {\n if (\"number\" == typeof a && \"string\" === c) return `${a}`;\n if (\"string\" != typeof a || \"string\" === c) return a;\n try {\n return JSON.parse(a);\n } catch (e) {\n return a;\n }\n }\n if (e || (c = Array.isArray(a) ? \"array\" : typeof a), \"array\" === c) {\n if (!Array.isArray(a)) {\n if (\"string\" == typeof a) return a;\n a = [a];\n }\n const r = e ? e.items : void 0;\n r && (r.xml = r.xml || i || {}, r.xml.name = r.xml.name || i.name);\n let o = a.map(e => sampleFromSchemaGeneric(r, t, e, n));\n return o = handleMinMaxItems(o), i.wrapped ? (v[g] = o, (0, Tr.default)(l) || v[g].push({\n _attr: l\n })) : v = o, v;\n }\n if (\"object\" === c) {\n if (\"string\" == typeof a) return a;\n for (let t in a) Object.prototype.hasOwnProperty.call(a, t) && (e && b[t] && b[t].readOnly && !f || e && b[t] && b[t].writeOnly && !h || (e && b[t] && b[t].xml && b[t].xml.attribute ? l[b[t].xml.name || t] = a[t] : w(t, a[t])));\n return (0, Tr.default)(l) || v[g].push({\n _attr: l\n }), v;\n }\n return v[g] = (0, Tr.default)(l) ? a : [{\n _attr: l\n }, a], v;\n }\n if (\"object\" === c) {\n for (let e in b) Object.prototype.hasOwnProperty.call(b, e) && (b[e] && b[e].deprecated || b[e] && b[e].readOnly && !f || b[e] && b[e].writeOnly && !h || w(e));\n if (n && l && v[g].push({\n _attr: l\n }), hasExceededMaxProperties()) return v;\n if (!0 === p) n ? v[g].push({\n additionalProp: \"Anything can be here\"\n }) : v.additionalProp1 = {}, C++;else if (p) {\n const r = objectify(p),\n a = sampleFromSchemaGeneric(r, t, void 0, n);\n if (n && r.xml && r.xml.name && \"notagname\" !== r.xml.name) v[g].push(a);else {\n const t = null !== e.minProperties && void 0 !== e.minProperties && C < e.minProperties ? e.minProperties - C : 3;\n for (let e = 1; e <= t; e++) {\n if (hasExceededMaxProperties()) return v;\n if (n) {\n const t = {};\n t[\"additionalProp\" + e] = a.notagname, v[g].push(t);\n } else v[\"additionalProp\" + e] = a;\n C++;\n }\n }\n }\n return v;\n }\n if (\"array\" === c) {\n if (!m) return;\n let r;\n if (n && (m.xml = m.xml || e?.xml || {}, m.xml.name = m.xml.name || i.name), Array.isArray(m.anyOf)) r = m.anyOf.map(e => sampleFromSchemaGeneric(mergeJsonSchema(e, m, t), t, void 0, n));else if (Array.isArray(m.oneOf)) r = m.oneOf.map(e => sampleFromSchemaGeneric(mergeJsonSchema(e, m, t), t, void 0, n));else {\n if (!(!n || n && i.wrapped)) return sampleFromSchemaGeneric(m, t, void 0, n);\n r = [sampleFromSchemaGeneric(m, t, void 0, n)];\n }\n return r = handleMinMaxItems(r), n && i.wrapped ? (v[g] = r, (0, Tr.default)(l) || v[g].push({\n _attr: l\n }), v) : r;\n }\n let x;\n if (e && Array.isArray(e.enum)) x = normalizeArray(e.enum)[0];else {\n if (!e) return;\n if (x = primitive(e), \"number\" == typeof x) {\n let t = e.minimum;\n null != t && (e.exclusiveMinimum && t++, x = t);\n let r = e.maximum;\n null != r && (e.exclusiveMaximum && r--, x = r);\n }\n if (\"string\" == typeof x && (null !== e.maxLength && void 0 !== e.maxLength && (x = x.slice(0, e.maxLength)), null !== e.minLength && void 0 !== e.minLength)) {\n let t = 0;\n for (; x.length < e.minLength;) x += x[t++ % x.length];\n }\n }\n if (\"file\" !== c) return n ? (v[g] = (0, Tr.default)(l) ? x : [{\n _attr: l\n }, x], v) : x;\n },\n inferSchema = e => (e.schema && (e = e.schema), e.properties && (e.type = \"object\"), e),\n createXMLExample = (e, t, r) => {\n const n = sampleFromSchemaGeneric(e, t, r, !0);\n if (n) return \"string\" == typeof n ? n : Ir()(n, {\n declaration: !0,\n indent: \"\\t\"\n });\n },\n sampleFromSchema = (e, t, r) => sampleFromSchemaGeneric(e, t, r, !1),\n resolver = (e, t, r) => [e, JSON.stringify(t), JSON.stringify(r)],\n Lr = utils_memoizeN(createXMLExample, resolver),\n Dr = utils_memoizeN(sampleFromSchema, resolver),\n Ur = [{\n when: /json/,\n shouldStringifyTypes: [\"string\"]\n }],\n $r = [\"object\"];\nvar get_json_sample_schema = e => (t, r, n, a) => {\n const {\n fn: o\n } = e(),\n s = o.memoizedSampleFromSchema(t, r, a),\n l = typeof s,\n i = Ur.reduce((e, t) => t.when.test(n) ? [...e, ...t.shouldStringifyTypes] : e, $r);\n return (0, gt.default)(i, e => e === l) ? JSON.stringify(s, null, 2) : s;\n};\nvar get_yaml_sample_schema = e => (t, r, n, a) => {\n const {\n fn: o\n } = e(),\n s = o.getJsonSampleSchema(t, r, n, a);\n let l;\n try {\n l = Ht.default.dump(Ht.default.load(s), {\n lineWidth: -1\n }, {\n schema: Ht.JSON_SCHEMA\n }), \"\\n\" === l[l.length - 1] && (l = l.slice(0, l.length - 1));\n } catch (e) {\n return console.error(e), \"error: could not generate yaml example\";\n }\n return l.replace(/\\t/g, \" \");\n};\nvar get_xml_sample_schema = e => (t, r, n) => {\n const {\n fn: a\n } = e();\n if (t && !t.xml && (t.xml = {}), t && !t.xml.name) {\n if (!t.$$ref && (t.type || t.items || t.properties || t.additionalProperties)) return '\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';\n if (t.$$ref) {\n let e = t.$$ref.match(/\\S*\\/(\\S+)$/);\n t.xml.name = e[1];\n }\n }\n return a.memoizedCreateXMLExample(t, r, n);\n};\nvar get_sample_schema = e => (t, r = \"\", n = {}, a = void 0) => {\n const {\n fn: o\n } = e();\n return \"function\" == typeof t?.toJS && (t = t.toJS()), \"function\" == typeof a?.toJS && (a = a.toJS()), /xml/.test(r) ? o.getXmlSampleSchema(t, n, a) : /(yaml|yml)/.test(r) ? o.getYamlSampleSchema(t, n, r, a) : o.getJsonSampleSchema(t, n, r, a);\n};\nvar json_schema_5_samples = ({\n getSystem: e\n }) => {\n const t = get_json_sample_schema(e),\n r = get_yaml_sample_schema(e),\n n = get_xml_sample_schema(e),\n a = get_sample_schema(e);\n return {\n fn: {\n jsonSchema5: {\n inferSchema,\n sampleFromSchema,\n sampleFromSchemaGeneric,\n createXMLExample,\n memoizedSampleFromSchema: Dr,\n memoizedCreateXMLExample: Lr,\n getJsonSampleSchema: t,\n getYamlSampleSchema: r,\n getXmlSampleSchema: n,\n getSampleSchema: a,\n mergeJsonSchema\n },\n inferSchema,\n sampleFromSchema,\n sampleFromSchemaGeneric,\n createXMLExample,\n memoizedSampleFromSchema: Dr,\n memoizedCreateXMLExample: Lr,\n getJsonSampleSchema: t,\n getYamlSampleSchema: r,\n getXmlSampleSchema: n,\n getSampleSchema: a,\n mergeJsonSchema\n }\n };\n },\n Jr = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return j.default;\n }\n });\nconst Vr = [\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\", \"trace\"],\n spec_selectors_state = e => e || (0, Qe.Map)(),\n Kr = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"lastError\")),\n zr = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"url\")),\n Fr = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"spec\") || \"\"),\n Wr = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"specSource\") || \"not-editor\"),\n Hr = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"json\", (0, Qe.Map)())),\n Gr = (0, Dt.createSelector)(Hr, e => e.toJS()),\n Xr = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"resolved\", (0, Qe.Map)())),\n specResolvedSubtree = (e, t) => e.getIn([\"resolvedSubtrees\", ...t], void 0),\n mergerFn = (e, t) => Qe.Map.isMap(e) && Qe.Map.isMap(t) ? t.get(\"$$ref\") ? t : (0, Qe.OrderedMap)().mergeWith(mergerFn, e, t) : t,\n Yr = (0, Dt.createSelector)(spec_selectors_state, e => (0, Qe.OrderedMap)().mergeWith(mergerFn, e.get(\"json\"), e.get(\"resolvedSubtrees\"))),\n spec = e => Hr(e),\n Qr = (0, Dt.createSelector)(spec, () => !1),\n Zr = (0, Dt.createSelector)(spec, e => returnSelfOrNewMap(e && e.get(\"info\"))),\n en = (0, Dt.createSelector)(spec, e => returnSelfOrNewMap(e && e.get(\"externalDocs\"))),\n tn = (0, Dt.createSelector)(Zr, e => e && e.get(\"version\")),\n rn = (0, Dt.createSelector)(tn, e => /v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(e).slice(1)),\n nn = (0, Dt.createSelector)(Yr, e => e.get(\"paths\")),\n an = (0, Jr.default)([\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\"]),\n on = (0, Dt.createSelector)(nn, e => {\n if (!e || e.size < 1) return (0, Qe.List)();\n let t = (0, Qe.List)();\n return e && e.forEach ? (e.forEach((e, r) => {\n if (!e || !e.forEach) return {};\n e.forEach((e, n) => {\n Vr.indexOf(n) < 0 || (t = t.push((0, Qe.fromJS)({\n path: r,\n method: n,\n operation: e,\n id: `${n}-${r}`\n })));\n });\n }), t) : (0, Qe.List)();\n }),\n sn = (0, Dt.createSelector)(spec, e => (0, Qe.Set)(e.get(\"consumes\"))),\n ln = (0, Dt.createSelector)(spec, e => (0, Qe.Set)(e.get(\"produces\"))),\n cn = (0, Dt.createSelector)(spec, e => e.get(\"security\", (0, Qe.List)())),\n un = (0, Dt.createSelector)(spec, e => e.get(\"securityDefinitions\")),\n findDefinition = (e, t) => {\n const r = e.getIn([\"resolvedSubtrees\", \"definitions\", t], null),\n n = e.getIn([\"json\", \"definitions\", t], null);\n return r || n || null;\n },\n dn = (0, Dt.createSelector)(spec, e => {\n const t = e.get(\"definitions\");\n return Qe.Map.isMap(t) ? t : (0, Qe.Map)();\n }),\n pn = (0, Dt.createSelector)(spec, e => e.get(\"basePath\")),\n mn = (0, Dt.createSelector)(spec, e => e.get(\"host\")),\n fn = (0, Dt.createSelector)(spec, e => e.get(\"schemes\", (0, Qe.Map)())),\n hn = (0, Dt.createSelector)([on, sn, ln], (e, t, r) => e.map(e => e.update(\"operation\", e => {\n if (e) {\n if (!Qe.Map.isMap(e)) return;\n return e.withMutations(e => (e.get(\"consumes\") || e.update(\"consumes\", e => (0, Qe.Set)(e).merge(t)), e.get(\"produces\") || e.update(\"produces\", e => (0, Qe.Set)(e).merge(r)), e));\n }\n return (0, Qe.Map)();\n }))),\n gn = (0, Dt.createSelector)(spec, e => {\n const t = e.get(\"tags\", (0, Qe.List)());\n return Qe.List.isList(t) ? t.filter(e => Qe.Map.isMap(e)) : (0, Qe.List)();\n }),\n tagDetails = (e, t) => (gn(e) || (0, Qe.List)()).filter(Qe.Map.isMap).find(e => e.get(\"name\") === t, (0, Qe.Map)()),\n yn = (0, Dt.createSelector)(hn, gn, (e, t) => e.reduce((e, t) => {\n let r = (0, Qe.Set)(t.getIn([\"operation\", \"tags\"]));\n return r.count() < 1 ? e.update(\"default\", (0, Qe.List)(), e => e.push(t)) : r.reduce((e, r) => e.update(r, (0, Qe.List)(), e => e.push(t)), e);\n }, t.reduce((e, t) => e.set(t.get(\"name\"), (0, Qe.List)()), (0, Qe.OrderedMap)()))),\n selectors_taggedOperations = e => ({\n getConfigs: t\n }) => {\n let {\n tagsSorter: r,\n operationsSorter: n\n } = t();\n return yn(e).sortBy((e, t) => t, (e, t) => {\n let n = \"function\" == typeof r ? r : Nt.tagsSorter[r];\n return n ? n(e, t) : null;\n }).map((t, r) => {\n let a = \"function\" == typeof n ? n : Nt.operationsSorter[n],\n o = a ? t.sort(a) : t;\n return (0, Qe.Map)({\n tagDetails: tagDetails(e, r),\n operations: o\n });\n });\n },\n En = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"responses\", (0, Qe.Map)())),\n Sn = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"requests\", (0, Qe.Map)())),\n _n = (0, Dt.createSelector)(spec_selectors_state, e => e.get(\"mutatedRequests\", (0, Qe.Map)())),\n responseFor = (e, t, r) => En(e).getIn([t, r], null),\n requestFor = (e, t, r) => Sn(e).getIn([t, r], null),\n mutatedRequestFor = (e, t, r) => _n(e).getIn([t, r], null),\n allowTryItOutFor = () => !0,\n parameterWithMetaByIdentity = (e, t, r) => {\n const n = Yr(e).getIn([\"paths\", ...t, \"parameters\"], (0, Qe.OrderedMap)()),\n a = e.getIn([\"meta\", \"paths\", ...t, \"parameters\"], (0, Qe.OrderedMap)());\n return n.map(e => {\n const t = a.get(`${r.get(\"in\")}.${r.get(\"name\")}`),\n n = a.get(`${r.get(\"in\")}.${r.get(\"name\")}.hash-${r.hashCode()}`);\n return (0, Qe.OrderedMap)().merge(e, t, n);\n }).find(e => e.get(\"in\") === r.get(\"in\") && e.get(\"name\") === r.get(\"name\"), (0, Qe.OrderedMap)());\n },\n parameterInclusionSettingFor = (e, t, r, n) => {\n const a = `${n}.${r}`;\n return e.getIn([\"meta\", \"paths\", ...t, \"parameter_inclusions\", a], !1);\n },\n parameterWithMeta = (e, t, r, n) => {\n const a = Yr(e).getIn([\"paths\", ...t, \"parameters\"], (0, Qe.OrderedMap)()).find(e => e.get(\"in\") === n && e.get(\"name\") === r, (0, Qe.OrderedMap)());\n return parameterWithMetaByIdentity(e, t, a);\n },\n operationWithMeta = (e, t, r) => {\n const n = Yr(e).getIn([\"paths\", t, r], (0, Qe.OrderedMap)()),\n a = e.getIn([\"meta\", \"paths\", t, r], (0, Qe.OrderedMap)()),\n o = n.get(\"parameters\", (0, Qe.List)()).map(n => parameterWithMetaByIdentity(e, [t, r], n));\n return (0, Qe.OrderedMap)().merge(n, a).set(\"parameters\", o);\n };\nfunction getParameter(e, t, r, n) {\n return t = t || [], e.getIn([\"meta\", \"paths\", ...t, \"parameters\"], (0, Qe.fromJS)([])).find(e => Qe.Map.isMap(e) && e.get(\"name\") === r && e.get(\"in\") === n) || (0, Qe.Map)();\n}\nconst vn = (0, Dt.createSelector)(spec, e => {\n const t = e.get(\"host\");\n return \"string\" == typeof t && t.length > 0 && \"/\" !== t[0];\n});\nfunction parameterValues(e, t, r) {\n return t = t || [], operationWithMeta(e, ...t).get(\"parameters\", (0, Qe.List)()).reduce((e, t) => {\n let n = r && \"body\" === t.get(\"in\") ? t.get(\"value_xml\") : t.get(\"value\");\n return Qe.List.isList(n) && (n = n.filter(e => \"\" !== e)), e.set(paramToIdentifier(t, {\n allowHashes: !1\n }), n);\n }, (0, Qe.fromJS)({}));\n}\nfunction parametersIncludeIn(e, t = \"\") {\n if (Qe.List.isList(e)) return e.some(e => Qe.Map.isMap(e) && e.get(\"in\") === t);\n}\nfunction parametersIncludeType(e, t = \"\") {\n if (Qe.List.isList(e)) return e.some(e => Qe.Map.isMap(e) && e.get(\"type\") === t);\n}\nfunction contentTypeValues(e, t) {\n t = t || [];\n let r = Yr(e).getIn([\"paths\", ...t], (0, Qe.fromJS)({})),\n n = e.getIn([\"meta\", \"paths\", ...t], (0, Qe.fromJS)({})),\n a = currentProducesFor(e, t);\n const o = r.get(\"parameters\") || new Qe.List(),\n s = n.get(\"consumes_value\") ? n.get(\"consumes_value\") : parametersIncludeType(o, \"file\") ? \"multipart/form-data\" : parametersIncludeType(o, \"formData\") ? \"application/x-www-form-urlencoded\" : void 0;\n return (0, Qe.fromJS)({\n requestContentType: s,\n responseContentType: a\n });\n}\nfunction currentProducesFor(e, t) {\n t = t || [];\n const r = Yr(e).getIn([\"paths\", ...t], null);\n if (null === r) return;\n const n = e.getIn([\"meta\", \"paths\", ...t, \"produces_value\"], null),\n a = r.getIn([\"produces\", 0], null);\n return n || a || \"application/json\";\n}\nfunction producesOptionsFor(e, t) {\n t = t || [];\n const r = Yr(e),\n n = r.getIn([\"paths\", ...t], null);\n if (null === n) return;\n const [a] = t,\n o = n.get(\"produces\", null),\n s = r.getIn([\"paths\", a, \"produces\"], null),\n l = r.getIn([\"produces\"], null);\n return o || s || l;\n}\nfunction consumesOptionsFor(e, t) {\n t = t || [];\n const r = Yr(e),\n n = r.getIn([\"paths\", ...t], null);\n if (null === n) return;\n const [a] = t,\n o = n.get(\"consumes\", null),\n s = r.getIn([\"paths\", a, \"consumes\"], null),\n l = r.getIn([\"consumes\"], null);\n return o || s || l;\n}\nconst operationScheme = (e, t, r) => {\n let n = e.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),\n a = Array.isArray(n) ? n[1] : null;\n return e.getIn([\"scheme\", t, r]) || e.getIn([\"scheme\", \"_defaultScheme\"]) || a || \"\";\n },\n canExecuteScheme = (e, t, r) => [\"http\", \"https\"].indexOf(operationScheme(e, t, r)) > -1,\n validationErrors = (e, t) => {\n t = t || [];\n const r = e.getIn([\"meta\", \"paths\", ...t, \"parameters\"], (0, Qe.fromJS)([])),\n n = [];\n if (0 === r.length) return n;\n const getErrorsWithPaths = (e, t = []) => {\n const getNestedErrorsWithPaths = (e, t) => {\n const r = [...t, e.get(\"propKey\") || e.get(\"index\")];\n return Qe.Map.isMap(e.get(\"error\")) ? getErrorsWithPaths(e.get(\"error\"), r) : {\n error: e.get(\"error\"),\n path: r\n };\n };\n return Qe.List.isList(e) ? e.map(e => Qe.Map.isMap(e) ? getNestedErrorsWithPaths(e, t) : {\n error: e,\n path: t\n }) : getNestedErrorsWithPaths(e, t);\n };\n return r.forEach((e, t) => {\n const r = t.split(\".\").slice(1, -1).join(\".\"),\n a = e.get(\"errors\");\n if (a && a.count()) {\n getErrorsWithPaths(a).forEach(({\n error: e,\n path: t\n }) => {\n n.push(((e, t, r) => `For '${r}'${(t = t.reduce((e, t) => \"number\" == typeof t ? `${e}[${t}]` : e ? `${e}.${t}` : t, \"\")) ? ` at path '${t}'` : \"\"}: ${e}.`)(e, t, r));\n });\n }\n }), n;\n },\n validateBeforeExecute = (e, t) => 0 === validationErrors(e, t).length,\n getOAS3RequiredRequestBodyContentType = (e, t) => {\n let r = {\n requestBody: !1,\n requestContentType: {}\n },\n n = e.getIn([\"resolvedSubtrees\", \"paths\", ...t, \"requestBody\"], (0, Qe.fromJS)([]));\n return n.size < 1 || (n.getIn([\"required\"]) && (r.requestBody = n.getIn([\"required\"])), n.getIn([\"content\"]).entrySeq().forEach(e => {\n const t = e[0];\n if (e[1].getIn([\"schema\", \"required\"])) {\n const n = e[1].getIn([\"schema\", \"required\"]).toJS();\n r.requestContentType[t] = n;\n }\n })), r;\n },\n isMediaTypeSchemaPropertiesEqual = (e, t, r, n) => {\n if ((r || n) && r === n) return !0;\n let a = e.getIn([\"resolvedSubtrees\", \"paths\", ...t, \"requestBody\", \"content\"], (0, Qe.fromJS)([]));\n if (a.size < 2 || !r || !n) return !1;\n let o = a.getIn([r, \"schema\", \"properties\"], (0, Qe.fromJS)([])),\n s = a.getIn([n, \"schema\", \"properties\"], (0, Qe.fromJS)([]));\n return !!o.equals(s);\n };\nfunction returnSelfOrNewMap(e) {\n return Qe.Map.isMap(e) ? e : new Qe.Map();\n}\nvar bn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return P.default;\n }\n }),\n wn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return M.default;\n }\n }),\n Cn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return q.default;\n }\n }),\n xn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return L.default;\n }\n });\nconst On = \"spec_update_spec\",\n kn = \"spec_update_url\",\n Nn = \"spec_update_json\",\n An = \"spec_update_param\",\n In = \"spec_update_empty_param_inclusion\",\n Rn = \"spec_validate_param\",\n Tn = \"spec_set_response\",\n Bn = \"spec_set_request\",\n jn = \"spec_set_mutated_request\",\n Pn = \"spec_log_request\",\n Mn = \"spec_clear_response\",\n qn = \"spec_clear_request\",\n Ln = \"spec_clear_validate_param\",\n Dn = \"spec_update_operation_meta_value\",\n Un = \"spec_update_resolved\",\n $n = \"spec_update_resolved_subtree\",\n Jn = \"set_scheme\",\n toStr = e => (0, bn.default)(e) ? e : \"\";\nfunction updateSpec(e) {\n const t = toStr(e).replace(/\\t/g, \" \");\n if (\"string\" == typeof e) return {\n type: On,\n payload: t\n };\n}\nfunction updateResolved(e) {\n return {\n type: Un,\n payload: e\n };\n}\nfunction updateUrl(e) {\n return {\n type: kn,\n payload: e\n };\n}\nfunction updateJsonSpec(e) {\n return {\n type: Nn,\n payload: e\n };\n}\nconst parseToJson = e => ({\n specActions: t,\n specSelectors: r,\n errActions: n\n}) => {\n let {\n specStr: a\n } = r,\n o = null;\n try {\n e = e || a(), n.clear({\n source: \"parser\"\n }), o = Ht.default.load(e, {\n schema: Ht.JSON_SCHEMA\n });\n } catch (e) {\n return console.error(e), n.newSpecErr({\n source: \"parser\",\n level: \"error\",\n message: e.reason,\n line: e.mark && e.mark.line ? e.mark.line + 1 : void 0\n });\n }\n return o && \"object\" == typeof o ? t.updateJsonSpec(o) : {};\n};\nlet Vn = !1;\nconst resolveSpec = (e, t) => ({\n specActions: r,\n specSelectors: n,\n errActions: a,\n fn: {\n fetch: o,\n resolve: s,\n AST: l = {}\n },\n getConfigs: i\n}) => {\n Vn || (console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"), Vn = !0);\n const {\n modelPropertyMacro: c,\n parameterMacro: u,\n requestInterceptor: d,\n responseInterceptor: p\n } = i();\n void 0 === e && (e = n.specJson()), void 0 === t && (t = n.url());\n let m = l.getLineNumberForPath ? l.getLineNumberForPath : () => {},\n f = n.specStr();\n return s({\n fetch: o,\n spec: e,\n baseDoc: String(new URL(t, document.baseURI)),\n modelPropertyMacro: c,\n parameterMacro: u,\n requestInterceptor: d,\n responseInterceptor: p\n }).then(({\n spec: e,\n errors: t\n }) => {\n if (a.clear({\n type: \"thrown\"\n }), Array.isArray(t) && t.length > 0) {\n let e = t.map(e => (console.error(e), e.line = e.fullPath ? m(f, e.fullPath) : null, e.path = e.fullPath ? e.fullPath.join(\".\") : null, e.level = \"error\", e.type = \"thrown\", e.source = \"resolver\", Object.defineProperty(e, \"message\", {\n enumerable: !0,\n value: e.message\n }), e));\n a.newThrownErrBatch(e);\n }\n return r.updateResolved(e);\n });\n};\nlet Kn = [];\nconst zn = (0, wn.default)(() => {\n const e = Kn.reduce((e, {\n path: t,\n system: r\n }) => (e.has(r) || e.set(r, []), e.get(r).push(t), e), new Map());\n Kn = [], e.forEach(async (e, t) => {\n if (!t) return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");\n if (!t.fn.resolveSubtree) return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");\n const {\n errActions: r,\n errSelectors: n,\n fn: {\n resolveSubtree: a,\n fetch: o,\n AST: s = {}\n },\n specSelectors: l,\n specActions: i\n } = t,\n c = s.getLineNumberForPath ?? (0, Jr.default)(void 0),\n u = l.specStr(),\n {\n modelPropertyMacro: d,\n parameterMacro: p,\n requestInterceptor: m,\n responseInterceptor: f\n } = t.getConfigs();\n try {\n const t = await e.reduce(async (e, t) => {\n let {\n resultMap: s,\n specWithCurrentSubtrees: i\n } = await e;\n const {\n errors: h,\n spec: g\n } = await a(i, t, {\n baseDoc: String(new URL(l.url(), document.baseURI)),\n modelPropertyMacro: d,\n parameterMacro: p,\n requestInterceptor: m,\n responseInterceptor: f\n });\n if (n.allErrors().size && r.clearBy(e => \"thrown\" !== e.get(\"type\") || \"resolver\" !== e.get(\"source\") || !e.get(\"fullPath\").every((e, r) => e === t[r] || void 0 === t[r])), Array.isArray(h) && h.length > 0) {\n let e = h.map(e => (e.line = e.fullPath ? c(u, e.fullPath) : null, e.path = e.fullPath ? e.fullPath.join(\".\") : null, e.level = \"error\", e.type = \"thrown\", e.source = \"resolver\", Object.defineProperty(e, \"message\", {\n enumerable: !0,\n value: e.message\n }), e));\n r.newThrownErrBatch(e);\n }\n return g && l.isOAS3() && \"components\" === t[0] && \"securitySchemes\" === t[1] && (await Promise.all(Object.values(g).filter(e => \"openIdConnect\" === e.type).map(async e => {\n const t = {\n url: e.openIdConnectUrl,\n requestInterceptor: m,\n responseInterceptor: f\n };\n try {\n const r = await o(t);\n r instanceof Error || r.status >= 400 ? console.error(r.statusText + \" \" + t.url) : e.openIdConnectData = JSON.parse(r.text);\n } catch (e) {\n console.error(e);\n }\n }))), (0, Cn.default)(s, t, g), i = (0, xn.default)(t, g, i), {\n resultMap: s,\n specWithCurrentSubtrees: i\n };\n }, Promise.resolve({\n resultMap: (l.specResolvedSubtree([]) || (0, Qe.Map)()).toJS(),\n specWithCurrentSubtrees: l.specJS()\n }));\n i.updateResolvedSubtree([], t.resultMap);\n } catch (e) {\n console.error(e);\n }\n });\n }, 35),\n requestResolvedSubtree = e => t => {\n Kn.find(({\n path: r,\n system: n\n }) => n === t && r.toString() === e.toString()) || (Kn.push({\n path: e,\n system: t\n }), zn());\n };\nfunction changeParam(e, t, r, n, a) {\n return {\n type: An,\n payload: {\n path: e,\n value: n,\n paramName: t,\n paramIn: r,\n isXml: a\n }\n };\n}\nfunction changeParamByIdentity(e, t, r, n) {\n return {\n type: An,\n payload: {\n path: e,\n param: t,\n value: r,\n isXml: n\n }\n };\n}\nconst updateResolvedSubtree = (e, t) => ({\n type: $n,\n payload: {\n path: e,\n value: t\n }\n }),\n invalidateResolvedSubtreeCache = () => ({\n type: $n,\n payload: {\n path: [],\n value: (0, Qe.Map)()\n }\n }),\n validateParams = (e, t) => ({\n type: Rn,\n payload: {\n pathMethod: e,\n isOAS3: t\n }\n }),\n updateEmptyParamInclusion = (e, t, r, n) => ({\n type: In,\n payload: {\n pathMethod: e,\n paramName: t,\n paramIn: r,\n includeEmptyValue: n\n }\n });\nfunction clearValidateParams(e) {\n return {\n type: Ln,\n payload: {\n pathMethod: e\n }\n };\n}\nfunction changeConsumesValue(e, t) {\n return {\n type: Dn,\n payload: {\n path: e,\n value: t,\n key: \"consumes_value\"\n }\n };\n}\nfunction changeProducesValue(e, t) {\n return {\n type: Dn,\n payload: {\n path: e,\n value: t,\n key: \"produces_value\"\n }\n };\n}\nconst setResponse = (e, t, r) => ({\n payload: {\n path: e,\n method: t,\n res: r\n },\n type: Tn\n }),\n setRequest = (e, t, r) => ({\n payload: {\n path: e,\n method: t,\n req: r\n },\n type: Bn\n }),\n setMutatedRequest = (e, t, r) => ({\n payload: {\n path: e,\n method: t,\n req: r\n },\n type: jn\n }),\n logRequest = e => ({\n payload: e,\n type: Pn\n }),\n executeRequest = e => ({\n fn: t,\n specActions: r,\n specSelectors: n,\n getConfigs: a,\n oas3Selectors: o\n }) => {\n let {\n pathName: s,\n method: l,\n operation: i\n } = e,\n {\n requestInterceptor: c,\n responseInterceptor: u\n } = a(),\n d = i.toJS();\n if (i && i.get(\"parameters\") && i.get(\"parameters\").filter(e => e && !0 === e.get(\"allowEmptyValue\")).forEach(t => {\n if (n.parameterInclusionSettingFor([s, l], t.get(\"name\"), t.get(\"in\"))) {\n e.parameters = e.parameters || {};\n const r = paramToValue(t, e.parameters);\n (!r || r && 0 === r.size) && (e.parameters[t.get(\"name\")] = \"\");\n }\n }), e.contextUrl = (0, At.default)(n.url()).toString(), d && d.operationId ? e.operationId = d.operationId : d && s && l && (e.operationId = t.opId(d, s, l)), n.isOAS3()) {\n const t = `${s}:${l}`;\n e.server = o.selectedServer(t) || o.selectedServer();\n const r = o.serverVariables({\n server: e.server,\n namespace: t\n }).toJS(),\n n = o.serverVariables({\n server: e.server\n }).toJS();\n e.serverVariables = Object.keys(r).length ? r : n, e.requestContentType = o.requestContentType(s, l), e.responseContentType = o.responseContentType(s, l) || \"*/*\";\n const a = o.requestBodyValue(s, l),\n i = o.requestBodyInclusionSetting(s, l);\n a && a.toJS ? e.requestBody = a.map(e => Qe.Map.isMap(e) ? e.get(\"value\") : e).filter((e, t) => (Array.isArray(e) ? 0 !== e.length : !isEmptyValue(e)) || i.get(t)).toJS() : e.requestBody = a;\n }\n let p = Object.assign({}, e);\n p = t.buildRequest(p), r.setRequest(e.pathName, e.method, p);\n e.requestInterceptor = async t => {\n let n = await c.apply(void 0, [t]),\n a = Object.assign({}, n);\n return r.setMutatedRequest(e.pathName, e.method, a), n;\n }, e.responseInterceptor = u;\n const m = Date.now();\n return t.execute(e).then(t => {\n t.duration = Date.now() - m, r.setResponse(e.pathName, e.method, t);\n }).catch(t => {\n \"Failed to fetch\" === t.message && (t.name = \"\", t.message = '**Failed to fetch.** \\n**Possible Reasons:** \\n - CORS \\n - Network Failure \\n - URL scheme must be \"http\" or \"https\" for CORS request.'), r.setResponse(e.pathName, e.method, {\n error: !0,\n err: t\n });\n });\n },\n actions_execute = ({\n path: e,\n method: t,\n ...r\n } = {}) => n => {\n let {\n fn: {\n fetch: a\n },\n specSelectors: o,\n specActions: s\n } = n,\n l = o.specJsonWithResolvedSubtrees().toJS(),\n i = o.operationScheme(e, t),\n {\n requestContentType: c,\n responseContentType: u\n } = o.contentTypeValues([e, t]).toJS(),\n d = /xml/i.test(c),\n p = o.parameterValues([e, t], d).toJS();\n return s.executeRequest({\n ...r,\n fetch: a,\n spec: l,\n pathName: e,\n method: t,\n parameters: p,\n requestContentType: c,\n scheme: i,\n responseContentType: u\n });\n };\nfunction clearResponse(e, t) {\n return {\n type: Mn,\n payload: {\n path: e,\n method: t\n }\n };\n}\nfunction clearRequest(e, t) {\n return {\n type: qn,\n payload: {\n path: e,\n method: t\n }\n };\n}\nfunction setScheme(e, t, r) {\n return {\n type: Jn,\n payload: {\n scheme: e,\n path: t,\n method: r\n }\n };\n}\nvar Fn = {\n [On]: (e, t) => \"string\" == typeof t.payload ? e.set(\"spec\", t.payload) : e,\n [kn]: (e, t) => e.set(\"url\", t.payload + \"\"),\n [Nn]: (e, t) => e.set(\"json\", fromJSOrdered(t.payload)),\n [Un]: (e, t) => e.setIn([\"resolved\"], fromJSOrdered(t.payload)),\n [$n]: (e, t) => {\n const {\n value: r,\n path: n\n } = t.payload;\n return e.setIn([\"resolvedSubtrees\", ...n], fromJSOrdered(r));\n },\n [An]: (e, {\n payload: t\n }) => {\n let {\n path: r,\n paramName: n,\n paramIn: a,\n param: o,\n value: s,\n isXml: l\n } = t,\n i = o ? paramToIdentifier(o) : `${a}.${n}`;\n const c = l ? \"value_xml\" : \"value\";\n return e.setIn([\"meta\", \"paths\", ...r, \"parameters\", i, c], (0, Qe.fromJS)(s));\n },\n [In]: (e, {\n payload: t\n }) => {\n let {\n pathMethod: r,\n paramName: n,\n paramIn: a,\n includeEmptyValue: o\n } = t;\n if (!n || !a) return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"), e;\n const s = `${a}.${n}`;\n return e.setIn([\"meta\", \"paths\", ...r, \"parameter_inclusions\", s], o);\n },\n [Rn]: (e, {\n payload: {\n pathMethod: t,\n isOAS3: r\n }\n }) => {\n const n = Yr(e).getIn([\"paths\", ...t]),\n a = parameterValues(e, t).toJS();\n return e.updateIn([\"meta\", \"paths\", ...t, \"parameters\"], (0, Qe.fromJS)({}), o => n.get(\"parameters\", (0, Qe.List)()).reduce((n, o) => {\n const s = paramToValue(o, a),\n l = parameterInclusionSettingFor(e, t, o.get(\"name\"), o.get(\"in\")),\n i = ((e, t, {\n isOAS3: r = !1,\n bypassRequiredCheck: n = !1\n } = {}) => {\n let a = e.get(\"required\"),\n {\n schema: o,\n parameterContentMediaType: s\n } = getParameterSchema(e, {\n isOAS3: r\n });\n return validateValueBySchema(t, o, a, n, s);\n })(o, s, {\n bypassRequiredCheck: l,\n isOAS3: r\n });\n return n.setIn([paramToIdentifier(o), \"errors\"], (0, Qe.fromJS)(i));\n }, o));\n },\n [Ln]: (e, {\n payload: {\n pathMethod: t\n }\n }) => e.updateIn([\"meta\", \"paths\", ...t, \"parameters\"], (0, Qe.fromJS)([]), e => e.map(e => e.set(\"errors\", (0, Qe.fromJS)([])))),\n [Tn]: (e, {\n payload: {\n res: t,\n path: r,\n method: n\n }\n }) => {\n let a;\n a = t.error ? Object.assign({\n error: !0,\n name: t.err.name,\n message: t.err.message,\n statusCode: t.err.statusCode\n }, t.err.response) : t, a.headers = a.headers || {};\n let o = e.setIn([\"responses\", r, n], fromJSOrdered(a));\n return dt.Blob && a.data instanceof dt.Blob && (o = o.setIn([\"responses\", r, n, \"text\"], a.data)), o;\n },\n [Bn]: (e, {\n payload: {\n req: t,\n path: r,\n method: n\n }\n }) => e.setIn([\"requests\", r, n], fromJSOrdered(t)),\n [jn]: (e, {\n payload: {\n req: t,\n path: r,\n method: n\n }\n }) => e.setIn([\"mutatedRequests\", r, n], fromJSOrdered(t)),\n [Dn]: (e, {\n payload: {\n path: t,\n value: r,\n key: n\n }\n }) => {\n let a = [\"paths\", ...t],\n o = [\"meta\", \"paths\", ...t];\n return e.getIn([\"json\", ...a]) || e.getIn([\"resolved\", ...a]) || e.getIn([\"resolvedSubtrees\", ...a]) ? e.setIn([...o, n], (0, Qe.fromJS)(r)) : e;\n },\n [Mn]: (e, {\n payload: {\n path: t,\n method: r\n }\n }) => e.deleteIn([\"responses\", t, r]),\n [qn]: (e, {\n payload: {\n path: t,\n method: r\n }\n }) => e.deleteIn([\"requests\", t, r]),\n [Jn]: (e, {\n payload: {\n scheme: t,\n path: r,\n method: n\n }\n }) => r && n ? e.setIn([\"scheme\", r, n], t) : r || n ? void 0 : e.setIn([\"scheme\", \"_defaultScheme\"], t)\n};\nconst wrap_actions_updateSpec = (e, {\n specActions: t\n }) => (...r) => {\n e(...r), t.parseToJson(...r);\n },\n wrap_actions_updateJsonSpec = (e, {\n specActions: t\n }) => (...r) => {\n e(...r), t.invalidateResolvedSubtreeCache();\n const [n] = r,\n a = (0, ar.default)(n, [\"paths\"]) || {};\n Object.keys(a).forEach(e => {\n (0, ar.default)(a, [e]).$ref && t.requestResolvedSubtree([\"paths\", e]);\n }), t.requestResolvedSubtree([\"components\", \"securitySchemes\"]);\n },\n wrap_actions_executeRequest = (e, {\n specActions: t\n }) => r => (t.logRequest(r), e(r)),\n wrap_actions_validateParams = (e, {\n specSelectors: t\n }) => r => e(r, t.isOAS3());\nvar plugins_spec = () => ({\n statePlugins: {\n spec: {\n wrapActions: {\n ...Ve\n },\n reducers: {\n ...Fn\n },\n actions: {\n ...Je\n },\n selectors: {\n ...$e\n }\n }\n }\n }),\n Wn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return D.default;\n }\n }),\n Hn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return U.default;\n }\n }),\n Gn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return $.default;\n }\n }),\n Xn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return J.default;\n }\n }),\n Yn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n makeResolve: function () {\n return V.makeResolve;\n }\n }),\n Qn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n buildRequest: function () {\n return K.buildRequest;\n },\n execute: function () {\n return K.execute;\n }\n }),\n Zn = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return z.default;\n },\n makeHttp: function () {\n return z.makeHttp;\n },\n serializeRes: function () {\n return z.serializeRes;\n }\n }),\n ea = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n makeResolveSubtree: function () {\n return F.makeResolveSubtree;\n }\n }),\n ta = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n opId: function () {\n return W.opId;\n }\n });\nconst configs_wrap_actions_loaded = (e, t) => (...r) => {\n e(...r);\n const n = t.getConfigs().withCredentials;\n t.fn.fetch.withCredentials = n;\n};\nfunction swagger_client({\n configs: e,\n getConfigs: t\n}) {\n return {\n fn: {\n fetch: (0, Zn.makeHttp)(Zn.default, e.preFetch, e.postFetch),\n buildRequest: Qn.buildRequest,\n execute: Qn.execute,\n resolve: (0, Yn.makeResolve)({\n strategies: [Xn.default, Gn.default, Hn.default, Wn.default]\n }),\n resolveSubtree: async (e, r, n = {}) => {\n const a = t(),\n o = {\n modelPropertyMacro: a.modelPropertyMacro,\n parameterMacro: a.parameterMacro,\n requestInterceptor: a.requestInterceptor,\n responseInterceptor: a.responseInterceptor,\n strategies: [Xn.default, Gn.default, Hn.default, Wn.default]\n };\n return (0, ea.makeResolveSubtree)(o)(e, r, n);\n },\n serializeRes: Zn.serializeRes,\n opId: ta.opId\n },\n statePlugins: {\n configs: {\n wrapActions: {\n loaded: configs_wrap_actions_loaded\n }\n }\n }\n };\n}\nfunction util() {\n return {\n fn: {\n shallowEqualKeys\n }\n };\n}\nvar ra = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return H.default;\n }\n }),\n na = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n Provider: function () {\n return G.Provider;\n },\n connect: function () {\n return G.connect;\n }\n }),\n aa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return X.default;\n }\n });\nconst withSystem = e => t => {\n const {\n fn: r\n } = e();\n class WithSystem extends Xe.Component {\n render() {\n return Xe.default.createElement(t, (0, cr.default)({}, e(), this.props, this.context));\n }\n }\n return WithSystem.displayName = `WithSystem(${r.getDisplayName(t)})`, WithSystem;\n },\n withRoot = (e, t) => r => {\n const {\n fn: n\n } = e();\n class WithRoot extends Xe.Component {\n render() {\n return Xe.default.createElement(na.Provider, {\n store: t\n }, Xe.default.createElement(r, (0, cr.default)({}, this.props, this.context)));\n }\n }\n return WithRoot.displayName = `WithRoot(${n.getDisplayName(r)})`, WithRoot;\n },\n withConnect = (e, t, r) => (0, Ye.compose)(r ? withRoot(e, r) : aa.default, (0, na.connect)((r, n) => {\n const a = {\n ...n,\n ...e()\n },\n o = t.prototype?.mapStateToProps || (e => ({\n state: e\n }));\n return o(r, a);\n }), withSystem(e))(t),\n handleProps = (e, t, r, n) => {\n for (const a in t) {\n const o = t[a];\n \"function\" == typeof o && o(r[a], n[a], e());\n }\n },\n withMappedContainer = (e, t, r) => (t, n) => {\n const {\n fn: a\n } = e(),\n o = r(t, \"root\");\n class WithMappedContainer extends Xe.Component {\n constructor(t, r) {\n super(t, r), handleProps(e, n, t, {});\n }\n UNSAFE_componentWillReceiveProps(t) {\n handleProps(e, n, t, this.props);\n }\n render() {\n const e = (0, zt.default)(this.props, n ? Object.keys(n) : []);\n return Xe.default.createElement(o, e);\n }\n }\n return WithMappedContainer.displayName = `WithMappedContainer(${a.getDisplayName(o)})`, WithMappedContainer;\n },\n render = (e, t, r, n) => a => {\n const o = r(e, t, n)(\"App\", \"root\"),\n {\n createRoot: s\n } = ra.default;\n s(a).render(Xe.default.createElement(o, null));\n },\n getComponent = (e, t, r) => (n, a, o = {}) => {\n if (\"string\" != typeof n) throw new TypeError(\"Need a string, to fetch a component. Was given a \" + typeof n);\n const s = r(n);\n return s ? a ? \"root\" === a ? withConnect(e, s, t()) : withConnect(e, s) : s : (o.failSilently || e().log.warn(\"Could not find component:\", n), null);\n },\n getDisplayName = e => e.displayName || e.name || \"Component\";\nvar view = ({\n getComponents: e,\n getStore: t,\n getSystem: r\n}) => {\n const n = (a = getComponent(r, t, e), kt(a, (...e) => JSON.stringify(e)));\n var a;\n const o = (e => utils_memoizeN(e, (...e) => e))(withMappedContainer(r, 0, n));\n return {\n rootInjects: {\n getComponent: n,\n makeMappedContainer: o,\n render: render(r, t, getComponent, e)\n },\n fn: {\n getDisplayName\n }\n };\n};\nvar view_legacy = ({\n React: e,\n getSystem: t,\n getStore: r,\n getComponents: n\n}) => {\n const a = {},\n o = parseInt(e?.version, 10);\n return o >= 16 && o < 18 && (a.render = ((e, t, r, n) => a => {\n const o = r(e, t, n)(\"App\", \"root\");\n ra.default.render(Xe.default.createElement(o, null), a);\n })(t, r, getComponent, n)), {\n rootInjects: a\n };\n};\nfunction downloadUrlPlugin(e) {\n let {\n fn: t\n } = e;\n const r = {\n download: e => ({\n errActions: r,\n specSelectors: n,\n specActions: a,\n getConfigs: o\n }) => {\n let {\n fetch: s\n } = t;\n const l = o();\n function next(t) {\n if (t instanceof Error || t.status >= 400) return a.updateLoadingStatus(\"failed\"), r.newThrownErr(Object.assign(new Error((t.message || t.statusText) + \" \" + e), {\n source: \"fetch\"\n })), void (!t.status && t instanceof Error && function checkPossibleFailReasons() {\n try {\n let t;\n if (\"URL\" in dt ? t = new URL(e) : (t = document.createElement(\"a\"), t.href = e), \"https:\" !== t.protocol && \"https:\" === dt.location.protocol) {\n const e = Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${t.protocol}// URL was specified. Check that you are not attempting to load mixed content.`), {\n source: \"fetch\"\n });\n return void r.newThrownErr(e);\n }\n if (t.origin !== dt.location.origin) {\n const e = Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${t.origin}) does not match the page (${dt.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`), {\n source: \"fetch\"\n });\n r.newThrownErr(e);\n }\n } catch (e) {\n return;\n }\n }());\n a.updateLoadingStatus(\"success\"), a.updateSpec(t.text), n.url() !== e && a.updateUrl(e);\n }\n e = e || n.url(), a.updateLoadingStatus(\"loading\"), r.clear({\n source: \"fetch\"\n }), s({\n url: e,\n loadSpec: !0,\n requestInterceptor: l.requestInterceptor || (e => e),\n responseInterceptor: l.responseInterceptor || (e => e),\n credentials: \"same-origin\",\n headers: {\n Accept: \"application/json,*/*\"\n }\n }).then(next, next);\n },\n updateLoadingStatus: e => {\n let t = [null, \"loading\", \"failed\", \"success\", \"failedConfig\"];\n return -1 === t.indexOf(e) && console.error(`Error: ${e} is not one of ${JSON.stringify(t)}`), {\n type: \"spec_update_loading_status\",\n payload: e\n };\n }\n };\n let n = {\n loadingStatus: (0, Dt.createSelector)(e => e || (0, Qe.Map)(), e => e.get(\"loadingStatus\") || null)\n };\n return {\n statePlugins: {\n spec: {\n actions: r,\n reducers: {\n spec_update_loading_status: (e, t) => \"string\" == typeof t.payload ? e.set(\"loadingStatus\", t.payload) : e\n },\n selectors: n\n }\n }\n };\n}\nvar oa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return Y.default;\n }\n }),\n sa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return Q.default;\n }\n }),\n la = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return Z.default;\n }\n }),\n ia = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return ee.default;\n }\n }),\n ca = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return te.default;\n }\n }),\n ua = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return re.default;\n }\n }),\n da = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return ne.default;\n }\n }),\n pa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return ae.default;\n }\n });\nvar after_load = () => {\n oa.default.registerLanguage(\"json\", la.default), oa.default.registerLanguage(\"js\", sa.default), oa.default.registerLanguage(\"xml\", ia.default), oa.default.registerLanguage(\"yaml\", ua.default), oa.default.registerLanguage(\"http\", da.default), oa.default.registerLanguage(\"bash\", ca.default), oa.default.registerLanguage(\"powershell\", pa.default), oa.default.registerLanguage(\"javascript\", sa.default);\n },\n ma = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return oe.default;\n }\n }),\n fa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return se.default;\n }\n }),\n ha = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return le.default;\n }\n }),\n ga = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return ie.default;\n }\n }),\n ya = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return ce.default;\n }\n }),\n Ea = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return ue.default;\n }\n }),\n Sa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return de.default;\n }\n });\nconst _a = {\n agate: ma.default,\n arta: fa.default,\n monokai: ha.default,\n nord: ga.default,\n obsidian: ya.default,\n \"tomorrow-night\": Ea.default,\n idea: Sa.default\n },\n va = ma.default;\nvar components_SyntaxHighlighter = ({\n language: e,\n className: t = \"\",\n getConfigs: r,\n syntaxHighlighting: n = {},\n children: a = \"\"\n }) => {\n const o = r().syntaxHighlight.theme,\n {\n styles: s,\n defaultStyle: l\n } = n,\n i = s?.[o] ?? l;\n return Xe.default.createElement(oa.default, {\n language: e,\n className: t,\n style: i\n }, a);\n },\n ba = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return pe.default;\n }\n });\nvar components_HighlightCode = ({\n fileName: e = \"response.txt\",\n className: t,\n downloadable: r,\n getComponent: n,\n canCopy: a,\n language: o,\n children: s\n}) => {\n const l = (0, Xe.useRef)(null),\n i = n(\"SyntaxHighlighter\", !0),\n handlePreventYScrollingBeyondElement = e => {\n const {\n target: t,\n deltaY: r\n } = e,\n {\n scrollHeight: n,\n offsetHeight: a,\n scrollTop: o\n } = t;\n n > a && (0 === o && r < 0 || a + o >= n && r > 0) && e.preventDefault();\n };\n return (0, Xe.useEffect)(() => {\n const e = Array.from(l.current.childNodes).filter(e => !!e.nodeType && e.classList.contains(\"microlight\"));\n return e.forEach(e => e.addEventListener(\"mousewheel\", handlePreventYScrollingBeyondElement, {\n passive: !1\n })), () => {\n e.forEach(e => e.removeEventListener(\"mousewheel\", handlePreventYScrollingBeyondElement));\n };\n }, [s, t, o]), Xe.default.createElement(\"div\", {\n className: \"highlight-code\",\n ref: l\n }, a && Xe.default.createElement(\"div\", {\n className: \"copy-to-clipboard\"\n }, Xe.default.createElement(vr.CopyToClipboard, {\n text: s\n }, Xe.default.createElement(\"button\", null))), r ? Xe.default.createElement(\"button\", {\n className: \"download-contents\",\n onClick: () => {\n (0, ba.default)(s, e);\n }\n }, \"Download\") : null, Xe.default.createElement(i, {\n language: o,\n className: (0, _r.default)(t, \"microlight\"),\n renderPlainText: ({\n children: e,\n PlainTextViewer: r\n }) => Xe.default.createElement(r, {\n className: t\n }, e)\n }, s));\n};\nvar components_PlainTextViewer = ({\n className: e = \"\",\n children: t\n}) => Xe.default.createElement(\"pre\", {\n className: (0, _r.default)(\"microlight\", e)\n}, t);\nvar wrap_components_SyntaxHighlighter = (e, t) => ({\n renderPlainText: r,\n children: n,\n ...a\n}) => {\n const o = t.getConfigs().syntaxHighlight.activated,\n s = t.getComponent(\"PlainTextViewer\");\n return o || \"function\" != typeof r ? o ? Xe.default.createElement(e, a, n) : Xe.default.createElement(s, null, n) : r({\n children: n,\n PlainTextViewer: s\n });\n};\nconst SyntaxHighlightingPlugin1 = () => ({\n afterLoad: after_load,\n rootInjects: {\n syntaxHighlighting: {\n styles: _a,\n defaultStyle: va\n }\n },\n components: {\n SyntaxHighlighter: components_SyntaxHighlighter,\n HighlightCode: components_HighlightCode,\n PlainTextViewer: components_PlainTextViewer\n }\n }),\n SyntaxHighlightingPlugin2 = () => ({\n wrapComponents: {\n SyntaxHighlighter: wrap_components_SyntaxHighlighter\n }\n });\nvar syntax_highlighting = () => [SyntaxHighlightingPlugin1, SyntaxHighlightingPlugin2];\nvar versions_after_load = () => {\n const {\n GIT_DIRTY: e,\n GIT_COMMIT: t,\n PACKAGE_VERSION: r,\n BUILD_TIME: n\n } = {\n PACKAGE_VERSION: \"5.19.0\",\n GIT_COMMIT: \"ge6d81908\",\n GIT_DIRTY: !0,\n BUILD_TIME: \"Mon, 17 Feb 2025 16:41:34 GMT\"\n };\n dt.versions = dt.versions || {}, dt.versions.swaggerUI = {\n version: r,\n gitRevision: t,\n gitDirty: e,\n buildTimestamp: n\n };\n};\nvar versions = () => ({\n afterLoad: versions_after_load\n }),\n wa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return me.default;\n }\n });\nconst Ca = console.error,\n withErrorBoundary = e => t => {\n const {\n getComponent: r,\n fn: n\n } = e(),\n a = r(\"ErrorBoundary\"),\n o = n.getDisplayName(t);\n class WithErrorBoundary extends Xe.Component {\n render() {\n return Xe.default.createElement(a, {\n targetName: o,\n getComponent: r,\n fn: n\n }, Xe.default.createElement(t, (0, cr.default)({}, this.props, this.context)));\n }\n }\n var s;\n return WithErrorBoundary.displayName = `WithErrorBoundary(${o})`, (s = t).prototype && s.prototype.isReactComponent && (WithErrorBoundary.prototype.mapStateToProps = t.prototype.mapStateToProps), WithErrorBoundary;\n };\nvar fallback = ({\n name: e\n}) => Xe.default.createElement(\"div\", {\n className: \"fallback\"\n}, \"😱 \", Xe.default.createElement(\"i\", null, \"Could not render \", \"t\" === e ? \"this component\" : e, \", see the console.\"));\nlet ErrorBoundary = /*#__PURE__*/(() => {\n class ErrorBoundary extends Xe.Component {\n static defaultProps = {\n targetName: \"this component\",\n getComponent: () => fallback,\n fn: {\n componentDidCatch: Ca\n },\n children: null\n };\n static getDerivedStateFromError(e) {\n return {\n hasError: !0,\n error: e\n };\n }\n constructor(...e) {\n super(...e), this.state = {\n hasError: !1,\n error: null\n };\n }\n componentDidCatch(e, t) {\n this.props.fn.componentDidCatch(e, t);\n }\n render() {\n const {\n getComponent: e,\n targetName: t,\n children: r\n } = this.props;\n if (this.state.hasError) {\n const r = e(\"Fallback\");\n return Xe.default.createElement(r, {\n name: t\n });\n }\n return r;\n }\n }\n return ErrorBoundary;\n})();\nvar xa = ErrorBoundary;\nvar safe_render = ({\n componentList: e = [],\n fullOverride: t = !1\n} = {}) => ({\n getSystem: r\n}) => {\n const n = t ? e : [\"App\", \"BaseLayout\", \"VersionPragmaFilter\", \"InfoContainer\", \"ServersContainer\", \"SchemesContainer\", \"AuthorizeBtnContainer\", \"FilterContainer\", \"Operations\", \"OperationContainer\", \"parameters\", \"responses\", \"OperationServers\", \"Models\", \"ModelWrapper\", ...e],\n a = (0, wa.default)(n, Array(n.length).fill((e, {\n fn: t\n }) => t.withErrorBoundary(e)));\n return {\n fn: {\n componentDidCatch: Ca,\n withErrorBoundary: withErrorBoundary(r)\n },\n components: {\n ErrorBoundary: xa,\n Fallback: fallback\n },\n wrapComponents: a\n };\n};\nclass App extends Xe.default.Component {\n getLayout() {\n const {\n getComponent: e,\n layoutSelectors: t\n } = this.props,\n r = t.current(),\n n = e(r, !0);\n return n || (() => Xe.default.createElement(\"h1\", null, ' No layout defined for \"', r, '\" '));\n }\n render() {\n const e = this.getLayout();\n return Xe.default.createElement(e, null);\n }\n}\nvar Oa = App;\nclass AuthorizationPopup extends Xe.default.Component {\n close = () => {\n let {\n authActions: e\n } = this.props;\n e.showDefinitions(!1);\n };\n render() {\n let {\n authSelectors: e,\n authActions: t,\n getComponent: r,\n errSelectors: n,\n specSelectors: a,\n fn: {\n AST: o = {}\n }\n } = this.props,\n s = e.shownDefinitions();\n const l = r(\"auths\"),\n i = r(\"CloseIcon\");\n return Xe.default.createElement(\"div\", {\n className: \"dialog-ux\"\n }, Xe.default.createElement(\"div\", {\n className: \"backdrop-ux\"\n }), Xe.default.createElement(\"div\", {\n className: \"modal-ux\"\n }, Xe.default.createElement(\"div\", {\n className: \"modal-dialog-ux\"\n }, Xe.default.createElement(\"div\", {\n className: \"modal-ux-inner\"\n }, Xe.default.createElement(\"div\", {\n className: \"modal-ux-header\"\n }, Xe.default.createElement(\"h3\", null, \"Available authorizations\"), Xe.default.createElement(\"button\", {\n type: \"button\",\n className: \"close-modal\",\n onClick: this.close\n }, Xe.default.createElement(i, null))), Xe.default.createElement(\"div\", {\n className: \"modal-ux-content\"\n }, s.valueSeq().map((s, i) => Xe.default.createElement(l, {\n key: i,\n AST: o,\n definitions: s,\n getComponent: r,\n errSelectors: n,\n authSelectors: e,\n authActions: t,\n specSelectors: a\n })))))));\n }\n}\nclass AuthorizeBtn extends Xe.default.Component {\n render() {\n let {\n isAuthorized: e,\n showPopup: t,\n onClick: r,\n getComponent: n\n } = this.props;\n const a = n(\"authorizationPopup\", !0),\n o = n(\"LockAuthIcon\", !0),\n s = n(\"UnlockAuthIcon\", !0);\n return Xe.default.createElement(\"div\", {\n className: \"auth-wrapper\"\n }, Xe.default.createElement(\"button\", {\n className: e ? \"btn authorize locked\" : \"btn authorize unlocked\",\n onClick: r\n }, Xe.default.createElement(\"span\", null, \"Authorize\"), e ? Xe.default.createElement(o, null) : Xe.default.createElement(s, null)), t && Xe.default.createElement(a, null));\n }\n}\nclass AuthorizeBtnContainer extends Xe.default.Component {\n render() {\n const {\n authActions: e,\n authSelectors: t,\n specSelectors: r,\n getComponent: n\n } = this.props,\n a = r.securityDefinitions(),\n o = t.definitionsToAuthorize(),\n s = n(\"authorizeBtn\");\n return a ? Xe.default.createElement(s, {\n onClick: () => e.showDefinitions(o),\n isAuthorized: !!t.authorized().size,\n showPopup: !!t.shownDefinitions(),\n getComponent: n\n }) : null;\n }\n}\nclass AuthorizeOperationBtn extends Xe.default.Component {\n onClick = e => {\n e.stopPropagation();\n let {\n onClick: t\n } = this.props;\n t && t();\n };\n render() {\n let {\n isAuthorized: e,\n getComponent: t\n } = this.props;\n const r = t(\"LockAuthOperationIcon\", !0),\n n = t(\"UnlockAuthOperationIcon\", !0);\n return Xe.default.createElement(\"button\", {\n className: \"authorization__btn\",\n \"aria-label\": e ? \"authorization button locked\" : \"authorization button unlocked\",\n onClick: this.onClick\n }, e ? Xe.default.createElement(r, {\n className: \"locked\"\n }) : Xe.default.createElement(n, {\n className: \"unlocked\"\n }));\n }\n}\nclass Auths extends Xe.default.Component {\n constructor(e, t) {\n super(e, t), this.state = {};\n }\n onAuthChange = e => {\n let {\n name: t\n } = e;\n this.setState({\n [t]: e\n });\n };\n submitAuth = e => {\n e.preventDefault();\n let {\n authActions: t\n } = this.props;\n t.authorizeWithPersistOption(this.state);\n };\n logoutClick = e => {\n e.preventDefault();\n let {\n authActions: t,\n definitions: r\n } = this.props,\n n = r.map((e, t) => t).toArray();\n this.setState(n.reduce((e, t) => (e[t] = \"\", e), {})), t.logoutWithPersistOption(n);\n };\n close = e => {\n e.preventDefault();\n let {\n authActions: t\n } = this.props;\n t.showDefinitions(!1);\n };\n render() {\n let {\n definitions: e,\n getComponent: t,\n authSelectors: r,\n errSelectors: n\n } = this.props;\n const a = t(\"AuthItem\"),\n o = t(\"oauth2\", !0),\n s = t(\"Button\");\n let l = r.authorized(),\n i = e.filter((e, t) => !!l.get(t)),\n c = e.filter(e => \"oauth2\" !== e.get(\"type\")),\n u = e.filter(e => \"oauth2\" === e.get(\"type\"));\n return Xe.default.createElement(\"div\", {\n className: \"auth-container\"\n }, !!c.size && Xe.default.createElement(\"form\", {\n onSubmit: this.submitAuth\n }, c.map((e, r) => Xe.default.createElement(a, {\n key: r,\n schema: e,\n name: r,\n getComponent: t,\n onAuthChange: this.onAuthChange,\n authorized: l,\n errSelectors: n\n })).toArray(), Xe.default.createElement(\"div\", {\n className: \"auth-btn-wrapper\"\n }, c.size === i.size ? Xe.default.createElement(s, {\n className: \"btn modal-btn auth\",\n onClick: this.logoutClick,\n \"aria-label\": \"Remove authorization\"\n }, \"Logout\") : Xe.default.createElement(s, {\n type: \"submit\",\n className: \"btn modal-btn auth authorize\",\n \"aria-label\": \"Apply credentials\"\n }, \"Authorize\"), Xe.default.createElement(s, {\n className: \"btn modal-btn auth btn-done\",\n onClick: this.close\n }, \"Close\"))), u && u.size ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"div\", {\n className: \"scope-def\"\n }, Xe.default.createElement(\"p\", null, \"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"), Xe.default.createElement(\"p\", null, \"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")), e.filter(e => \"oauth2\" === e.get(\"type\")).map((e, t) => Xe.default.createElement(\"div\", {\n key: t\n }, Xe.default.createElement(o, {\n authorized: l,\n schema: e,\n name: t\n }))).toArray()) : null);\n }\n}\nclass auth_item_Auths extends Xe.default.Component {\n render() {\n let {\n schema: e,\n name: t,\n getComponent: r,\n onAuthChange: n,\n authorized: a,\n errSelectors: o\n } = this.props;\n const s = r(\"apiKeyAuth\"),\n l = r(\"basicAuth\");\n let i;\n const c = e.get(\"type\");\n switch (c) {\n case \"apiKey\":\n i = Xe.default.createElement(s, {\n key: t,\n schema: e,\n name: t,\n errSelectors: o,\n authorized: a,\n getComponent: r,\n onChange: n\n });\n break;\n case \"basic\":\n i = Xe.default.createElement(l, {\n key: t,\n schema: e,\n name: t,\n errSelectors: o,\n authorized: a,\n getComponent: r,\n onChange: n\n });\n break;\n default:\n i = Xe.default.createElement(\"div\", {\n key: t\n }, \"Unknown security definition type \", c);\n }\n return Xe.default.createElement(\"div\", {\n key: `${t}-jump`\n }, i);\n }\n}\nclass AuthError extends Xe.default.Component {\n render() {\n let {\n error: e\n } = this.props,\n t = e.get(\"level\"),\n r = e.get(\"message\"),\n n = e.get(\"source\");\n return Xe.default.createElement(\"div\", {\n className: \"errors\"\n }, Xe.default.createElement(\"b\", null, n, \" \", t), Xe.default.createElement(\"span\", null, r));\n }\n}\nclass ApiKeyAuth extends Xe.default.Component {\n constructor(e, t) {\n super(e, t);\n let {\n name: r,\n schema: n\n } = this.props,\n a = this.getValue();\n this.state = {\n name: r,\n schema: n,\n value: a\n };\n }\n getValue() {\n let {\n name: e,\n authorized: t\n } = this.props;\n return t && t.getIn([e, \"value\"]);\n }\n onChange = e => {\n let {\n onChange: t\n } = this.props,\n r = e.target.value,\n n = Object.assign({}, this.state, {\n value: r\n });\n this.setState(n), t(n);\n };\n render() {\n let {\n schema: e,\n getComponent: t,\n errSelectors: r,\n name: n\n } = this.props;\n const a = t(\"Input\"),\n o = t(\"Row\"),\n s = t(\"Col\"),\n l = t(\"authError\"),\n i = t(\"Markdown\", !0),\n c = t(\"JumpToPath\", !0);\n let u = this.getValue(),\n d = r.allErrors().filter(e => e.get(\"authId\") === n);\n return Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", null, Xe.default.createElement(\"code\", null, n || e.get(\"name\")), \" (apiKey)\", Xe.default.createElement(c, {\n path: [\"securityDefinitions\", n]\n })), u && Xe.default.createElement(\"h6\", null, \"Authorized\"), Xe.default.createElement(o, null, Xe.default.createElement(i, {\n source: e.get(\"description\")\n })), Xe.default.createElement(o, null, Xe.default.createElement(\"p\", null, \"Name: \", Xe.default.createElement(\"code\", null, e.get(\"name\")))), Xe.default.createElement(o, null, Xe.default.createElement(\"p\", null, \"In: \", Xe.default.createElement(\"code\", null, e.get(\"in\")))), Xe.default.createElement(o, null, Xe.default.createElement(\"label\", {\n htmlFor: \"api_key_value\"\n }, \"Value:\"), u ? Xe.default.createElement(\"code\", null, \" ****** \") : Xe.default.createElement(s, null, Xe.default.createElement(a, {\n id: \"api_key_value\",\n type: \"text\",\n onChange: this.onChange,\n autoFocus: !0\n }))), d.valueSeq().map((e, t) => Xe.default.createElement(l, {\n error: e,\n key: t\n })));\n }\n}\nclass BasicAuth extends Xe.default.Component {\n constructor(e, t) {\n super(e, t);\n let {\n schema: r,\n name: n\n } = this.props,\n a = this.getValue().username;\n this.state = {\n name: n,\n schema: r,\n value: a ? {\n username: a\n } : {}\n };\n }\n getValue() {\n let {\n authorized: e,\n name: t\n } = this.props;\n return e && e.getIn([t, \"value\"]) || {};\n }\n onChange = e => {\n let {\n onChange: t\n } = this.props,\n {\n value: r,\n name: n\n } = e.target,\n a = this.state.value;\n a[n] = r, this.setState({\n value: a\n }), t(this.state);\n };\n render() {\n let {\n schema: e,\n getComponent: t,\n name: r,\n errSelectors: n\n } = this.props;\n const a = t(\"Input\"),\n o = t(\"Row\"),\n s = t(\"Col\"),\n l = t(\"authError\"),\n i = t(\"JumpToPath\", !0),\n c = t(\"Markdown\", !0);\n let u = this.getValue().username,\n d = n.allErrors().filter(e => e.get(\"authId\") === r);\n return Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", null, \"Basic authorization\", Xe.default.createElement(i, {\n path: [\"securityDefinitions\", r]\n })), u && Xe.default.createElement(\"h6\", null, \"Authorized\"), Xe.default.createElement(o, null, Xe.default.createElement(c, {\n source: e.get(\"description\")\n })), Xe.default.createElement(o, null, Xe.default.createElement(\"label\", {\n htmlFor: \"auth_username\"\n }, \"Username:\"), u ? Xe.default.createElement(\"code\", null, \" \", u, \" \") : Xe.default.createElement(s, null, Xe.default.createElement(a, {\n id: \"auth_username\",\n type: \"text\",\n required: \"required\",\n name: \"username\",\n onChange: this.onChange,\n autoFocus: !0\n }))), Xe.default.createElement(o, null, Xe.default.createElement(\"label\", {\n htmlFor: \"auth_password\"\n }, \"Password:\"), u ? Xe.default.createElement(\"code\", null, \" ****** \") : Xe.default.createElement(s, null, Xe.default.createElement(a, {\n id: \"auth_password\",\n autoComplete: \"new-password\",\n name: \"password\",\n type: \"password\",\n onChange: this.onChange\n }))), d.valueSeq().map((e, t) => Xe.default.createElement(l, {\n error: e,\n key: t\n })));\n }\n}\nfunction Example(e) {\n const {\n example: t,\n showValue: r,\n getComponent: n\n } = e,\n a = n(\"Markdown\", !0),\n o = n(\"HighlightCode\", !0);\n return t ? Xe.default.createElement(\"div\", {\n className: \"example\"\n }, t.get(\"description\") ? Xe.default.createElement(\"section\", {\n className: \"example__section\"\n }, Xe.default.createElement(\"div\", {\n className: \"example__section-header\"\n }, \"Example Description\"), Xe.default.createElement(\"p\", null, Xe.default.createElement(a, {\n source: t.get(\"description\")\n }))) : null, r && t.has(\"value\") ? Xe.default.createElement(\"section\", {\n className: \"example__section\"\n }, Xe.default.createElement(\"div\", {\n className: \"example__section-header\"\n }, \"Example Value\"), Xe.default.createElement(o, null, stringify(t.get(\"value\")))) : null) : null;\n}\nclass ExamplesSelect extends Xe.default.PureComponent {\n static defaultProps = {\n examples: Qe.default.Map({}),\n onSelect: (...e) => console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\", ...e),\n currentExampleKey: null,\n showLabels: !0\n };\n _onSelect = (e, {\n isSyntheticChange: t = !1\n } = {}) => {\n \"function\" == typeof this.props.onSelect && this.props.onSelect(e, {\n isSyntheticChange: t\n });\n };\n _onDomSelect = e => {\n if (\"function\" == typeof this.props.onSelect) {\n const t = e.target.selectedOptions[0].getAttribute(\"value\");\n this._onSelect(t, {\n isSyntheticChange: !1\n });\n }\n };\n getCurrentExample = () => {\n const {\n examples: e,\n currentExampleKey: t\n } = this.props,\n r = e.get(t),\n n = e.keySeq().first(),\n a = e.get(n);\n return r || a || Map({});\n };\n componentDidMount() {\n const {\n onSelect: e,\n examples: t\n } = this.props;\n if (\"function\" == typeof e) {\n const e = t.first(),\n r = t.keyOf(e);\n this._onSelect(r, {\n isSyntheticChange: !0\n });\n }\n }\n UNSAFE_componentWillReceiveProps(e) {\n const {\n currentExampleKey: t,\n examples: r\n } = e;\n if (r !== this.props.examples && !r.has(t)) {\n const e = r.first(),\n t = r.keyOf(e);\n this._onSelect(t, {\n isSyntheticChange: !0\n });\n }\n }\n render() {\n const {\n examples: e,\n currentExampleKey: t,\n isValueModified: r,\n isModifiedValueAvailable: n,\n showLabels: a\n } = this.props;\n return Xe.default.createElement(\"div\", {\n className: \"examples-select\"\n }, a ? Xe.default.createElement(\"span\", {\n className: \"examples-select__section-label\"\n }, \"Examples: \") : null, Xe.default.createElement(\"select\", {\n className: \"examples-select-element\",\n onChange: this._onDomSelect,\n value: n && r ? \"__MODIFIED__VALUE__\" : t || \"\"\n }, n ? Xe.default.createElement(\"option\", {\n value: \"__MODIFIED__VALUE__\"\n }, \"[Modified value]\") : null, e.map((e, t) => Xe.default.createElement(\"option\", {\n key: t,\n value: t\n }, e.get(\"summary\") || t)).valueSeq()));\n }\n}\nconst stringifyUnlessList = e => Qe.List.isList(e) ? e : stringify(e);\nclass ExamplesSelectValueRetainer extends Xe.default.PureComponent {\n static defaultProps = {\n userHasEditedBody: !1,\n examples: (0, Qe.Map)({}),\n currentNamespace: \"__DEFAULT__NAMESPACE__\",\n setRetainRequestBodyValueFlag: () => {},\n onSelect: (...e) => console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\", ...e),\n updateValue: (...e) => console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\", ...e)\n };\n constructor(e) {\n super(e);\n const t = this._getCurrentExampleValue();\n this.state = {\n [e.currentNamespace]: (0, Qe.Map)({\n lastUserEditedValue: this.props.currentUserInputValue,\n lastDownstreamValue: t,\n isModifiedValueSelected: this.props.userHasEditedBody || this.props.currentUserInputValue !== t\n })\n };\n }\n componentWillUnmount() {\n this.props.setRetainRequestBodyValueFlag(!1);\n }\n _getStateForCurrentNamespace = () => {\n const {\n currentNamespace: e\n } = this.props;\n return (this.state[e] || (0, Qe.Map)()).toObject();\n };\n _setStateForCurrentNamespace = e => {\n const {\n currentNamespace: t\n } = this.props;\n return this._setStateForNamespace(t, e);\n };\n _setStateForNamespace = (e, t) => {\n const r = (this.state[e] || (0, Qe.Map)()).mergeDeep(t);\n return this.setState({\n [e]: r\n });\n };\n _isCurrentUserInputSameAsExampleValue = () => {\n const {\n currentUserInputValue: e\n } = this.props;\n return this._getCurrentExampleValue() === e;\n };\n _getValueForExample = (e, t) => {\n const {\n examples: r\n } = t || this.props;\n return stringifyUnlessList((r || (0, Qe.Map)({})).getIn([e, \"value\"]));\n };\n _getCurrentExampleValue = e => {\n const {\n currentKey: t\n } = e || this.props;\n return this._getValueForExample(t, e || this.props);\n };\n _onExamplesSelect = (e, {\n isSyntheticChange: t\n } = {}, ...r) => {\n const {\n onSelect: n,\n updateValue: a,\n currentUserInputValue: o,\n userHasEditedBody: s\n } = this.props,\n {\n lastUserEditedValue: l\n } = this._getStateForCurrentNamespace(),\n i = this._getValueForExample(e);\n if (\"__MODIFIED__VALUE__\" === e) return a(stringifyUnlessList(l)), this._setStateForCurrentNamespace({\n isModifiedValueSelected: !0\n });\n \"function\" == typeof n && n(e, {\n isSyntheticChange: t\n }, ...r), this._setStateForCurrentNamespace({\n lastDownstreamValue: i,\n isModifiedValueSelected: t && s || !!o && o !== i\n }), t || \"function\" == typeof a && a(stringifyUnlessList(i));\n };\n UNSAFE_componentWillReceiveProps(e) {\n const {\n currentUserInputValue: t,\n examples: r,\n onSelect: n,\n userHasEditedBody: a\n } = e,\n {\n lastUserEditedValue: o,\n lastDownstreamValue: s\n } = this._getStateForCurrentNamespace(),\n l = this._getValueForExample(e.currentKey, e),\n i = r.filter(e => e.get(\"value\") === t || stringify(e.get(\"value\")) === t);\n if (i.size) {\n let t;\n t = i.has(e.currentKey) ? e.currentKey : i.keySeq().first(), n(t, {\n isSyntheticChange: !0\n });\n } else t !== this.props.currentUserInputValue && t !== o && t !== s && (this.props.setRetainRequestBodyValueFlag(!0), this._setStateForNamespace(e.currentNamespace, {\n lastUserEditedValue: e.currentUserInputValue,\n isModifiedValueSelected: a || t !== l\n }));\n }\n render() {\n const {\n currentUserInputValue: e,\n examples: t,\n currentKey: r,\n getComponent: n,\n userHasEditedBody: a\n } = this.props,\n {\n lastDownstreamValue: o,\n lastUserEditedValue: s,\n isModifiedValueSelected: l\n } = this._getStateForCurrentNamespace(),\n i = n(\"ExamplesSelect\");\n return Xe.default.createElement(i, {\n examples: t,\n currentExampleKey: r,\n onSelect: this._onExamplesSelect,\n isModifiedValueAvailable: !!s && s !== o,\n isValueModified: void 0 !== e && l && e !== this._getCurrentExampleValue() || a\n });\n }\n}\nfunction oauth2_authorize_authorize({\n auth: e,\n authActions: t,\n errActions: r,\n configs: n,\n authConfigs: a = {},\n currentServer: o\n}) {\n let {\n schema: s,\n scopes: l,\n name: i,\n clientId: c\n } = e,\n u = s.get(\"flow\"),\n d = [];\n switch (u) {\n case \"password\":\n return void t.authorizePassword(e);\n case \"application\":\n case \"clientCredentials\":\n case \"client_credentials\":\n return void t.authorizeApplication(e);\n case \"accessCode\":\n case \"authorizationCode\":\n case \"authorization_code\":\n d.push(\"response_type=code\");\n break;\n case \"implicit\":\n d.push(\"response_type=token\");\n }\n \"string\" == typeof c && d.push(\"client_id=\" + encodeURIComponent(c));\n let p = n.oauth2RedirectUrl;\n if (void 0 === p) return void r.newAuthErr({\n authId: i,\n source: \"validation\",\n level: \"error\",\n message: \"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"\n });\n d.push(\"redirect_uri=\" + encodeURIComponent(p));\n let m = [];\n if (Array.isArray(l) ? m = l : Qe.default.List.isList(l) && (m = l.toArray()), m.length > 0) {\n let e = a.scopeSeparator || \" \";\n d.push(\"scope=\" + encodeURIComponent(m.join(e)));\n }\n let f = btoa(new Date());\n if (d.push(\"state=\" + encodeURIComponent(f)), void 0 !== a.realm && d.push(\"realm=\" + encodeURIComponent(a.realm)), (\"authorizationCode\" === u || \"authorization_code\" === u || \"accessCode\" === u) && a.usePkceWithAuthorizationCodeGrant) {\n const t = function generateCodeVerifier() {\n return b64toB64UrlEncoded(vt()(32).toString(\"base64\"));\n }(),\n r = function createCodeChallenge(e) {\n return b64toB64UrlEncoded(wt()(\"sha256\").update(e).digest(\"base64\"));\n }(t);\n d.push(\"code_challenge=\" + r), d.push(\"code_challenge_method=S256\"), e.codeVerifier = t;\n }\n let {\n additionalQueryStringParams: h\n } = a;\n for (let e in h) void 0 !== h[e] && d.push([e, h[e]].map(encodeURIComponent).join(\"=\"));\n const g = s.get(\"authorizationUrl\");\n let y;\n y = o ? (0, At.default)(sanitizeUrl(g), o, !0).toString() : sanitizeUrl(g);\n let S,\n _ = [y, d.join(\"&\")].join(-1 === g.indexOf(\"?\") ? \"?\" : \"&\");\n S = \"implicit\" === u ? t.preAuthorizeImplicit : a.useBasicAuthenticationWithAccessCodeGrant ? t.authorizeAccessCodeWithBasicAuthentication : t.authorizeAccessCodeWithFormParams, t.authPopup(_, {\n auth: e,\n state: f,\n redirectUrl: p,\n callback: S,\n errCb: r.newAuthErr\n });\n}\nclass Oauth2 extends Xe.default.Component {\n constructor(e, t) {\n super(e, t);\n let {\n name: r,\n schema: n,\n authorized: a,\n authSelectors: o\n } = this.props,\n s = a && a.get(r),\n l = o.getConfigs() || {},\n i = s && s.get(\"username\") || \"\",\n c = s && s.get(\"clientId\") || l.clientId || \"\",\n u = s && s.get(\"clientSecret\") || l.clientSecret || \"\",\n d = s && s.get(\"passwordType\") || \"basic\",\n p = s && s.get(\"scopes\") || l.scopes || [];\n \"string\" == typeof p && (p = p.split(l.scopeSeparator || \" \")), this.state = {\n appName: l.appName,\n name: r,\n schema: n,\n scopes: p,\n clientId: c,\n clientSecret: u,\n username: i,\n password: \"\",\n passwordType: d\n };\n }\n close = e => {\n e.preventDefault();\n let {\n authActions: t\n } = this.props;\n t.showDefinitions(!1);\n };\n authorize = () => {\n let {\n authActions: e,\n errActions: t,\n getConfigs: r,\n authSelectors: n,\n oas3Selectors: a\n } = this.props,\n o = r(),\n s = n.getConfigs();\n t.clear({\n authId: name,\n type: \"auth\",\n source: \"auth\"\n }), oauth2_authorize_authorize({\n auth: this.state,\n currentServer: a.serverEffectiveValue(a.selectedServer()),\n authActions: e,\n errActions: t,\n configs: o,\n authConfigs: s\n });\n };\n onScopeChange = e => {\n let {\n target: t\n } = e,\n {\n checked: r\n } = t,\n n = t.dataset.value;\n if (r && -1 === this.state.scopes.indexOf(n)) {\n let e = this.state.scopes.concat([n]);\n this.setState({\n scopes: e\n });\n } else !r && this.state.scopes.indexOf(n) > -1 && this.setState({\n scopes: this.state.scopes.filter(e => e !== n)\n });\n };\n onInputChange = e => {\n let {\n target: {\n dataset: {\n name: t\n },\n value: r\n }\n } = e,\n n = {\n [t]: r\n };\n this.setState(n);\n };\n selectScopes = e => {\n e.target.dataset.all ? this.setState({\n scopes: Array.from((this.props.schema.get(\"allowedScopes\") || this.props.schema.get(\"scopes\")).keys())\n }) : this.setState({\n scopes: []\n });\n };\n logout = e => {\n e.preventDefault();\n let {\n authActions: t,\n errActions: r,\n name: n\n } = this.props;\n r.clear({\n authId: n,\n type: \"auth\",\n source: \"auth\"\n }), t.logoutWithPersistOption([n]);\n };\n render() {\n let {\n schema: e,\n getComponent: t,\n authSelectors: r,\n errSelectors: n,\n name: a,\n specSelectors: o\n } = this.props;\n const s = t(\"Input\"),\n l = t(\"Row\"),\n i = t(\"Col\"),\n c = t(\"Button\"),\n u = t(\"authError\"),\n d = t(\"JumpToPath\", !0),\n p = t(\"Markdown\", !0),\n m = t(\"InitializedInput\"),\n {\n isOAS3: f\n } = o;\n let h = f() ? e.get(\"openIdConnectUrl\") : null;\n const g = \"implicit\",\n y = \"password\",\n S = f() ? h ? \"authorization_code\" : \"authorizationCode\" : \"accessCode\",\n _ = f() ? h ? \"client_credentials\" : \"clientCredentials\" : \"application\";\n let v = !!(r.getConfigs() || {}).usePkceWithAuthorizationCodeGrant,\n b = e.get(\"flow\"),\n w = b === S && v ? b + \" with PKCE\" : b,\n C = e.get(\"allowedScopes\") || e.get(\"scopes\"),\n x = !!r.authorized().get(a),\n O = n.allErrors().filter(e => e.get(\"authId\") === a),\n k = !O.filter(e => \"validation\" === e.get(\"source\")).size,\n N = e.get(\"description\");\n return Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", null, a, \" (OAuth2, \", w, \") \", Xe.default.createElement(d, {\n path: [\"securityDefinitions\", a]\n })), this.state.appName ? Xe.default.createElement(\"h5\", null, \"Application: \", this.state.appName, \" \") : null, N && Xe.default.createElement(p, {\n source: e.get(\"description\")\n }), x && Xe.default.createElement(\"h6\", null, \"Authorized\"), h && Xe.default.createElement(\"p\", null, \"OpenID Connect URL: \", Xe.default.createElement(\"code\", null, h)), (b === g || b === S) && Xe.default.createElement(\"p\", null, \"Authorization URL: \", Xe.default.createElement(\"code\", null, e.get(\"authorizationUrl\"))), (b === y || b === S || b === _) && Xe.default.createElement(\"p\", null, \"Token URL:\", Xe.default.createElement(\"code\", null, \" \", e.get(\"tokenUrl\"))), Xe.default.createElement(\"p\", {\n className: \"flow\"\n }, \"Flow: \", Xe.default.createElement(\"code\", null, w)), b !== y ? null : Xe.default.createElement(l, null, Xe.default.createElement(l, null, Xe.default.createElement(\"label\", {\n htmlFor: \"oauth_username\"\n }, \"username:\"), x ? Xe.default.createElement(\"code\", null, \" \", this.state.username, \" \") : Xe.default.createElement(i, {\n tablet: 10,\n desktop: 10\n }, Xe.default.createElement(\"input\", {\n id: \"oauth_username\",\n type: \"text\",\n \"data-name\": \"username\",\n onChange: this.onInputChange,\n autoFocus: !0\n }))), Xe.default.createElement(l, null, Xe.default.createElement(\"label\", {\n htmlFor: \"oauth_password\"\n }, \"password:\"), x ? Xe.default.createElement(\"code\", null, \" ****** \") : Xe.default.createElement(i, {\n tablet: 10,\n desktop: 10\n }, Xe.default.createElement(\"input\", {\n id: \"oauth_password\",\n type: \"password\",\n \"data-name\": \"password\",\n onChange: this.onInputChange\n }))), Xe.default.createElement(l, null, Xe.default.createElement(\"label\", {\n htmlFor: \"password_type\"\n }, \"Client credentials location:\"), x ? Xe.default.createElement(\"code\", null, \" \", this.state.passwordType, \" \") : Xe.default.createElement(i, {\n tablet: 10,\n desktop: 10\n }, Xe.default.createElement(\"select\", {\n id: \"password_type\",\n \"data-name\": \"passwordType\",\n onChange: this.onInputChange\n }, Xe.default.createElement(\"option\", {\n value: \"basic\"\n }, \"Authorization header\"), Xe.default.createElement(\"option\", {\n value: \"request-body\"\n }, \"Request body\"))))), (b === _ || b === g || b === S || b === y) && (!x || x && this.state.clientId) && Xe.default.createElement(l, null, Xe.default.createElement(\"label\", {\n htmlFor: `client_id_${b}`\n }, \"client_id:\"), x ? Xe.default.createElement(\"code\", null, \" ****** \") : Xe.default.createElement(i, {\n tablet: 10,\n desktop: 10\n }, Xe.default.createElement(m, {\n id: `client_id_${b}`,\n type: \"text\",\n required: b === y,\n initialValue: this.state.clientId,\n \"data-name\": \"clientId\",\n onChange: this.onInputChange\n }))), (b === _ || b === S || b === y) && Xe.default.createElement(l, null, Xe.default.createElement(\"label\", {\n htmlFor: `client_secret_${b}`\n }, \"client_secret:\"), x ? Xe.default.createElement(\"code\", null, \" ****** \") : Xe.default.createElement(i, {\n tablet: 10,\n desktop: 10\n }, Xe.default.createElement(m, {\n id: `client_secret_${b}`,\n initialValue: this.state.clientSecret,\n type: \"password\",\n \"data-name\": \"clientSecret\",\n onChange: this.onInputChange\n }))), !x && C && C.size ? Xe.default.createElement(\"div\", {\n className: \"scopes\"\n }, Xe.default.createElement(\"h2\", null, \"Scopes:\", Xe.default.createElement(\"a\", {\n onClick: this.selectScopes,\n \"data-all\": !0\n }, \"select all\"), Xe.default.createElement(\"a\", {\n onClick: this.selectScopes\n }, \"select none\")), C.map((e, t) => Xe.default.createElement(l, {\n key: t\n }, Xe.default.createElement(\"div\", {\n className: \"checkbox\"\n }, Xe.default.createElement(s, {\n \"data-value\": t,\n id: `${t}-${b}-checkbox-${this.state.name}`,\n disabled: x,\n checked: this.state.scopes.includes(t),\n type: \"checkbox\",\n onChange: this.onScopeChange\n }), Xe.default.createElement(\"label\", {\n htmlFor: `${t}-${b}-checkbox-${this.state.name}`\n }, Xe.default.createElement(\"span\", {\n className: \"item\"\n }), Xe.default.createElement(\"div\", {\n className: \"text\"\n }, Xe.default.createElement(\"p\", {\n className: \"name\"\n }, t), Xe.default.createElement(\"p\", {\n className: \"description\"\n }, e)))))).toArray()) : null, O.valueSeq().map((e, t) => Xe.default.createElement(u, {\n error: e,\n key: t\n })), Xe.default.createElement(\"div\", {\n className: \"auth-btn-wrapper\"\n }, k && (x ? Xe.default.createElement(c, {\n className: \"btn modal-btn auth authorize\",\n onClick: this.logout,\n \"aria-label\": \"Remove authorization\"\n }, \"Logout\") : Xe.default.createElement(c, {\n className: \"btn modal-btn auth authorize\",\n onClick: this.authorize,\n \"aria-label\": \"Apply given OAuth2 credentials\"\n }, \"Authorize\")), Xe.default.createElement(c, {\n className: \"btn modal-btn auth btn-done\",\n onClick: this.close\n }, \"Close\")));\n }\n}\nclass Clear extends Xe.Component {\n onClick = () => {\n let {\n specActions: e,\n path: t,\n method: r\n } = this.props;\n e.clearResponse(t, r), e.clearRequest(t, r);\n };\n render() {\n return Xe.default.createElement(\"button\", {\n className: \"btn btn-clear opblock-control__btn\",\n onClick: this.onClick\n }, \"Clear\");\n }\n}\nconst Headers = ({\n headers: e\n }) => Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h5\", null, \"Response headers\"), Xe.default.createElement(\"pre\", {\n className: \"microlight\"\n }, e)),\n Duration = ({\n duration: e\n }) => Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h5\", null, \"Request duration\"), Xe.default.createElement(\"pre\", {\n className: \"microlight\"\n }, e, \" ms\"));\nclass LiveResponse extends Xe.default.Component {\n shouldComponentUpdate(e) {\n return this.props.response !== e.response || this.props.path !== e.path || this.props.method !== e.method || this.props.displayRequestDuration !== e.displayRequestDuration;\n }\n render() {\n const {\n response: e,\n getComponent: t,\n getConfigs: r,\n displayRequestDuration: n,\n specSelectors: a,\n path: o,\n method: s\n } = this.props,\n {\n showMutatedRequest: l,\n requestSnippetsEnabled: i\n } = r(),\n c = l ? a.mutatedRequestFor(o, s) : a.requestFor(o, s),\n u = e.get(\"status\"),\n d = c.get(\"url\"),\n p = e.get(\"headers\").toJS(),\n m = e.get(\"notDocumented\"),\n f = e.get(\"error\"),\n h = e.get(\"text\"),\n g = e.get(\"duration\"),\n y = Object.keys(p),\n S = p[\"content-type\"] || p[\"Content-Type\"],\n _ = t(\"responseBody\"),\n v = y.map(e => {\n var t = Array.isArray(p[e]) ? p[e].join() : p[e];\n return Xe.default.createElement(\"span\", {\n className: \"headerline\",\n key: e\n }, \" \", e, \": \", t, \" \");\n }),\n b = 0 !== v.length,\n w = t(\"Markdown\", !0),\n C = t(\"RequestSnippets\", !0),\n x = t(\"curl\", !0);\n return Xe.default.createElement(\"div\", null, c && i ? Xe.default.createElement(C, {\n request: c\n }) : Xe.default.createElement(x, {\n request: c\n }), d && Xe.default.createElement(\"div\", null, Xe.default.createElement(\"div\", {\n className: \"request-url\"\n }, Xe.default.createElement(\"h4\", null, \"Request URL\"), Xe.default.createElement(\"pre\", {\n className: \"microlight\"\n }, d))), Xe.default.createElement(\"h4\", null, \"Server response\"), Xe.default.createElement(\"table\", {\n className: \"responses-table live-responses-table\"\n }, Xe.default.createElement(\"thead\", null, Xe.default.createElement(\"tr\", {\n className: \"responses-header\"\n }, Xe.default.createElement(\"td\", {\n className: \"col_header response-col_status\"\n }, \"Code\"), Xe.default.createElement(\"td\", {\n className: \"col_header response-col_description\"\n }, \"Details\"))), Xe.default.createElement(\"tbody\", null, Xe.default.createElement(\"tr\", {\n className: \"response\"\n }, Xe.default.createElement(\"td\", {\n className: \"response-col_status\"\n }, u, m ? Xe.default.createElement(\"div\", {\n className: \"response-undocumented\"\n }, Xe.default.createElement(\"i\", null, \" Undocumented \")) : null), Xe.default.createElement(\"td\", {\n className: \"response-col_description\"\n }, f ? Xe.default.createElement(w, {\n source: `${\"\" !== e.get(\"name\") ? `${e.get(\"name\")}: ` : \"\"}${e.get(\"message\")}`\n }) : null, h ? Xe.default.createElement(_, {\n content: h,\n contentType: S,\n url: d,\n headers: p,\n getConfigs: r,\n getComponent: t\n }) : null, b ? Xe.default.createElement(Headers, {\n headers: v\n }) : null, n && g ? Xe.default.createElement(Duration, {\n duration: g\n }) : null)))));\n }\n}\nclass OnlineValidatorBadge extends Xe.default.Component {\n constructor(e, t) {\n super(e, t);\n let {\n getConfigs: r\n } = e,\n {\n validatorUrl: n\n } = r();\n this.state = {\n url: this.getDefinitionUrl(),\n validatorUrl: void 0 === n ? \"https://validator.swagger.io/validator\" : n\n };\n }\n getDefinitionUrl = () => {\n let {\n specSelectors: e\n } = this.props;\n return new At.default(e.url(), dt.location).toString();\n };\n UNSAFE_componentWillReceiveProps(e) {\n let {\n getConfigs: t\n } = e,\n {\n validatorUrl: r\n } = t();\n this.setState({\n url: this.getDefinitionUrl(),\n validatorUrl: void 0 === r ? \"https://validator.swagger.io/validator\" : r\n });\n }\n render() {\n let {\n getConfigs: e\n } = this.props,\n {\n spec: t\n } = e(),\n r = sanitizeUrl(this.state.validatorUrl);\n return \"object\" == typeof t && Object.keys(t).length ? null : this.state.url && requiresValidationURL(this.state.validatorUrl) && requiresValidationURL(this.state.url) ? Xe.default.createElement(\"span\", {\n className: \"float-right\"\n }, Xe.default.createElement(\"a\", {\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n href: `${r}/debug?url=${encodeURIComponent(this.state.url)}`\n }, Xe.default.createElement(ValidatorImage, {\n src: `${r}?url=${encodeURIComponent(this.state.url)}`,\n alt: \"Online validator badge\"\n }))) : null;\n }\n}\nclass ValidatorImage extends Xe.default.Component {\n constructor(e) {\n super(e), this.state = {\n loaded: !1,\n error: !1\n };\n }\n componentDidMount() {\n const e = new Image();\n e.onload = () => {\n this.setState({\n loaded: !0\n });\n }, e.onerror = () => {\n this.setState({\n error: !0\n });\n }, e.src = this.props.src;\n }\n UNSAFE_componentWillReceiveProps(e) {\n if (e.src !== this.props.src) {\n const t = new Image();\n t.onload = () => {\n this.setState({\n loaded: !0\n });\n }, t.onerror = () => {\n this.setState({\n error: !0\n });\n }, t.src = e.src;\n }\n }\n render() {\n return this.state.error ? Xe.default.createElement(\"img\", {\n alt: \"Error\"\n }) : this.state.loaded ? Xe.default.createElement(\"img\", {\n src: this.props.src,\n alt: this.props.alt\n }) : null;\n }\n}\nclass Operations extends Xe.default.Component {\n render() {\n let {\n specSelectors: e\n } = this.props;\n const t = e.taggedOperations();\n return 0 === t.size ? Xe.default.createElement(\"h3\", null, \" No operations defined in spec!\") : Xe.default.createElement(\"div\", null, t.map(this.renderOperationTag).toArray(), t.size < 1 ? Xe.default.createElement(\"h3\", null, \" No operations defined in spec! \") : null);\n }\n renderOperationTag = (e, t) => {\n const {\n specSelectors: r,\n getComponent: n,\n oas3Selectors: a,\n layoutSelectors: o,\n layoutActions: s,\n getConfigs: l\n } = this.props,\n i = r.validOperationMethods(),\n c = n(\"OperationContainer\", !0),\n u = n(\"OperationTag\"),\n d = e.get(\"operations\");\n return Xe.default.createElement(u, {\n key: \"operation-\" + t,\n tagObj: e,\n tag: t,\n oas3Selectors: a,\n layoutSelectors: o,\n layoutActions: s,\n getConfigs: l,\n getComponent: n,\n specUrl: r.url()\n }, Xe.default.createElement(\"div\", {\n className: \"operation-tag-content\"\n }, d.map(e => {\n const r = e.get(\"path\"),\n n = e.get(\"method\"),\n a = Qe.default.List([\"paths\", r, n]);\n return -1 === i.indexOf(n) ? null : Xe.default.createElement(c, {\n key: `${r}-${n}`,\n specPath: a,\n op: e,\n path: r,\n method: n,\n tag: t\n });\n }).toArray()));\n };\n}\nfunction isAbsoluteUrl(e) {\n return e.match(/^(?:[a-z]+:)?\\/\\//i);\n}\nfunction buildBaseUrl(e, t) {\n return e ? isAbsoluteUrl(e) ? function addProtocol(e) {\n return e.match(/^\\/\\//i) ? `${window.location.protocol}${e}` : e;\n }(e) : new URL(e, t).href : t;\n}\nfunction safeBuildUrl(e, t, {\n selectedServer: r = \"\"\n} = {}) {\n try {\n return function buildUrl(e, t, {\n selectedServer: r = \"\"\n } = {}) {\n if (!e) return;\n if (isAbsoluteUrl(e)) return e;\n const n = buildBaseUrl(r, t);\n return isAbsoluteUrl(n) ? new URL(e, n).href : new URL(e, window.location.href).href;\n }(e, t, {\n selectedServer: r\n });\n } catch {\n return;\n }\n}\nclass OperationTag extends Xe.default.Component {\n static defaultProps = {\n tagObj: Qe.default.fromJS({}),\n tag: \"\"\n };\n render() {\n const {\n tagObj: e,\n tag: t,\n children: r,\n oas3Selectors: n,\n layoutSelectors: a,\n layoutActions: o,\n getConfigs: s,\n getComponent: l,\n specUrl: i\n } = this.props;\n let {\n docExpansion: c,\n deepLinking: u\n } = s();\n const d = l(\"Collapse\"),\n p = l(\"Markdown\", !0),\n m = l(\"DeepLink\"),\n f = l(\"Link\"),\n h = l(\"ArrowUpIcon\"),\n g = l(\"ArrowDownIcon\");\n let y,\n S = e.getIn([\"tagDetails\", \"description\"], null),\n _ = e.getIn([\"tagDetails\", \"externalDocs\", \"description\"]),\n v = e.getIn([\"tagDetails\", \"externalDocs\", \"url\"]);\n y = isFunc(n) && isFunc(n.selectedServer) ? safeBuildUrl(v, i, {\n selectedServer: n.selectedServer()\n }) : v;\n let b = [\"operations-tag\", t],\n w = a.isShown(b, \"full\" === c || \"list\" === c);\n return Xe.default.createElement(\"div\", {\n className: w ? \"opblock-tag-section is-open\" : \"opblock-tag-section\"\n }, Xe.default.createElement(\"h3\", {\n onClick: () => o.show(b, !w),\n className: S ? \"opblock-tag\" : \"opblock-tag no-desc\",\n id: b.map(e => escapeDeepLinkPath(e)).join(\"-\"),\n \"data-tag\": t,\n \"data-is-open\": w\n }, Xe.default.createElement(m, {\n enabled: u,\n isShown: w,\n path: createDeepLinkPath(t),\n text: t\n }), S ? Xe.default.createElement(\"small\", null, Xe.default.createElement(p, {\n source: S\n })) : Xe.default.createElement(\"small\", null), y ? Xe.default.createElement(\"div\", {\n className: \"info__externaldocs\"\n }, Xe.default.createElement(\"small\", null, Xe.default.createElement(f, {\n href: sanitizeUrl(y),\n onClick: e => e.stopPropagation(),\n target: \"_blank\"\n }, _ || y))) : null, Xe.default.createElement(\"button\", {\n \"aria-expanded\": w,\n className: \"expand-operation\",\n title: w ? \"Collapse operation\" : \"Expand operation\",\n onClick: () => o.show(b, !w)\n }, w ? Xe.default.createElement(h, {\n className: \"arrow\"\n }) : Xe.default.createElement(g, {\n className: \"arrow\"\n }))), Xe.default.createElement(d, {\n isOpened: w\n }, r));\n }\n}\nclass Operation extends Xe.PureComponent {\n static defaultProps = {\n operation: null,\n response: null,\n request: null,\n specPath: (0, Qe.List)(),\n summary: \"\"\n };\n render() {\n let {\n specPath: e,\n response: t,\n request: r,\n toggleShown: n,\n onTryoutClick: a,\n onResetClick: o,\n onCancelClick: s,\n onExecute: l,\n fn: i,\n getComponent: c,\n getConfigs: u,\n specActions: d,\n specSelectors: p,\n authActions: m,\n authSelectors: f,\n oas3Actions: h,\n oas3Selectors: g\n } = this.props,\n y = this.props.operation,\n {\n deprecated: S,\n isShown: _,\n path: v,\n method: b,\n op: w,\n tag: C,\n operationId: x,\n allowTryItOut: O,\n displayRequestDuration: k,\n tryItOutEnabled: N,\n executeInProgress: A\n } = y.toJS(),\n {\n description: I,\n externalDocs: R,\n schemes: T\n } = w;\n const B = R ? safeBuildUrl(R.url, p.url(), {\n selectedServer: g.selectedServer()\n }) : \"\";\n let j = y.getIn([\"op\"]),\n P = j.get(\"responses\"),\n M = function getList(e, t) {\n if (!Qe.default.Iterable.isIterable(e)) return Qe.default.List();\n let r = e.getIn(Array.isArray(t) ? t : [t]);\n return Qe.default.List.isList(r) ? r : Qe.default.List();\n }(j, [\"parameters\"]),\n q = p.operationScheme(v, b),\n L = [\"operations\", C, x],\n D = getExtensions(j);\n const U = c(\"responses\"),\n $ = c(\"parameters\"),\n J = c(\"execute\"),\n V = c(\"clear\"),\n K = c(\"Collapse\"),\n z = c(\"Markdown\", !0),\n F = c(\"schemes\"),\n W = c(\"OperationServers\"),\n H = c(\"OperationExt\"),\n G = c(\"OperationSummary\"),\n X = c(\"Link\"),\n {\n showExtensions: Y\n } = u();\n if (P && t && t.size > 0) {\n let e = !P.get(String(t.get(\"status\"))) && !P.get(\"default\");\n t = t.set(\"notDocumented\", e);\n }\n let Q = [v, b];\n const Z = p.validationErrors([v, b]);\n return Xe.default.createElement(\"div\", {\n className: S ? \"opblock opblock-deprecated\" : _ ? `opblock opblock-${b} is-open` : `opblock opblock-${b}`,\n id: escapeDeepLinkPath(L.join(\"-\"))\n }, Xe.default.createElement(G, {\n operationProps: y,\n isShown: _,\n toggleShown: n,\n getComponent: c,\n authActions: m,\n authSelectors: f,\n specPath: e\n }), Xe.default.createElement(K, {\n isOpened: _\n }, Xe.default.createElement(\"div\", {\n className: \"opblock-body\"\n }, j && j.size || null === j ? null : Xe.default.createElement(rolling_load, {\n height: \"32px\",\n width: \"32px\",\n className: \"opblock-loading-animation\"\n }), S && Xe.default.createElement(\"h4\", {\n className: \"opblock-title_normal\"\n }, \" Warning: Deprecated\"), I && Xe.default.createElement(\"div\", {\n className: \"opblock-description-wrapper\"\n }, Xe.default.createElement(\"div\", {\n className: \"opblock-description\"\n }, Xe.default.createElement(z, {\n source: I\n }))), B ? Xe.default.createElement(\"div\", {\n className: \"opblock-external-docs-wrapper\"\n }, Xe.default.createElement(\"h4\", {\n className: \"opblock-title_normal\"\n }, \"Find more details\"), Xe.default.createElement(\"div\", {\n className: \"opblock-external-docs\"\n }, R.description && Xe.default.createElement(\"span\", {\n className: \"opblock-external-docs__description\"\n }, Xe.default.createElement(z, {\n source: R.description\n })), Xe.default.createElement(X, {\n target: \"_blank\",\n className: \"opblock-external-docs__link\",\n href: sanitizeUrl(B)\n }, B))) : null, j && j.size ? Xe.default.createElement($, {\n parameters: M,\n specPath: e.push(\"parameters\"),\n operation: j,\n onChangeKey: Q,\n onTryoutClick: a,\n onResetClick: o,\n onCancelClick: s,\n tryItOutEnabled: N,\n allowTryItOut: O,\n fn: i,\n getComponent: c,\n specActions: d,\n specSelectors: p,\n pathMethod: [v, b],\n getConfigs: u,\n oas3Actions: h,\n oas3Selectors: g\n }) : null, N ? Xe.default.createElement(W, {\n getComponent: c,\n path: v,\n method: b,\n operationServers: j.get(\"servers\"),\n pathServers: p.paths().getIn([v, \"servers\"]),\n getSelectedServer: g.selectedServer,\n setSelectedServer: h.setSelectedServer,\n setServerVariableValue: h.setServerVariableValue,\n getServerVariable: g.serverVariableValue,\n getEffectiveServerValue: g.serverEffectiveValue\n }) : null, N && O && T && T.size ? Xe.default.createElement(\"div\", {\n className: \"opblock-schemes\"\n }, Xe.default.createElement(F, {\n schemes: T,\n path: v,\n method: b,\n specActions: d,\n currentScheme: q\n })) : null, !N || !O || Z.length <= 0 ? null : Xe.default.createElement(\"div\", {\n className: \"validation-errors errors-wrapper\"\n }, \"Please correct the following validation errors and try again.\", Xe.default.createElement(\"ul\", null, Z.map((e, t) => Xe.default.createElement(\"li\", {\n key: t\n }, \" \", e, \" \")))), Xe.default.createElement(\"div\", {\n className: N && t && O ? \"btn-group\" : \"execute-wrapper\"\n }, N && O ? Xe.default.createElement(J, {\n operation: j,\n specActions: d,\n specSelectors: p,\n oas3Selectors: g,\n oas3Actions: h,\n path: v,\n method: b,\n onExecute: l,\n disabled: A\n }) : null, N && t && O ? Xe.default.createElement(V, {\n specActions: d,\n path: v,\n method: b\n }) : null), A ? Xe.default.createElement(\"div\", {\n className: \"loading-container\"\n }, Xe.default.createElement(\"div\", {\n className: \"loading\"\n })) : null, P ? Xe.default.createElement(U, {\n responses: P,\n request: r,\n tryItOutResponse: t,\n getComponent: c,\n getConfigs: u,\n specSelectors: p,\n oas3Actions: h,\n oas3Selectors: g,\n specActions: d,\n produces: p.producesOptionsFor([v, b]),\n producesValue: p.currentProducesFor([v, b]),\n specPath: e.push(\"responses\"),\n path: v,\n method: b,\n displayRequestDuration: k,\n fn: i\n }) : null, Y && D.size ? Xe.default.createElement(H, {\n extensions: D,\n getComponent: c\n }) : null)));\n }\n}\nlet OperationContainer = /*#__PURE__*/(() => {\n class OperationContainer extends Xe.PureComponent {\n constructor(e, t) {\n super(e, t);\n const {\n tryItOutEnabled: r\n } = e.getConfigs();\n this.state = {\n tryItOutEnabled: r,\n executeInProgress: !1\n };\n }\n static defaultProps = {\n showSummary: !0,\n response: null,\n allowTryItOut: !0,\n displayOperationId: !1,\n displayRequestDuration: !1\n };\n mapStateToProps(e, t) {\n const {\n op: r,\n layoutSelectors: n,\n getConfigs: a\n } = t,\n {\n docExpansion: o,\n deepLinking: s,\n displayOperationId: l,\n displayRequestDuration: i,\n supportedSubmitMethods: c\n } = a(),\n u = n.showSummary(),\n d = r.getIn([\"operation\", \"__originalOperationId\"]) || r.getIn([\"operation\", \"operationId\"]) || (0, ta.opId)(r.get(\"operation\"), t.path, t.method) || r.get(\"id\"),\n p = [\"operations\", t.tag, d],\n m = c.indexOf(t.method) >= 0 && (void 0 === t.allowTryItOut ? t.specSelectors.allowTryItOutFor(t.path, t.method) : t.allowTryItOut),\n f = r.getIn([\"operation\", \"security\"]) || t.specSelectors.security();\n return {\n operationId: d,\n isDeepLinkingEnabled: s,\n showSummary: u,\n displayOperationId: l,\n displayRequestDuration: i,\n allowTryItOut: m,\n security: f,\n isAuthorized: t.authSelectors.isAuthorized(f),\n isShown: n.isShown(p, \"full\" === o),\n jumpToKey: `paths.${t.path}.${t.method}`,\n response: t.specSelectors.responseFor(t.path, t.method),\n request: t.specSelectors.requestFor(t.path, t.method)\n };\n }\n componentDidMount() {\n const {\n isShown: e\n } = this.props,\n t = this.getResolvedSubtree();\n e && void 0 === t && this.requestResolvedSubtree();\n }\n UNSAFE_componentWillReceiveProps(e) {\n const {\n response: t,\n isShown: r\n } = e,\n n = this.getResolvedSubtree();\n t !== this.props.response && this.setState({\n executeInProgress: !1\n }), r && void 0 === n && this.requestResolvedSubtree();\n }\n toggleShown = () => {\n let {\n layoutActions: e,\n tag: t,\n operationId: r,\n isShown: n\n } = this.props;\n const a = this.getResolvedSubtree();\n n || void 0 !== a || this.requestResolvedSubtree(), e.show([\"operations\", t, r], !n);\n };\n onCancelClick = () => {\n this.setState({\n tryItOutEnabled: !this.state.tryItOutEnabled\n });\n };\n onTryoutClick = () => {\n this.setState({\n tryItOutEnabled: !this.state.tryItOutEnabled\n });\n };\n onResetClick = e => {\n const t = this.props.oas3Selectors.selectDefaultRequestBodyValue(...e);\n this.props.oas3Actions.setRequestBodyValue({\n value: t,\n pathMethod: e\n });\n };\n onExecute = () => {\n this.setState({\n executeInProgress: !0\n });\n };\n getResolvedSubtree = () => {\n const {\n specSelectors: e,\n path: t,\n method: r,\n specPath: n\n } = this.props;\n return n ? e.specResolvedSubtree(n.toJS()) : e.specResolvedSubtree([\"paths\", t, r]);\n };\n requestResolvedSubtree = () => {\n const {\n specActions: e,\n path: t,\n method: r,\n specPath: n\n } = this.props;\n return n ? e.requestResolvedSubtree(n.toJS()) : e.requestResolvedSubtree([\"paths\", t, r]);\n };\n render() {\n let {\n op: e,\n tag: t,\n path: r,\n method: n,\n security: a,\n isAuthorized: o,\n operationId: s,\n showSummary: l,\n isShown: i,\n jumpToKey: c,\n allowTryItOut: u,\n response: d,\n request: p,\n displayOperationId: m,\n displayRequestDuration: f,\n isDeepLinkingEnabled: h,\n specPath: g,\n specSelectors: y,\n specActions: S,\n getComponent: _,\n getConfigs: v,\n layoutSelectors: b,\n layoutActions: w,\n authActions: C,\n authSelectors: x,\n oas3Actions: O,\n oas3Selectors: k,\n fn: N\n } = this.props;\n const A = _(\"operation\"),\n I = this.getResolvedSubtree() || (0, Qe.Map)(),\n R = (0, Qe.fromJS)({\n op: I,\n tag: t,\n path: r,\n summary: e.getIn([\"operation\", \"summary\"]) || \"\",\n deprecated: I.get(\"deprecated\") || e.getIn([\"operation\", \"deprecated\"]) || !1,\n method: n,\n security: a,\n isAuthorized: o,\n operationId: s,\n originalOperationId: I.getIn([\"operation\", \"__originalOperationId\"]),\n showSummary: l,\n isShown: i,\n jumpToKey: c,\n allowTryItOut: u,\n request: p,\n displayOperationId: m,\n displayRequestDuration: f,\n isDeepLinkingEnabled: h,\n executeInProgress: this.state.executeInProgress,\n tryItOutEnabled: this.state.tryItOutEnabled\n });\n return Xe.default.createElement(A, {\n operation: R,\n response: d,\n request: p,\n isShown: i,\n toggleShown: this.toggleShown,\n onTryoutClick: this.onTryoutClick,\n onResetClick: this.onResetClick,\n onCancelClick: this.onCancelClick,\n onExecute: this.onExecute,\n specPath: g,\n specActions: S,\n specSelectors: y,\n oas3Actions: O,\n oas3Selectors: k,\n layoutActions: w,\n layoutSelectors: b,\n authActions: C,\n authSelectors: x,\n getComponent: _,\n getConfigs: v,\n fn: N\n });\n }\n }\n return OperationContainer;\n})();\nvar ka = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n default: function () {\n return fe.default;\n }\n});\nclass OperationSummary extends Xe.PureComponent {\n static defaultProps = {\n operationProps: null,\n specPath: (0, Qe.List)(),\n summary: \"\"\n };\n render() {\n let {\n isShown: e,\n toggleShown: t,\n getComponent: r,\n authActions: n,\n authSelectors: a,\n operationProps: o,\n specPath: s\n } = this.props,\n {\n summary: l,\n isAuthorized: i,\n method: c,\n op: u,\n showSummary: d,\n path: p,\n operationId: m,\n originalOperationId: f,\n displayOperationId: h\n } = o.toJS(),\n {\n summary: g\n } = u,\n y = o.get(\"security\");\n const S = r(\"authorizeOperationBtn\", !0),\n _ = r(\"OperationSummaryMethod\"),\n v = r(\"OperationSummaryPath\"),\n b = r(\"JumpToPath\", !0),\n w = r(\"CopyToClipboardBtn\", !0),\n C = r(\"ArrowUpIcon\"),\n x = r(\"ArrowDownIcon\"),\n O = y && !!y.count(),\n k = O && 1 === y.size && y.first().isEmpty(),\n N = !O || k;\n return Xe.default.createElement(\"div\", {\n className: `opblock-summary opblock-summary-${c}`\n }, Xe.default.createElement(\"button\", {\n \"aria-expanded\": e,\n className: \"opblock-summary-control\",\n onClick: t\n }, Xe.default.createElement(_, {\n method: c\n }), Xe.default.createElement(\"div\", {\n className: \"opblock-summary-path-description-wrapper\"\n }, Xe.default.createElement(v, {\n getComponent: r,\n operationProps: o,\n specPath: s\n }), d ? Xe.default.createElement(\"div\", {\n className: \"opblock-summary-description\"\n }, (0, ka.default)(g || l)) : null), h && (f || m) ? Xe.default.createElement(\"span\", {\n className: \"opblock-summary-operation-id\"\n }, f || m) : null), Xe.default.createElement(w, {\n textToCopy: `${s.get(1)}`\n }), N ? null : Xe.default.createElement(S, {\n isAuthorized: i,\n onClick: () => {\n const e = a.definitionsForRequirements(y);\n n.showDefinitions(e);\n }\n }), Xe.default.createElement(b, {\n path: s\n }), Xe.default.createElement(\"button\", {\n \"aria-label\": `${c} ${p.replace(/\\//g, \"​/\")}`,\n className: \"opblock-control-arrow\",\n \"aria-expanded\": e,\n tabIndex: \"-1\",\n onClick: t\n }, e ? Xe.default.createElement(C, {\n className: \"arrow\"\n }) : Xe.default.createElement(x, {\n className: \"arrow\"\n })));\n }\n}\nlet OperationSummaryMethod = /*#__PURE__*/(() => {\n class OperationSummaryMethod extends Xe.PureComponent {\n static defaultProps = {\n operationProps: null\n };\n render() {\n let {\n method: e\n } = this.props;\n return Xe.default.createElement(\"span\", {\n className: \"opblock-summary-method\"\n }, e.toUpperCase());\n }\n }\n return OperationSummaryMethod;\n})();\nclass OperationSummaryPath extends Xe.PureComponent {\n render() {\n let {\n getComponent: e,\n operationProps: t\n } = this.props,\n {\n deprecated: r,\n isShown: n,\n path: a,\n tag: o,\n operationId: s,\n isDeepLinkingEnabled: l\n } = t.toJS();\n const i = a.split(/(?=\\/)/g);\n for (let e = 1; e < i.length; e += 2) i.splice(e, 0, Xe.default.createElement(\"wbr\", {\n key: e\n }));\n const c = e(\"DeepLink\");\n return Xe.default.createElement(\"span\", {\n className: r ? \"opblock-summary-path__deprecated\" : \"opblock-summary-path\",\n \"data-path\": a\n }, Xe.default.createElement(c, {\n enabled: l,\n isShown: n,\n path: createDeepLinkPath(`${o}/${s}`),\n text: i\n }));\n }\n}\nvar operation_extensions = ({\n extensions: e,\n getComponent: t\n}) => {\n let r = t(\"OperationExtRow\");\n return Xe.default.createElement(\"div\", {\n className: \"opblock-section\"\n }, Xe.default.createElement(\"div\", {\n className: \"opblock-section-header\"\n }, Xe.default.createElement(\"h4\", null, \"Extensions\")), Xe.default.createElement(\"div\", {\n className: \"table-container\"\n }, Xe.default.createElement(\"table\", null, Xe.default.createElement(\"thead\", null, Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"td\", {\n className: \"col_header\"\n }, \"Field\"), Xe.default.createElement(\"td\", {\n className: \"col_header\"\n }, \"Value\"))), Xe.default.createElement(\"tbody\", null, e.entrySeq().map(([e, t]) => Xe.default.createElement(r, {\n key: `${e}-${t}`,\n xKey: e,\n xVal: t\n }))))));\n};\nvar operation_extension_row = ({\n xKey: e,\n xVal: t\n}) => {\n const r = t ? t.toJS ? t.toJS() : t : null;\n return Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"td\", null, e), Xe.default.createElement(\"td\", null, JSON.stringify(r)));\n};\nfunction createHtmlReadyId(e, t = \"_\") {\n return e.replace(/[^\\w-]/g, t);\n}\nclass Responses extends Xe.default.Component {\n static defaultProps = {\n tryItOutResponse: null,\n produces: (0, Qe.fromJS)([\"application/json\"]),\n displayRequestDuration: !1\n };\n onChangeProducesWrapper = e => this.props.specActions.changeProducesValue([this.props.path, this.props.method], e);\n onResponseContentTypeChange = ({\n controlsAcceptHeader: e,\n value: t\n }) => {\n const {\n oas3Actions: r,\n path: n,\n method: a\n } = this.props;\n e && r.setResponseContentType({\n value: t,\n path: n,\n method: a\n });\n };\n render() {\n let {\n responses: e,\n tryItOutResponse: t,\n getComponent: r,\n getConfigs: n,\n specSelectors: a,\n fn: o,\n producesValue: s,\n displayRequestDuration: l,\n specPath: i,\n path: c,\n method: u,\n oas3Selectors: d,\n oas3Actions: p\n } = this.props,\n m = function defaultStatusCode(e) {\n let t = e.keySeq();\n return t.contains(Ot) ? Ot : t.filter(e => \"2\" === (e + \"\")[0]).sort().first();\n }(e);\n const f = r(\"contentType\"),\n h = r(\"liveResponse\"),\n g = r(\"response\");\n let y = this.props.produces && this.props.produces.size ? this.props.produces : Responses.defaultProps.produces;\n const S = a.isOAS3() ? function getAcceptControllingResponse(e) {\n if (!Qe.default.OrderedMap.isOrderedMap(e)) return null;\n if (!e.size) return null;\n const t = e.find((e, t) => t.startsWith(\"2\") && Object.keys(e.get(\"content\") || {}).length > 0),\n r = e.get(\"default\") || Qe.default.OrderedMap(),\n n = (r.get(\"content\") || Qe.default.OrderedMap()).keySeq().toJS().length ? r : null;\n return t || n;\n }(e) : null,\n _ = createHtmlReadyId(`${u}${c}_responses`),\n v = `${_}_select`;\n return Xe.default.createElement(\"div\", {\n className: \"responses-wrapper\"\n }, Xe.default.createElement(\"div\", {\n className: \"opblock-section-header\"\n }, Xe.default.createElement(\"h4\", null, \"Responses\"), a.isOAS3() ? null : Xe.default.createElement(\"label\", {\n htmlFor: v\n }, Xe.default.createElement(\"span\", null, \"Response content type\"), Xe.default.createElement(f, {\n value: s,\n ariaControls: _,\n ariaLabel: \"Response content type\",\n className: \"execute-content-type\",\n contentTypes: y,\n controlId: v,\n onChange: this.onChangeProducesWrapper\n }))), Xe.default.createElement(\"div\", {\n className: \"responses-inner\"\n }, t ? Xe.default.createElement(\"div\", null, Xe.default.createElement(h, {\n response: t,\n getComponent: r,\n getConfigs: n,\n specSelectors: a,\n path: this.props.path,\n method: this.props.method,\n displayRequestDuration: l\n }), Xe.default.createElement(\"h4\", null, \"Responses\")) : null, Xe.default.createElement(\"table\", {\n \"aria-live\": \"polite\",\n className: \"responses-table\",\n id: _,\n role: \"region\"\n }, Xe.default.createElement(\"thead\", null, Xe.default.createElement(\"tr\", {\n className: \"responses-header\"\n }, Xe.default.createElement(\"td\", {\n className: \"col_header response-col_status\"\n }, \"Code\"), Xe.default.createElement(\"td\", {\n className: \"col_header response-col_description\"\n }, \"Description\"), a.isOAS3() ? Xe.default.createElement(\"td\", {\n className: \"col col_header response-col_links\"\n }, \"Links\") : null)), Xe.default.createElement(\"tbody\", null, e.entrySeq().map(([e, l]) => {\n let f = t && t.get(\"status\") == e ? \"response_current\" : \"\";\n return Xe.default.createElement(g, {\n key: e,\n path: c,\n method: u,\n specPath: i.push(e),\n isDefault: m === e,\n fn: o,\n className: f,\n code: e,\n response: l,\n specSelectors: a,\n controlsAcceptHeader: l === S,\n onContentTypeChange: this.onResponseContentTypeChange,\n contentType: s,\n getConfigs: n,\n activeExamplesKey: d.activeExamplesMember(c, u, \"responses\", e),\n oas3Actions: p,\n getComponent: r\n });\n }).toArray()))));\n }\n}\nfunction getKnownSyntaxHighlighterLanguage(e) {\n return function canJsonParse(e) {\n try {\n return !!JSON.parse(e);\n } catch (e) {\n return null;\n }\n }(e) ? \"json\" : null;\n}\nclass Response extends Xe.default.Component {\n constructor(e, t) {\n super(e, t), this.state = {\n responseContentType: \"\"\n };\n }\n static defaultProps = {\n response: (0, Qe.fromJS)({}),\n onContentTypeChange: () => {}\n };\n _onContentTypeChange = e => {\n const {\n onContentTypeChange: t,\n controlsAcceptHeader: r\n } = this.props;\n this.setState({\n responseContentType: e\n }), t({\n value: e,\n controlsAcceptHeader: r\n });\n };\n getTargetExamplesKey = () => {\n const {\n response: e,\n contentType: t,\n activeExamplesKey: r\n } = this.props,\n n = this.state.responseContentType || t,\n a = e.getIn([\"content\", n], (0, Qe.Map)({})).get(\"examples\", null).keySeq().first();\n return r || a;\n };\n render() {\n let {\n path: e,\n method: t,\n code: r,\n response: n,\n className: a,\n specPath: o,\n fn: s,\n getComponent: l,\n getConfigs: i,\n specSelectors: c,\n contentType: u,\n controlsAcceptHeader: d,\n oas3Actions: p\n } = this.props,\n {\n inferSchema: m,\n getSampleSchema: f\n } = s,\n h = c.isOAS3();\n const {\n showExtensions: g\n } = i();\n let y = g ? getExtensions(n) : null,\n S = n.get(\"headers\"),\n _ = n.get(\"links\");\n const v = l(\"ResponseExtension\"),\n b = l(\"headers\"),\n w = l(\"HighlightCode\", !0),\n C = l(\"modelExample\"),\n x = l(\"Markdown\", !0),\n O = l(\"operationLink\"),\n k = l(\"contentType\"),\n N = l(\"ExamplesSelect\"),\n A = l(\"Example\");\n var I, R;\n const T = this.state.responseContentType || u,\n B = n.getIn([\"content\", T], (0, Qe.Map)({})),\n j = B.get(\"examples\", null);\n if (h) {\n const e = B.get(\"schema\");\n I = e ? m(e.toJS()) : null, R = e ? (0, Qe.List)([\"content\", this.state.responseContentType, \"schema\"]) : o;\n } else I = n.get(\"schema\"), R = n.has(\"schema\") ? o.push(\"schema\") : o;\n let P,\n M,\n q = !1,\n L = {\n includeReadOnly: !0\n };\n if (h) {\n if (M = B.get(\"schema\")?.toJS(), Qe.Map.isMap(j) && !j.isEmpty()) {\n const e = this.getTargetExamplesKey(),\n getMediaTypeExample = e => e.get(\"value\");\n P = getMediaTypeExample(j.get(e, (0, Qe.Map)({}))), void 0 === P && (P = getMediaTypeExample(j.values().next().value)), q = !0;\n } else void 0 !== B.get(\"example\") && (P = B.get(\"example\"), q = !0);\n } else {\n M = I, L = {\n ...L,\n includeWriteOnly: !0\n };\n const e = n.getIn([\"examples\", T]);\n e && (P = e, q = !0);\n }\n const D = ((e, t) => {\n if (null == e) return null;\n const r = getKnownSyntaxHighlighterLanguage(e) ? \"json\" : null;\n return Xe.default.createElement(\"div\", null, Xe.default.createElement(t, {\n className: \"example\",\n language: r\n }, stringify(e)));\n })(f(M, T, L, q ? P : void 0), w);\n return Xe.default.createElement(\"tr\", {\n className: \"response \" + (a || \"\"),\n \"data-code\": r\n }, Xe.default.createElement(\"td\", {\n className: \"response-col_status\"\n }, r), Xe.default.createElement(\"td\", {\n className: \"response-col_description\"\n }, Xe.default.createElement(\"div\", {\n className: \"response-col_description__inner\"\n }, Xe.default.createElement(x, {\n source: n.get(\"description\")\n })), g && y.size ? y.entrySeq().map(([e, t]) => Xe.default.createElement(v, {\n key: `${e}-${t}`,\n xKey: e,\n xVal: t\n })) : null, h && n.get(\"content\") ? Xe.default.createElement(\"section\", {\n className: \"response-controls\"\n }, Xe.default.createElement(\"div\", {\n className: (0, _r.default)(\"response-control-media-type\", {\n \"response-control-media-type--accept-controller\": d\n })\n }, Xe.default.createElement(\"small\", {\n className: \"response-control-media-type__title\"\n }, \"Media type\"), Xe.default.createElement(k, {\n value: this.state.responseContentType,\n contentTypes: n.get(\"content\") ? n.get(\"content\").keySeq() : (0, Qe.Seq)(),\n onChange: this._onContentTypeChange,\n ariaLabel: \"Media Type\"\n }), d ? Xe.default.createElement(\"small\", {\n className: \"response-control-media-type__accept-message\"\n }, \"Controls \", Xe.default.createElement(\"code\", null, \"Accept\"), \" header.\") : null), Qe.Map.isMap(j) && !j.isEmpty() ? Xe.default.createElement(\"div\", {\n className: \"response-control-examples\"\n }, Xe.default.createElement(\"small\", {\n className: \"response-control-examples__title\"\n }, \"Examples\"), Xe.default.createElement(N, {\n examples: j,\n currentExampleKey: this.getTargetExamplesKey(),\n onSelect: n => p.setActiveExamplesMember({\n name: n,\n pathMethod: [e, t],\n contextType: \"responses\",\n contextName: r\n }),\n showLabels: !1\n })) : null) : null, D || I ? Xe.default.createElement(C, {\n specPath: R,\n getComponent: l,\n getConfigs: i,\n specSelectors: c,\n schema: fromJSOrdered(I),\n example: D,\n includeReadOnly: !0\n }) : null, h && j ? Xe.default.createElement(A, {\n example: j.get(this.getTargetExamplesKey(), (0, Qe.Map)({})),\n getComponent: l,\n getConfigs: i,\n omitValue: !0\n }) : null, S ? Xe.default.createElement(b, {\n headers: S,\n getComponent: l\n }) : null), h ? Xe.default.createElement(\"td\", {\n className: \"response-col_links\"\n }, _ ? _.toSeq().entrySeq().map(([e, t]) => Xe.default.createElement(O, {\n key: e,\n name: e,\n link: t,\n getComponent: l\n })) : Xe.default.createElement(\"i\", null, \"No links\")) : null);\n }\n}\nvar response_extension = ({\n xKey: e,\n xVal: t\n }) => Xe.default.createElement(\"div\", {\n className: \"response__extension\"\n }, e, \": \", String(t)),\n Na = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return he.default;\n }\n }),\n Aa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return ge.default;\n }\n });\nclass ResponseBody extends Xe.default.PureComponent {\n state = {\n parsedContent: null\n };\n updateParsedContent = e => {\n const {\n content: t\n } = this.props;\n if (e !== t) if (t && t instanceof Blob) {\n var r = new FileReader();\n r.onload = () => {\n this.setState({\n parsedContent: r.result\n });\n }, r.readAsText(t);\n } else this.setState({\n parsedContent: t.toString()\n });\n };\n componentDidMount() {\n this.updateParsedContent(null);\n }\n componentDidUpdate(e) {\n this.updateParsedContent(e.content);\n }\n render() {\n let {\n content: e,\n contentType: t,\n url: r,\n headers: n = {},\n getComponent: a\n } = this.props;\n const {\n parsedContent: o\n } = this.state,\n s = a(\"HighlightCode\", !0),\n l = \"response_\" + new Date().getTime();\n let i, c;\n if (r = r || \"\", (/^application\\/octet-stream/i.test(t) || n[\"Content-Disposition\"] && /attachment/i.test(n[\"Content-Disposition\"]) || n[\"content-disposition\"] && /attachment/i.test(n[\"content-disposition\"]) || n[\"Content-Description\"] && /File Transfer/i.test(n[\"Content-Description\"]) || n[\"content-description\"] && /File Transfer/i.test(n[\"content-description\"])) && (e.size > 0 || e.length > 0)) {\n if (\"Blob\" in window) {\n let a = t || \"text/html\",\n o = e instanceof Blob ? e : new Blob([e], {\n type: a\n }),\n s = window.URL.createObjectURL(o),\n l = [a, r.substr(r.lastIndexOf(\"/\") + 1), s].join(\":\"),\n i = n[\"content-disposition\"] || n[\"Content-Disposition\"];\n if (void 0 !== i) {\n let e = function extractFileNameFromContentDispositionHeader(e) {\n let t;\n if ([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i, /filename\\*=[^']+'\\w*'([^;]+);?/i, /filename=\"([^;]*);?\"/i, /filename=([^;]*);?/i].some(r => (t = r.exec(e), null !== t)), null !== t && t.length > 1) try {\n return decodeURIComponent(t[1]);\n } catch (e) {\n console.error(e);\n }\n return null;\n }(i);\n null !== e && (l = e);\n }\n c = dt.navigator && dt.navigator.msSaveOrOpenBlob ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"a\", {\n href: s,\n onClick: () => dt.navigator.msSaveOrOpenBlob(o, l)\n }, \"Download file\")) : Xe.default.createElement(\"div\", null, Xe.default.createElement(\"a\", {\n href: s,\n download: l\n }, \"Download file\"));\n } else c = Xe.default.createElement(\"pre\", {\n className: \"microlight\"\n }, \"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");\n } else if (/json/i.test(t)) {\n let t = null;\n getKnownSyntaxHighlighterLanguage(e) && (t = \"json\");\n try {\n i = JSON.stringify(JSON.parse(e), null, \" \");\n } catch (t) {\n i = \"can't parse JSON. Raw result:\\n\\n\" + e;\n }\n c = Xe.default.createElement(s, {\n language: t,\n downloadable: !0,\n fileName: `${l}.json`,\n canCopy: !0\n }, i);\n } else /xml/i.test(t) ? (i = (0, Na.default)(e, {\n textNodesOnSameLine: !0,\n indentor: \" \"\n }), c = Xe.default.createElement(s, {\n downloadable: !0,\n fileName: `${l}.xml`,\n canCopy: !0\n }, i)) : c = \"text/html\" === (0, Aa.default)(t) || /text\\/plain/.test(t) ? Xe.default.createElement(s, {\n downloadable: !0,\n fileName: `${l}.html`,\n canCopy: !0\n }, e) : \"text/csv\" === (0, Aa.default)(t) || /text\\/csv/.test(t) ? Xe.default.createElement(s, {\n downloadable: !0,\n fileName: `${l}.csv`,\n canCopy: !0\n }, e) : /^image\\//i.test(t) ? t.includes(\"svg\") ? Xe.default.createElement(\"div\", null, \" \", e, \" \") : Xe.default.createElement(\"img\", {\n src: window.URL.createObjectURL(e)\n }) : /^audio\\//i.test(t) ? Xe.default.createElement(\"pre\", {\n className: \"microlight\"\n }, Xe.default.createElement(\"audio\", {\n controls: !0,\n key: r\n }, Xe.default.createElement(\"source\", {\n src: r,\n type: t\n }))) : \"string\" == typeof e ? Xe.default.createElement(s, {\n downloadable: !0,\n fileName: `${l}.txt`,\n canCopy: !0\n }, e) : e.size > 0 ? o ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"p\", {\n className: \"i\"\n }, \"Unrecognized response type; displaying content as text.\"), Xe.default.createElement(s, {\n downloadable: !0,\n fileName: `${l}.txt`,\n canCopy: !0\n }, o)) : Xe.default.createElement(\"p\", {\n className: \"i\"\n }, \"Unrecognized response type; unable to display.\") : null;\n return c ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h5\", null, \"Response body\"), c) : null;\n }\n}\nclass Parameters extends Xe.Component {\n constructor(e) {\n super(e), this.state = {\n callbackVisible: !1,\n parametersVisible: !0\n };\n }\n static defaultProps = {\n onTryoutClick: Function.prototype,\n onCancelClick: Function.prototype,\n tryItOutEnabled: !1,\n allowTryItOut: !0,\n onChangeKey: [],\n specPath: []\n };\n onChange = (e, t, r) => {\n let {\n specActions: {\n changeParamByIdentity: n\n },\n onChangeKey: a\n } = this.props;\n n(a, e, t, r);\n };\n onChangeConsumesWrapper = e => {\n let {\n specActions: {\n changeConsumesValue: t\n },\n onChangeKey: r\n } = this.props;\n t(r, e);\n };\n toggleTab = e => \"parameters\" === e ? this.setState({\n parametersVisible: !0,\n callbackVisible: !1\n }) : \"callbacks\" === e ? this.setState({\n callbackVisible: !0,\n parametersVisible: !1\n }) : void 0;\n onChangeMediaType = ({\n value: e,\n pathMethod: t\n }) => {\n let {\n specActions: r,\n oas3Selectors: n,\n oas3Actions: a\n } = this.props;\n const o = n.hasUserEditedBody(...t),\n s = n.shouldRetainRequestBodyValue(...t);\n a.setRequestContentType({\n value: e,\n pathMethod: t\n }), a.initRequestBodyValidateError({\n pathMethod: t\n }), o || (s || a.setRequestBodyValue({\n value: void 0,\n pathMethod: t\n }), r.clearResponse(...t), r.clearRequest(...t), r.clearValidateParams(t));\n };\n render() {\n let {\n onTryoutClick: e,\n onResetClick: t,\n parameters: r,\n allowTryItOut: n,\n tryItOutEnabled: a,\n specPath: o,\n fn: s,\n getComponent: l,\n getConfigs: i,\n specSelectors: c,\n specActions: u,\n pathMethod: d,\n oas3Actions: p,\n oas3Selectors: m,\n operation: f\n } = this.props;\n const h = l(\"parameterRow\"),\n g = l(\"TryItOutButton\"),\n y = l(\"contentType\"),\n S = l(\"Callbacks\", !0),\n _ = l(\"RequestBody\", !0),\n v = a && n,\n b = c.isOAS3(),\n w = `${createHtmlReadyId(`${d[1]}${d[0]}_requests`)}_select`,\n C = f.get(\"requestBody\"),\n x = Object.values(r.reduce((e, t) => {\n const r = t.get(\"in\");\n return e[r] ??= [], e[r].push(t), e;\n }, {})).reduce((e, t) => e.concat(t), []);\n return Xe.default.createElement(\"div\", {\n className: \"opblock-section\"\n }, Xe.default.createElement(\"div\", {\n className: \"opblock-section-header\"\n }, b ? Xe.default.createElement(\"div\", {\n className: \"tab-header\"\n }, Xe.default.createElement(\"div\", {\n onClick: () => this.toggleTab(\"parameters\"),\n className: `tab-item ${this.state.parametersVisible && \"active\"}`\n }, Xe.default.createElement(\"h4\", {\n className: \"opblock-title\"\n }, Xe.default.createElement(\"span\", null, \"Parameters\"))), f.get(\"callbacks\") ? Xe.default.createElement(\"div\", {\n onClick: () => this.toggleTab(\"callbacks\"),\n className: `tab-item ${this.state.callbackVisible && \"active\"}`\n }, Xe.default.createElement(\"h4\", {\n className: \"opblock-title\"\n }, Xe.default.createElement(\"span\", null, \"Callbacks\"))) : null) : Xe.default.createElement(\"div\", {\n className: \"tab-header\"\n }, Xe.default.createElement(\"h4\", {\n className: \"opblock-title\"\n }, \"Parameters\")), n ? Xe.default.createElement(g, {\n isOAS3: c.isOAS3(),\n hasUserEditedBody: m.hasUserEditedBody(...d),\n enabled: a,\n onCancelClick: this.props.onCancelClick,\n onTryoutClick: e,\n onResetClick: () => t(d)\n }) : null), this.state.parametersVisible ? Xe.default.createElement(\"div\", {\n className: \"parameters-container\"\n }, x.length ? Xe.default.createElement(\"div\", {\n className: \"table-container\"\n }, Xe.default.createElement(\"table\", {\n className: \"parameters\"\n }, Xe.default.createElement(\"thead\", null, Xe.default.createElement(\"tr\", null, Xe.default.createElement(\"th\", {\n className: \"col_header parameters-col_name\"\n }, \"Name\"), Xe.default.createElement(\"th\", {\n className: \"col_header parameters-col_description\"\n }, \"Description\"))), Xe.default.createElement(\"tbody\", null, x.map((e, t) => Xe.default.createElement(h, {\n fn: s,\n specPath: o.push(t.toString()),\n getComponent: l,\n getConfigs: i,\n rawParam: e,\n param: c.parameterWithMetaByIdentity(d, e),\n key: `${e.get(\"in\")}.${e.get(\"name\")}`,\n onChange: this.onChange,\n onChangeConsumes: this.onChangeConsumesWrapper,\n specSelectors: c,\n specActions: u,\n oas3Actions: p,\n oas3Selectors: m,\n pathMethod: d,\n isExecute: v\n }))))) : Xe.default.createElement(\"div\", {\n className: \"opblock-description-wrapper\"\n }, Xe.default.createElement(\"p\", null, \"No parameters\"))) : null, this.state.callbackVisible ? Xe.default.createElement(\"div\", {\n className: \"callbacks-container opblock-description-wrapper\"\n }, Xe.default.createElement(S, {\n callbacks: (0, Qe.Map)(f.get(\"callbacks\")),\n specPath: o.slice(0, -1).push(\"callbacks\")\n })) : null, b && C && this.state.parametersVisible && Xe.default.createElement(\"div\", {\n className: \"opblock-section opblock-section-request-body\"\n }, Xe.default.createElement(\"div\", {\n className: \"opblock-section-header\"\n }, Xe.default.createElement(\"h4\", {\n className: `opblock-title parameter__name ${C.get(\"required\") && \"required\"}`\n }, \"Request body\"), Xe.default.createElement(\"label\", {\n id: w\n }, Xe.default.createElement(y, {\n value: m.requestContentType(...d),\n contentTypes: C.get(\"content\", (0, Qe.List)()).keySeq(),\n onChange: e => {\n this.onChangeMediaType({\n value: e,\n pathMethod: d\n });\n },\n className: \"body-param-content-type\",\n ariaLabel: \"Request content type\",\n controlId: w\n }))), Xe.default.createElement(\"div\", {\n className: \"opblock-description-wrapper\"\n }, Xe.default.createElement(_, {\n setRetainRequestBodyValueFlag: e => p.setRetainRequestBodyValueFlag({\n value: e,\n pathMethod: d\n }),\n userHasEditedBody: m.hasUserEditedBody(...d),\n specPath: o.slice(0, -1).push(\"requestBody\"),\n requestBody: C,\n requestBodyValue: m.requestBodyValue(...d),\n requestBodyInclusionSetting: m.requestBodyInclusionSetting(...d),\n requestBodyErrors: m.requestBodyErrors(...d),\n isExecute: v,\n getConfigs: i,\n activeExamplesKey: m.activeExamplesMember(...d, \"requestBody\", \"requestBody\"),\n updateActiveExamplesKey: e => {\n this.props.oas3Actions.setActiveExamplesMember({\n name: e,\n pathMethod: this.props.pathMethod,\n contextType: \"requestBody\",\n contextName: \"requestBody\"\n });\n },\n onChange: (e, t) => {\n if (t) {\n const r = m.requestBodyValue(...d),\n n = Qe.Map.isMap(r) ? r : (0, Qe.Map)();\n return p.setRequestBodyValue({\n pathMethod: d,\n value: n.setIn(t, e)\n });\n }\n p.setRequestBodyValue({\n value: e,\n pathMethod: d\n });\n },\n onChangeIncludeEmpty: (e, t) => {\n p.setRequestBodyInclusion({\n pathMethod: d,\n value: t,\n name: e\n });\n },\n contentType: m.requestContentType(...d)\n }))));\n }\n}\nvar parameter_extension = ({\n xKey: e,\n xVal: t\n}) => Xe.default.createElement(\"div\", {\n className: \"parameter__extension\"\n}, e, \": \", String(t));\nconst Ia = {\n onChange: () => {},\n isIncludedOptions: {}\n};\nlet ParameterIncludeEmpty = /*#__PURE__*/(() => {\n class ParameterIncludeEmpty extends Xe.Component {\n static defaultProps = Ia;\n componentDidMount() {\n const {\n isIncludedOptions: e,\n onChange: t\n } = this.props,\n {\n shouldDispatchInit: r,\n defaultValue: n\n } = e;\n r && t(n);\n }\n onCheckboxChange = e => {\n const {\n onChange: t\n } = this.props;\n t(e.target.checked);\n };\n render() {\n let {\n isIncluded: e,\n isDisabled: t\n } = this.props;\n return Xe.default.createElement(\"div\", null, Xe.default.createElement(\"label\", {\n htmlFor: \"include_empty_value\",\n className: (0, _r.default)(\"parameter__empty_value_toggle\", {\n disabled: t\n })\n }, Xe.default.createElement(\"input\", {\n id: \"include_empty_value\",\n type: \"checkbox\",\n disabled: t,\n checked: !t && e,\n onChange: this.onCheckboxChange\n }), \"Send empty value\"));\n }\n }\n return ParameterIncludeEmpty;\n})();\nclass ParameterRow extends Xe.Component {\n constructor(e, t) {\n super(e, t), this.setDefaultValue();\n }\n UNSAFE_componentWillReceiveProps(e) {\n let t,\n {\n specSelectors: r,\n pathMethod: n,\n rawParam: a\n } = e,\n o = r.isOAS3(),\n s = r.parameterWithMetaByIdentity(n, a) || new Qe.Map();\n if (s = s.isEmpty() ? a : s, o) {\n let {\n schema: e\n } = getParameterSchema(s, {\n isOAS3: o\n });\n t = e ? e.get(\"enum\") : void 0;\n } else t = s ? s.get(\"enum\") : void 0;\n let l,\n i = s ? s.get(\"value\") : void 0;\n void 0 !== i ? l = i : a.get(\"required\") && t && t.size && (l = t.first()), void 0 !== l && l !== i && this.onChangeWrapper(function numberToString(e) {\n return \"number\" == typeof e ? e.toString() : e;\n }(l)), this.setDefaultValue();\n }\n onChangeWrapper = (e, t = !1) => {\n let r,\n {\n onChange: n,\n rawParam: a\n } = this.props;\n return r = \"\" === e || e && 0 === e.size ? null : e, n(a, r, t);\n };\n _onExampleSelect = e => {\n this.props.oas3Actions.setActiveExamplesMember({\n name: e,\n pathMethod: this.props.pathMethod,\n contextType: \"parameters\",\n contextName: this.getParamKey()\n });\n };\n onChangeIncludeEmpty = e => {\n let {\n specActions: t,\n param: r,\n pathMethod: n\n } = this.props;\n const a = r.get(\"name\"),\n o = r.get(\"in\");\n return t.updateEmptyParamInclusion(n, a, o, e);\n };\n setDefaultValue = () => {\n let {\n specSelectors: e,\n pathMethod: t,\n rawParam: r,\n oas3Selectors: n,\n fn: a\n } = this.props;\n const o = e.parameterWithMetaByIdentity(t, r) || (0, Qe.Map)();\n let {\n schema: s\n } = getParameterSchema(o, {\n isOAS3: e.isOAS3()\n });\n const l = o.get(\"content\", (0, Qe.Map)()).keySeq().first(),\n i = s ? a.getSampleSchema(s.toJS(), l, {\n includeWriteOnly: !0\n }) : null;\n if (o && void 0 === o.get(\"value\") && \"body\" !== o.get(\"in\")) {\n let r;\n if (e.isSwagger2()) r = void 0 !== o.get(\"x-example\") ? o.get(\"x-example\") : void 0 !== o.getIn([\"schema\", \"example\"]) ? o.getIn([\"schema\", \"example\"]) : s && s.getIn([\"default\"]);else if (e.isOAS3()) {\n s = this.composeJsonSchema(s);\n const e = n.activeExamplesMember(...t, \"parameters\", this.getParamKey());\n r = void 0 !== o.getIn([\"examples\", e, \"value\"]) ? o.getIn([\"examples\", e, \"value\"]) : void 0 !== o.getIn([\"content\", l, \"example\"]) ? o.getIn([\"content\", l, \"example\"]) : void 0 !== o.get(\"example\") ? o.get(\"example\") : void 0 !== (s && s.get(\"example\")) ? s && s.get(\"example\") : void 0 !== (s && s.get(\"default\")) ? s && s.get(\"default\") : o.get(\"default\");\n }\n void 0 === r || Qe.List.isList(r) || (r = stringify(r)), void 0 !== r ? this.onChangeWrapper(r) : s && \"object\" === s.get(\"type\") && i && !o.get(\"examples\") && this.onChangeWrapper(Qe.List.isList(i) ? i : stringify(i));\n }\n };\n getParamKey() {\n const {\n param: e\n } = this.props;\n return e ? `${e.get(\"name\")}-${e.get(\"in\")}` : null;\n }\n composeJsonSchema(e) {\n const {\n fn: t\n } = this.props,\n r = e.get(\"oneOf\")?.get(0)?.toJS(),\n n = e.get(\"anyOf\")?.get(0)?.toJS();\n return (0, Qe.fromJS)(t.mergeJsonSchema(e.toJS(), r ?? n ?? {}));\n }\n render() {\n let {\n param: e,\n rawParam: t,\n getComponent: r,\n getConfigs: n,\n isExecute: a,\n fn: o,\n onChangeConsumes: s,\n specSelectors: l,\n pathMethod: i,\n specPath: c,\n oas3Selectors: u\n } = this.props,\n d = l.isOAS3();\n const {\n showExtensions: p,\n showCommonExtensions: m\n } = n();\n if (e || (e = t), !t) return null;\n const f = r(\"JsonSchemaForm\"),\n h = r(\"ParamBody\");\n let g = e.get(\"in\"),\n y = \"body\" !== g ? null : Xe.default.createElement(h, {\n getComponent: r,\n getConfigs: n,\n fn: o,\n param: e,\n consumes: l.consumesOptionsFor(i),\n consumesValue: l.contentTypeValues(i).get(\"requestContentType\"),\n onChange: this.onChangeWrapper,\n onChangeConsumes: s,\n isExecute: a,\n specSelectors: l,\n pathMethod: i\n });\n const S = r(\"modelExample\"),\n _ = r(\"Markdown\", !0),\n v = r(\"ParameterExt\"),\n b = r(\"ParameterIncludeEmpty\"),\n w = r(\"ExamplesSelectValueRetainer\"),\n C = r(\"Example\");\n let {\n schema: x\n } = getParameterSchema(e, {\n isOAS3: d\n }),\n O = l.parameterWithMetaByIdentity(i, t) || (0, Qe.Map)();\n d && (x = this.composeJsonSchema(x));\n let k,\n N,\n A,\n I,\n R = x ? x.get(\"format\") : null,\n T = x ? x.get(\"type\") : null,\n B = x ? x.getIn([\"items\", \"type\"]) : null,\n j = \"formData\" === g,\n P = \"FormData\" in dt,\n M = e.get(\"required\"),\n q = O ? O.get(\"value\") : \"\",\n L = m ? getCommonExtensions(x) : null,\n D = p ? getExtensions(e) : null,\n U = !1;\n return void 0 !== e && x && (k = x.get(\"items\")), void 0 !== k ? (N = k.get(\"enum\"), A = k.get(\"default\")) : x && (N = x.get(\"enum\")), N && N.size && N.size > 0 && (U = !0), void 0 !== e && (x && (A = x.get(\"default\")), void 0 === A && (A = e.get(\"default\")), I = e.get(\"example\"), void 0 === I && (I = e.get(\"x-example\"))), Xe.default.createElement(\"tr\", {\n \"data-param-name\": e.get(\"name\"),\n \"data-param-in\": e.get(\"in\")\n }, Xe.default.createElement(\"td\", {\n className: \"parameters-col_name\"\n }, Xe.default.createElement(\"div\", {\n className: M ? \"parameter__name required\" : \"parameter__name\"\n }, e.get(\"name\"), M ? Xe.default.createElement(\"span\", null, \" *\") : null), Xe.default.createElement(\"div\", {\n className: \"parameter__type\"\n }, T, B && `[${B}]`, R && Xe.default.createElement(\"span\", {\n className: \"prop-format\"\n }, \"($\", R, \")\")), Xe.default.createElement(\"div\", {\n className: \"parameter__deprecated\"\n }, d && e.get(\"deprecated\") ? \"deprecated\" : null), Xe.default.createElement(\"div\", {\n className: \"parameter__in\"\n }, \"(\", e.get(\"in\"), \")\")), Xe.default.createElement(\"td\", {\n className: \"parameters-col_description\"\n }, e.get(\"description\") ? Xe.default.createElement(_, {\n source: e.get(\"description\")\n }) : null, !y && a || !U ? null : Xe.default.createElement(_, {\n className: \"parameter__enum\",\n source: \"Available values : \" + N.map(function (e) {\n return e;\n }).toArray().map(String).join(\", \")\n }), !y && a || void 0 === A ? null : Xe.default.createElement(_, {\n className: \"parameter__default\",\n source: \"Default value : \" + A\n }), !y && a || void 0 === I ? null : Xe.default.createElement(_, {\n source: \"Example : \" + I\n }), j && !P && Xe.default.createElement(\"div\", null, \"Error: your browser does not support FormData\"), d && e.get(\"examples\") ? Xe.default.createElement(\"section\", {\n className: \"parameter-controls\"\n }, Xe.default.createElement(w, {\n examples: e.get(\"examples\"),\n onSelect: this._onExampleSelect,\n updateValue: this.onChangeWrapper,\n getComponent: r,\n defaultToFirstExample: !0,\n currentKey: u.activeExamplesMember(...i, \"parameters\", this.getParamKey()),\n currentUserInputValue: q\n })) : null, y ? null : Xe.default.createElement(f, {\n fn: o,\n getComponent: r,\n value: q,\n required: M,\n disabled: !a,\n description: e.get(\"name\"),\n onChange: this.onChangeWrapper,\n errors: O.get(\"errors\"),\n schema: x\n }), y && x ? Xe.default.createElement(S, {\n getComponent: r,\n specPath: c.push(\"schema\"),\n getConfigs: n,\n isExecute: a,\n specSelectors: l,\n schema: x,\n example: y,\n includeWriteOnly: !0\n }) : null, !y && a && e.get(\"allowEmptyValue\") ? Xe.default.createElement(b, {\n onChange: this.onChangeIncludeEmpty,\n isIncluded: l.parameterInclusionSettingFor(i, e.get(\"name\"), e.get(\"in\")),\n isDisabled: !isEmptyValue(q)\n }) : null, d && e.get(\"examples\") ? Xe.default.createElement(C, {\n example: e.getIn([\"examples\", u.activeExamplesMember(...i, \"parameters\", this.getParamKey())]),\n getComponent: r,\n getConfigs: n\n }) : null, m && L.size ? L.entrySeq().map(([e, t]) => Xe.default.createElement(v, {\n key: `${e}-${t}`,\n xKey: e,\n xVal: t\n })) : null, p && D.size ? D.entrySeq().map(([e, t]) => Xe.default.createElement(v, {\n key: `${e}-${t}`,\n xKey: e,\n xVal: t\n })) : null));\n }\n}\nclass Execute extends Xe.Component {\n handleValidateParameters = () => {\n let {\n specSelectors: e,\n specActions: t,\n path: r,\n method: n\n } = this.props;\n return t.validateParams([r, n]), e.validateBeforeExecute([r, n]);\n };\n handleValidateRequestBody = () => {\n let {\n path: e,\n method: t,\n specSelectors: r,\n oas3Selectors: n,\n oas3Actions: a\n } = this.props,\n o = {\n missingBodyValue: !1,\n missingRequiredKeys: []\n };\n a.clearRequestBodyValidateError({\n path: e,\n method: t\n });\n let s = r.getOAS3RequiredRequestBodyContentType([e, t]),\n l = n.requestBodyValue(e, t),\n i = n.validateBeforeExecute([e, t]),\n c = n.requestContentType(e, t);\n if (!i) return o.missingBodyValue = !0, a.setRequestBodyValidateError({\n path: e,\n method: t,\n validationErrors: o\n }), !1;\n if (!s) return !0;\n let u = n.validateShallowRequired({\n oas3RequiredRequestBodyContentType: s,\n oas3RequestContentType: c,\n oas3RequestBodyValue: l\n });\n return !u || u.length < 1 || (u.forEach(e => {\n o.missingRequiredKeys.push(e);\n }), a.setRequestBodyValidateError({\n path: e,\n method: t,\n validationErrors: o\n }), !1);\n };\n handleValidationResultPass = () => {\n let {\n specActions: e,\n operation: t,\n path: r,\n method: n\n } = this.props;\n this.props.onExecute && this.props.onExecute(), e.execute({\n operation: t,\n path: r,\n method: n\n });\n };\n handleValidationResultFail = () => {\n let {\n specActions: e,\n path: t,\n method: r\n } = this.props;\n e.clearValidateParams([t, r]), setTimeout(() => {\n e.validateParams([t, r]);\n }, 40);\n };\n handleValidationResult = e => {\n e ? this.handleValidationResultPass() : this.handleValidationResultFail();\n };\n onClick = () => {\n let e = this.handleValidateParameters(),\n t = this.handleValidateRequestBody(),\n r = e && t;\n this.handleValidationResult(r);\n };\n onChangeProducesWrapper = e => this.props.specActions.changeProducesValue([this.props.path, this.props.method], e);\n render() {\n const {\n disabled: e\n } = this.props;\n return Xe.default.createElement(\"button\", {\n className: \"btn execute opblock-control__btn\",\n onClick: this.onClick,\n disabled: e\n }, \"Execute\");\n }\n}\nclass headers_Headers extends Xe.default.Component {\n render() {\n let {\n headers: e,\n getComponent: t\n } = this.props;\n const r = t(\"Property\"),\n n = t(\"Markdown\", !0);\n return e && e.size ? Xe.default.createElement(\"div\", {\n className: \"headers-wrapper\"\n }, Xe.default.createElement(\"h4\", {\n className: \"headers__title\"\n }, \"Headers:\"), Xe.default.createElement(\"table\", {\n className: \"headers\"\n }, Xe.default.createElement(\"thead\", null, Xe.default.createElement(\"tr\", {\n className: \"header-row\"\n }, Xe.default.createElement(\"th\", {\n className: \"header-col\"\n }, \"Name\"), Xe.default.createElement(\"th\", {\n className: \"header-col\"\n }, \"Description\"), Xe.default.createElement(\"th\", {\n className: \"header-col\"\n }, \"Type\"))), Xe.default.createElement(\"tbody\", null, e.entrySeq().map(([e, t]) => {\n if (!Qe.default.Map.isMap(t)) return null;\n const a = t.get(\"description\"),\n o = t.getIn([\"schema\"]) ? t.getIn([\"schema\", \"type\"]) : t.getIn([\"type\"]),\n s = t.getIn([\"schema\", \"example\"]);\n return Xe.default.createElement(\"tr\", {\n key: e\n }, Xe.default.createElement(\"td\", {\n className: \"header-col\"\n }, e), Xe.default.createElement(\"td\", {\n className: \"header-col\"\n }, a ? Xe.default.createElement(n, {\n source: a\n }) : null), Xe.default.createElement(\"td\", {\n className: \"header-col\"\n }, o, \" \", s ? Xe.default.createElement(r, {\n propKey: \"Example\",\n propVal: s,\n propClass: \"header-example\"\n }) : null));\n }).toArray()))) : null;\n }\n}\nclass Errors extends Xe.default.Component {\n render() {\n let {\n editorActions: e,\n errSelectors: t,\n layoutSelectors: r,\n layoutActions: n,\n getComponent: a\n } = this.props;\n const o = a(\"Collapse\");\n if (e && e.jumpToLine) var s = e.jumpToLine;\n let l = t.allErrors().filter(e => \"thrown\" === e.get(\"type\") || \"error\" === e.get(\"level\"));\n if (!l || l.count() < 1) return null;\n let i = r.isShown([\"errorPane\"], !0),\n c = l.sortBy(e => e.get(\"line\"));\n return Xe.default.createElement(\"pre\", {\n className: \"errors-wrapper\"\n }, Xe.default.createElement(\"hgroup\", {\n className: \"error\"\n }, Xe.default.createElement(\"h4\", {\n className: \"errors__title\"\n }, \"Errors\"), Xe.default.createElement(\"button\", {\n className: \"btn errors__clear-btn\",\n onClick: () => n.show([\"errorPane\"], !i)\n }, i ? \"Hide\" : \"Show\")), Xe.default.createElement(o, {\n isOpened: i,\n animated: !0\n }, Xe.default.createElement(\"div\", {\n className: \"errors\"\n }, c.map((e, t) => {\n let r = e.get(\"type\");\n return \"thrown\" === r || \"auth\" === r ? Xe.default.createElement(ThrownErrorItem, {\n key: t,\n error: e.get(\"error\") || e,\n jumpToLine: s\n }) : \"spec\" === r ? Xe.default.createElement(SpecErrorItem, {\n key: t,\n error: e,\n jumpToLine: s\n }) : void 0;\n }))));\n }\n}\nconst ThrownErrorItem = ({\n error: e,\n jumpToLine: t\n }) => {\n if (!e) return null;\n let r = e.get(\"line\");\n return Xe.default.createElement(\"div\", {\n className: \"error-wrapper\"\n }, e ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", null, e.get(\"source\") && e.get(\"level\") ? toTitleCase(e.get(\"source\")) + \" \" + e.get(\"level\") : \"\", e.get(\"path\") ? Xe.default.createElement(\"small\", null, \" at \", e.get(\"path\")) : null), Xe.default.createElement(\"span\", {\n className: \"message thrown\"\n }, e.get(\"message\")), Xe.default.createElement(\"div\", {\n className: \"error-line\"\n }, r && t ? Xe.default.createElement(\"a\", {\n onClick: t.bind(null, r)\n }, \"Jump to line \", r) : null)) : null);\n },\n SpecErrorItem = ({\n error: e,\n jumpToLine: t = null\n }) => {\n let r = null;\n return e.get(\"path\") ? r = Qe.List.isList(e.get(\"path\")) ? Xe.default.createElement(\"small\", null, \"at \", e.get(\"path\").join(\".\")) : Xe.default.createElement(\"small\", null, \"at \", e.get(\"path\")) : e.get(\"line\") && !t && (r = Xe.default.createElement(\"small\", null, \"on line \", e.get(\"line\"))), Xe.default.createElement(\"div\", {\n className: \"error-wrapper\"\n }, e ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", null, toTitleCase(e.get(\"source\")) + \" \" + e.get(\"level\"), \" \", r), Xe.default.createElement(\"span\", {\n className: \"message\"\n }, e.get(\"message\")), Xe.default.createElement(\"div\", {\n className: \"error-line\"\n }, t ? Xe.default.createElement(\"a\", {\n onClick: t.bind(null, e.get(\"line\"))\n }, \"Jump to line \", e.get(\"line\")) : null)) : null);\n };\nfunction toTitleCase(e) {\n return (e || \"\").split(\" \").map(e => e[0].toUpperCase() + e.slice(1)).join(\" \");\n}\nconst content_type_noop = () => {};\nclass ContentType extends Xe.default.Component {\n static defaultProps = {\n onChange: content_type_noop,\n value: null,\n contentTypes: (0, Qe.fromJS)([\"application/json\"])\n };\n componentDidMount() {\n this.props.contentTypes && this.props.onChange(this.props.contentTypes.first());\n }\n UNSAFE_componentWillReceiveProps(e) {\n e.contentTypes && e.contentTypes.size && (e.contentTypes.includes(e.value) || e.onChange(e.contentTypes.first()));\n }\n onChangeWrapper = e => this.props.onChange(e.target.value);\n render() {\n let {\n ariaControls: e,\n ariaLabel: t,\n className: r,\n contentTypes: n,\n controlId: a,\n value: o\n } = this.props;\n return n && n.size ? Xe.default.createElement(\"div\", {\n className: \"content-type-wrapper \" + (r || \"\")\n }, Xe.default.createElement(\"select\", {\n \"aria-controls\": e,\n \"aria-label\": t,\n className: \"content-type\",\n id: a,\n onChange: this.onChangeWrapper,\n value: o || \"\"\n }, n.map(e => Xe.default.createElement(\"option\", {\n key: e,\n value: e\n }, e)).toArray())) : null;\n }\n}\nfunction xclass(...e) {\n return e.filter(e => !!e).join(\" \").trim();\n}\nclass Container extends Xe.default.Component {\n render() {\n let {\n fullscreen: e,\n full: t,\n ...r\n } = this.props;\n if (e) return Xe.default.createElement(\"section\", r);\n let n = \"swagger-container\" + (t ? \"-full\" : \"\");\n return Xe.default.createElement(\"section\", (0, cr.default)({}, r, {\n className: xclass(r.className, n)\n }));\n }\n}\nconst Ra = {\n mobile: \"\",\n tablet: \"-tablet\",\n desktop: \"-desktop\",\n large: \"-hd\"\n};\nclass Col extends Xe.default.Component {\n render() {\n const {\n hide: e,\n keepContents: t,\n mobile: r,\n tablet: n,\n desktop: a,\n large: o,\n ...s\n } = this.props;\n if (e && !t) return Xe.default.createElement(\"span\", null);\n let l = [];\n for (let e in Ra) {\n if (!Object.prototype.hasOwnProperty.call(Ra, e)) continue;\n let t = Ra[e];\n if (e in this.props) {\n let r = this.props[e];\n if (r < 1) {\n l.push(\"none\" + t);\n continue;\n }\n l.push(\"block\" + t), l.push(\"col-\" + r + t);\n }\n }\n e && l.push(\"hidden\");\n let i = xclass(s.className, ...l);\n return Xe.default.createElement(\"section\", (0, cr.default)({}, s, {\n className: i\n }));\n }\n}\nclass Row extends Xe.default.Component {\n render() {\n return Xe.default.createElement(\"div\", (0, cr.default)({}, this.props, {\n className: xclass(this.props.className, \"wrapper\")\n }));\n }\n}\nlet Button = /*#__PURE__*/(() => {\n class Button extends Xe.default.Component {\n static defaultProps = {\n className: \"\"\n };\n render() {\n return Xe.default.createElement(\"button\", (0, cr.default)({}, this.props, {\n className: xclass(this.props.className, \"button\")\n }));\n }\n }\n return Button;\n})();\nconst TextArea = e => Xe.default.createElement(\"textarea\", e),\n Input = e => Xe.default.createElement(\"input\", e);\nlet Select = /*#__PURE__*/(() => {\n class Select extends Xe.default.Component {\n static defaultProps = {\n multiple: !1,\n allowEmptyValue: !0\n };\n constructor(e, t) {\n let r;\n super(e, t), r = e.value ? e.value : e.multiple ? [\"\"] : \"\", this.state = {\n value: r\n };\n }\n onChange = e => {\n let t,\n {\n onChange: r,\n multiple: n\n } = this.props,\n a = [].slice.call(e.target.options);\n t = n ? a.filter(function (e) {\n return e.selected;\n }).map(function (e) {\n return e.value;\n }) : e.target.value, this.setState({\n value: t\n }), r && r(t);\n };\n UNSAFE_componentWillReceiveProps(e) {\n e.value !== this.props.value && this.setState({\n value: e.value\n });\n }\n render() {\n let {\n allowedValues: e,\n multiple: t,\n allowEmptyValue: r,\n disabled: n\n } = this.props,\n a = this.state.value?.toJS?.() || this.state.value;\n return Xe.default.createElement(\"select\", {\n className: this.props.className,\n multiple: t,\n value: a,\n onChange: this.onChange,\n disabled: n\n }, r ? Xe.default.createElement(\"option\", {\n value: \"\"\n }, \"--\") : null, e.map(function (e, t) {\n return Xe.default.createElement(\"option\", {\n key: t,\n value: String(e)\n }, String(e));\n }));\n }\n }\n return Select;\n})();\nclass Link extends Xe.default.Component {\n render() {\n return Xe.default.createElement(\"a\", (0, cr.default)({}, this.props, {\n rel: \"noopener noreferrer\",\n className: xclass(this.props.className, \"link\")\n }));\n }\n}\nconst NoMargin = ({\n children: e\n}) => Xe.default.createElement(\"div\", {\n className: \"no-margin\"\n}, \" \", e, \" \");\nlet Collapse = /*#__PURE__*/(() => {\n class Collapse extends Xe.default.Component {\n static defaultProps = {\n isOpened: !1,\n animated: !1\n };\n renderNotAnimated() {\n return this.props.isOpened ? Xe.default.createElement(NoMargin, null, this.props.children) : Xe.default.createElement(\"noscript\", null);\n }\n render() {\n let {\n animated: e,\n isOpened: t,\n children: r\n } = this.props;\n return e ? (r = t ? r : null, Xe.default.createElement(NoMargin, null, r)) : this.renderNotAnimated();\n }\n }\n return Collapse;\n})();\nclass Overview extends Xe.default.Component {\n constructor(...e) {\n super(...e), this.setTagShown = this._setTagShown.bind(this);\n }\n _setTagShown(e, t) {\n this.props.layoutActions.show(e, t);\n }\n showOp(e, t) {\n let {\n layoutActions: r\n } = this.props;\n r.show(e, t);\n }\n render() {\n let {\n specSelectors: e,\n layoutSelectors: t,\n layoutActions: r,\n getComponent: n\n } = this.props,\n a = e.taggedOperations();\n const o = n(\"Collapse\");\n return Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", {\n className: \"overview-title\"\n }, \"Overview\"), a.map((e, n) => {\n let a = e.get(\"operations\"),\n s = [\"overview-tags\", n],\n l = t.isShown(s, !0);\n return Xe.default.createElement(\"div\", {\n key: \"overview-\" + n\n }, Xe.default.createElement(\"h4\", {\n onClick: () => r.show(s, !l),\n className: \"link overview-tag\"\n }, \" \", l ? \"-\" : \"+\", n), Xe.default.createElement(o, {\n isOpened: l,\n animated: !0\n }, a.map(e => {\n let {\n path: n,\n method: a,\n id: o\n } = e.toObject(),\n s = \"operations\",\n l = o,\n i = t.isShown([s, l]);\n return Xe.default.createElement(OperationLink, {\n key: o,\n path: n,\n method: a,\n id: n + \"-\" + a,\n shown: i,\n showOpId: l,\n showOpIdPrefix: s,\n href: `#operation-${l}`,\n onClick: r.show\n });\n }).toArray()));\n }).toArray(), a.size < 1 && Xe.default.createElement(\"h3\", null, \" No operations defined in spec! \"));\n }\n}\nclass OperationLink extends Xe.default.Component {\n constructor(e) {\n super(e), this.onClick = this._onClick.bind(this);\n }\n _onClick() {\n let {\n showOpId: e,\n showOpIdPrefix: t,\n onClick: r,\n shown: n\n } = this.props;\n r([t, e], !n);\n }\n render() {\n let {\n id: e,\n method: t,\n shown: r,\n href: n\n } = this.props;\n return Xe.default.createElement(Link, {\n href: n,\n onClick: this.onClick,\n className: \"block opblock-link \" + (r ? \"shown\" : \"\")\n }, Xe.default.createElement(\"div\", null, Xe.default.createElement(\"small\", {\n className: `bold-label-${t}`\n }, t.toUpperCase()), Xe.default.createElement(\"span\", {\n className: \"bold-label\"\n }, e)));\n }\n}\nclass InitializedInput extends Xe.default.Component {\n componentDidMount() {\n this.props.initialValue && (this.inputRef.value = this.props.initialValue);\n }\n render() {\n const {\n value: e,\n defaultValue: t,\n initialValue: r,\n ...n\n } = this.props;\n return Xe.default.createElement(\"input\", (0, cr.default)({}, n, {\n ref: e => this.inputRef = e\n }));\n }\n}\nclass InfoBasePath extends Xe.default.Component {\n render() {\n const {\n host: e,\n basePath: t\n } = this.props;\n return Xe.default.createElement(\"pre\", {\n className: \"base-url\"\n }, \"[ Base URL: \", e, t, \" ]\");\n }\n}\nclass InfoUrl extends Xe.default.PureComponent {\n render() {\n const {\n url: e,\n getComponent: t\n } = this.props,\n r = t(\"Link\");\n return Xe.default.createElement(r, {\n target: \"_blank\",\n href: sanitizeUrl(e)\n }, Xe.default.createElement(\"span\", {\n className: \"url\"\n }, \" \", e));\n }\n}\nclass Info extends Xe.default.Component {\n render() {\n const {\n info: e,\n url: t,\n host: r,\n basePath: n,\n getComponent: a,\n externalDocs: o,\n selectedServer: s,\n url: l\n } = this.props,\n i = e.get(\"version\"),\n c = e.get(\"description\"),\n u = e.get(\"title\"),\n d = safeBuildUrl(e.get(\"termsOfService\"), l, {\n selectedServer: s\n }),\n p = e.get(\"contact\"),\n m = e.get(\"license\"),\n f = safeBuildUrl(o && o.get(\"url\"), l, {\n selectedServer: s\n }),\n h = o && o.get(\"description\"),\n g = a(\"Markdown\", !0),\n y = a(\"Link\"),\n S = a(\"VersionStamp\"),\n _ = a(\"OpenAPIVersion\"),\n v = a(\"InfoUrl\"),\n b = a(\"InfoBasePath\"),\n w = a(\"License\"),\n C = a(\"Contact\");\n return Xe.default.createElement(\"div\", {\n className: \"info\"\n }, Xe.default.createElement(\"hgroup\", {\n className: \"main\"\n }, Xe.default.createElement(\"h2\", {\n className: \"title\"\n }, u, Xe.default.createElement(\"span\", null, i && Xe.default.createElement(S, {\n version: i\n }), Xe.default.createElement(_, {\n oasVersion: \"2.0\"\n }))), r || n ? Xe.default.createElement(b, {\n host: r,\n basePath: n\n }) : null, t && Xe.default.createElement(v, {\n getComponent: a,\n url: t\n })), Xe.default.createElement(\"div\", {\n className: \"description\"\n }, Xe.default.createElement(g, {\n source: c\n })), d && Xe.default.createElement(\"div\", {\n className: \"info__tos\"\n }, Xe.default.createElement(y, {\n target: \"_blank\",\n href: sanitizeUrl(d)\n }, \"Terms of service\")), p?.size > 0 && Xe.default.createElement(C, {\n getComponent: a,\n data: p,\n selectedServer: s,\n url: t\n }), m?.size > 0 && Xe.default.createElement(w, {\n getComponent: a,\n license: m,\n selectedServer: s,\n url: t\n }), f ? Xe.default.createElement(y, {\n className: \"info__extdocs\",\n target: \"_blank\",\n href: sanitizeUrl(f)\n }, h || f) : null);\n }\n}\nvar Ta = Info;\nclass InfoContainer extends Xe.default.Component {\n render() {\n const {\n specSelectors: e,\n getComponent: t,\n oas3Selectors: r\n } = this.props,\n n = e.info(),\n a = e.url(),\n o = e.basePath(),\n s = e.host(),\n l = e.externalDocs(),\n i = r.selectedServer(),\n c = t(\"info\");\n return Xe.default.createElement(\"div\", null, n && n.count() ? Xe.default.createElement(c, {\n info: n,\n url: a,\n host: s,\n basePath: o,\n externalDocs: l,\n getComponent: t,\n selectedServer: i\n }) : null);\n }\n}\nclass Contact extends Xe.default.Component {\n render() {\n const {\n data: e,\n getComponent: t,\n selectedServer: r,\n url: n\n } = this.props,\n a = e.get(\"name\", \"the developer\"),\n o = safeBuildUrl(e.get(\"url\"), n, {\n selectedServer: r\n }),\n s = e.get(\"email\"),\n l = t(\"Link\");\n return Xe.default.createElement(\"div\", {\n className: \"info__contact\"\n }, o && Xe.default.createElement(\"div\", null, Xe.default.createElement(l, {\n href: sanitizeUrl(o),\n target: \"_blank\"\n }, a, \" - Website\")), s && Xe.default.createElement(l, {\n href: sanitizeUrl(`mailto:${s}`)\n }, o ? `Send email to ${a}` : `Contact ${a}`));\n }\n}\nvar Ba = Contact;\nclass License extends Xe.default.Component {\n render() {\n const {\n license: e,\n getComponent: t,\n selectedServer: r,\n url: n\n } = this.props,\n a = e.get(\"name\", \"License\"),\n o = safeBuildUrl(e.get(\"url\"), n, {\n selectedServer: r\n }),\n s = t(\"Link\");\n return Xe.default.createElement(\"div\", {\n className: \"info__license\"\n }, o ? Xe.default.createElement(\"div\", {\n className: \"info__license__url\"\n }, Xe.default.createElement(s, {\n target: \"_blank\",\n href: sanitizeUrl(o)\n }, a)) : Xe.default.createElement(\"span\", null, a));\n }\n}\nvar ja = License;\nclass JumpToPath extends Xe.default.Component {\n render() {\n return null;\n }\n}\nclass CopyToClipboardBtn extends Xe.default.Component {\n render() {\n let {\n getComponent: e\n } = this.props;\n const t = e(\"CopyIcon\");\n return Xe.default.createElement(\"div\", {\n className: \"view-line-link copy-to-clipboard\",\n title: \"Copy to clipboard\"\n }, Xe.default.createElement(vr.CopyToClipboard, {\n text: this.props.textToCopy\n }, Xe.default.createElement(t, null)));\n }\n}\nclass Footer extends Xe.default.Component {\n render() {\n return Xe.default.createElement(\"div\", {\n className: \"footer\"\n });\n }\n}\nclass FilterContainer extends Xe.default.Component {\n onFilterChange = e => {\n const {\n target: {\n value: t\n }\n } = e;\n this.props.layoutActions.updateFilter(t);\n };\n render() {\n const {\n specSelectors: e,\n layoutSelectors: t,\n getComponent: r\n } = this.props,\n n = r(\"Col\"),\n a = \"loading\" === e.loadingStatus(),\n o = \"failed\" === e.loadingStatus(),\n s = t.currentFilter(),\n l = [\"operation-filter-input\"];\n return o && l.push(\"failed\"), a && l.push(\"loading\"), Xe.default.createElement(\"div\", null, !1 === s ? null : Xe.default.createElement(\"div\", {\n className: \"filter-container\"\n }, Xe.default.createElement(n, {\n className: \"filter wrapper\",\n mobile: 12\n }, Xe.default.createElement(\"input\", {\n className: l.join(\" \"),\n placeholder: \"Filter by tag\",\n type: \"text\",\n onChange: this.onFilterChange,\n value: \"string\" == typeof s ? s : \"\",\n disabled: a\n }))));\n }\n}\nconst Pa = Function.prototype;\nclass ParamBody extends Xe.PureComponent {\n static defaultProp = {\n consumes: (0, Qe.fromJS)([\"application/json\"]),\n param: (0, Qe.fromJS)({}),\n onChange: Pa,\n onChangeConsumes: Pa\n };\n constructor(e, t) {\n super(e, t), this.state = {\n isEditBox: !1,\n value: \"\"\n };\n }\n componentDidMount() {\n this.updateValues.call(this, this.props);\n }\n UNSAFE_componentWillReceiveProps(e) {\n this.updateValues.call(this, e);\n }\n updateValues = e => {\n let {\n param: t,\n isExecute: r,\n consumesValue: n = \"\"\n } = e,\n a = /xml/i.test(n),\n o = /json/i.test(n),\n s = a ? t.get(\"value_xml\") : t.get(\"value\");\n if (void 0 !== s) {\n let e = !s && o ? \"{}\" : s;\n this.setState({\n value: e\n }), this.onChange(e, {\n isXml: a,\n isEditBox: r\n });\n } else a ? this.onChange(this.sample(\"xml\"), {\n isXml: a,\n isEditBox: r\n }) : this.onChange(this.sample(), {\n isEditBox: r\n });\n };\n sample = e => {\n let {\n param: t,\n fn: r\n } = this.props,\n n = r.inferSchema(t.toJS());\n return r.getSampleSchema(n, e, {\n includeWriteOnly: !0\n });\n };\n onChange = (e, {\n isEditBox: t,\n isXml: r\n }) => {\n this.setState({\n value: e,\n isEditBox: t\n }), this._onChange(e, r);\n };\n _onChange = (e, t) => {\n (this.props.onChange || Pa)(e, t);\n };\n handleOnChange = e => {\n const {\n consumesValue: t\n } = this.props,\n r = /xml/i.test(t),\n n = e.target.value;\n this.onChange(n, {\n isXml: r,\n isEditBox: this.state.isEditBox\n });\n };\n toggleIsEditBox = () => this.setState(e => ({\n isEditBox: !e.isEditBox\n }));\n render() {\n let {\n onChangeConsumes: e,\n param: t,\n isExecute: r,\n specSelectors: n,\n pathMethod: a,\n getComponent: o\n } = this.props;\n const s = o(\"Button\"),\n l = o(\"TextArea\"),\n i = o(\"HighlightCode\", !0),\n c = o(\"contentType\");\n let u = (n ? n.parameterWithMetaByIdentity(a, t) : t).get(\"errors\", (0, Qe.List)()),\n d = n.contentTypeValues(a).get(\"requestContentType\"),\n p = this.props.consumes && this.props.consumes.size ? this.props.consumes : ParamBody.defaultProp.consumes,\n {\n value: m,\n isEditBox: f\n } = this.state,\n h = null;\n getKnownSyntaxHighlighterLanguage(m) && (h = \"json\");\n const g = `${createHtmlReadyId(`${a[1]}${a[0]}_parameters`)}_select`;\n return Xe.default.createElement(\"div\", {\n className: \"body-param\",\n \"data-param-name\": t.get(\"name\"),\n \"data-param-in\": t.get(\"in\")\n }, f && r ? Xe.default.createElement(l, {\n className: \"body-param__text\" + (u.count() ? \" invalid\" : \"\"),\n value: m,\n onChange: this.handleOnChange\n }) : m && Xe.default.createElement(i, {\n className: \"body-param__example\",\n language: h\n }, m), Xe.default.createElement(\"div\", {\n className: \"body-param-options\"\n }, r ? Xe.default.createElement(\"div\", {\n className: \"body-param-edit\"\n }, Xe.default.createElement(s, {\n className: f ? \"btn cancel body-param__example-edit\" : \"btn edit body-param__example-edit\",\n onClick: this.toggleIsEditBox\n }, f ? \"Cancel\" : \"Edit\")) : null, Xe.default.createElement(\"label\", {\n htmlFor: g\n }, Xe.default.createElement(\"span\", null, \"Parameter content type\"), Xe.default.createElement(c, {\n value: d,\n contentTypes: p,\n onChange: e,\n className: \"body-param-content-type\",\n ariaLabel: \"Parameter content type\",\n controlId: g\n }))));\n }\n}\nclass Curl extends Xe.default.Component {\n render() {\n const {\n request: e,\n getComponent: t\n } = this.props,\n r = requestSnippetGenerator_curl_bash(e),\n n = t(\"SyntaxHighlighter\", !0);\n return Xe.default.createElement(\"div\", {\n className: \"curl-command\"\n }, Xe.default.createElement(\"h4\", null, \"Curl\"), Xe.default.createElement(\"div\", {\n className: \"copy-to-clipboard\"\n }, Xe.default.createElement(vr.CopyToClipboard, {\n text: r\n }, Xe.default.createElement(\"button\", null))), Xe.default.createElement(\"div\", null, Xe.default.createElement(n, {\n language: \"bash\",\n className: \"curl microlight\",\n renderPlainText: ({\n children: e,\n PlainTextViewer: t\n }) => Xe.default.createElement(t, {\n className: \"curl\"\n }, e)\n }, r)));\n }\n}\nvar property = ({\n propKey: e,\n propVal: t,\n propClass: r\n}) => Xe.default.createElement(\"span\", {\n className: r\n}, Xe.default.createElement(\"br\", null), e, \": \", String(t));\nclass TryItOutButton extends Xe.default.Component {\n static defaultProps = {\n onTryoutClick: Function.prototype,\n onCancelClick: Function.prototype,\n onResetClick: Function.prototype,\n enabled: !1,\n hasUserEditedBody: !1,\n isOAS3: !1\n };\n render() {\n const {\n onTryoutClick: e,\n onCancelClick: t,\n onResetClick: r,\n enabled: n,\n hasUserEditedBody: a,\n isOAS3: o\n } = this.props,\n s = o && a;\n return Xe.default.createElement(\"div\", {\n className: s ? \"try-out btn-group\" : \"try-out\"\n }, n ? Xe.default.createElement(\"button\", {\n className: \"btn try-out__btn cancel\",\n onClick: t\n }, \"Cancel\") : Xe.default.createElement(\"button\", {\n className: \"btn try-out__btn\",\n onClick: e\n }, \"Try it out \"), s && Xe.default.createElement(\"button\", {\n className: \"btn try-out__btn reset\",\n onClick: r\n }, \"Reset\"));\n }\n}\nlet VersionPragmaFilter = /*#__PURE__*/(() => {\n class VersionPragmaFilter extends Xe.default.PureComponent {\n static defaultProps = {\n alsoShow: null,\n children: null,\n bypass: !1\n };\n render() {\n const {\n bypass: e,\n isSwagger2: t,\n isOAS3: r,\n alsoShow: n\n } = this.props;\n return e ? Xe.default.createElement(\"div\", null, this.props.children) : t && r ? Xe.default.createElement(\"div\", {\n className: \"version-pragma\"\n }, n, Xe.default.createElement(\"div\", {\n className: \"version-pragma__message version-pragma__message--ambiguous\"\n }, Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h3\", null, \"Unable to render this definition\"), Xe.default.createElement(\"p\", null, Xe.default.createElement(\"code\", null, \"swagger\"), \" and \", Xe.default.createElement(\"code\", null, \"openapi\"), \" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"), Xe.default.createElement(\"p\", null, \"Supported version fields are \", Xe.default.createElement(\"code\", null, \"swagger: \", '\"2.0\"'), \" and those that match \", Xe.default.createElement(\"code\", null, \"openapi: 3.0.n\"), \" (for example, \", Xe.default.createElement(\"code\", null, \"openapi: 3.0.0\"), \").\")))) : t || r ? Xe.default.createElement(\"div\", null, this.props.children) : Xe.default.createElement(\"div\", {\n className: \"version-pragma\"\n }, n, Xe.default.createElement(\"div\", {\n className: \"version-pragma__message version-pragma__message--missing\"\n }, Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h3\", null, \"Unable to render this definition\"), Xe.default.createElement(\"p\", null, \"The provided definition does not specify a valid version field.\"), Xe.default.createElement(\"p\", null, \"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \", Xe.default.createElement(\"code\", null, \"swagger: \", '\"2.0\"'), \" and those that match \", Xe.default.createElement(\"code\", null, \"openapi: 3.0.n\"), \" (for example, \", Xe.default.createElement(\"code\", null, \"openapi: 3.0.0\"), \").\"))));\n }\n }\n return VersionPragmaFilter;\n})();\nvar version_stamp = ({\n version: e\n}) => Xe.default.createElement(\"small\", null, Xe.default.createElement(\"pre\", {\n className: \"version\"\n}, \" \", e, \" \"));\nvar openapi_version = ({\n oasVersion: e\n}) => Xe.default.createElement(\"small\", {\n className: \"version-stamp\"\n}, Xe.default.createElement(\"pre\", {\n className: \"version\"\n}, \"OAS \", e));\nvar deep_link = ({\n enabled: e,\n path: t,\n text: r\n}) => Xe.default.createElement(\"a\", {\n className: \"nostyle\",\n onClick: e ? e => e.preventDefault() : null,\n href: e ? `#/${t}` : null\n}, Xe.default.createElement(\"span\", null, r));\nvar svg_assets = () => Xe.default.createElement(\"div\", null, Xe.default.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n className: \"svg-assets\"\n }, Xe.default.createElement(\"defs\", null, Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 20 20\",\n id: \"unlocked\"\n }, Xe.default.createElement(\"path\", {\n d: \"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"\n })), Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 20 20\",\n id: \"locked\"\n }, Xe.default.createElement(\"path\", {\n d: \"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"\n })), Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 20 20\",\n id: \"close\"\n }, Xe.default.createElement(\"path\", {\n d: \"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"\n })), Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 20 20\",\n id: \"large-arrow\"\n }, Xe.default.createElement(\"path\", {\n d: \"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"\n })), Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 20 20\",\n id: \"large-arrow-down\"\n }, Xe.default.createElement(\"path\", {\n d: \"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"\n })), Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 20 20\",\n id: \"large-arrow-up\"\n }, Xe.default.createElement(\"path\", {\n d: \"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"\n })), Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 24 24\",\n id: \"jump-to\"\n }, Xe.default.createElement(\"path\", {\n d: \"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"\n })), Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 24 24\",\n id: \"expand\"\n }, Xe.default.createElement(\"path\", {\n d: \"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"\n })), Xe.default.createElement(\"symbol\", {\n viewBox: \"0 0 15 16\",\n id: \"copy\"\n }, Xe.default.createElement(\"g\", {\n transform: \"translate(2, -1)\"\n }, Xe.default.createElement(\"path\", {\n fill: \"#ffffff\",\n fillRule: \"evenodd\",\n d: \"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"\n })))))),\n Ma = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n Remarkable: function () {\n return ye.Remarkable;\n }\n }),\n qa = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n linkify: function () {\n return Ee.linkify;\n }\n }),\n La = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return Se.default;\n }\n });\nLa.default.addHook && La.default.addHook(\"beforeSanitizeElements\", function (e) {\n return e.href && e.setAttribute(\"rel\", \"noopener noreferrer\"), e;\n});\nvar Da = function Markdown({\n source: e,\n className: t = \"\",\n getConfigs: r = () => ({\n useUnsafeMarkdown: !1\n })\n}) {\n if (\"string\" != typeof e) return null;\n const n = new Ma.Remarkable({\n html: !0,\n typographer: !0,\n breaks: !0,\n linkTarget: \"_blank\"\n }).use(qa.linkify);\n n.core.ruler.disable([\"replacements\", \"smartquotes\"]);\n const {\n useUnsafeMarkdown: a\n } = r(),\n o = n.render(e),\n s = sanitizer(o, {\n useUnsafeMarkdown: a\n });\n return e && o && s ? Xe.default.createElement(\"div\", {\n className: (0, _r.default)(t, \"markdown\"),\n dangerouslySetInnerHTML: {\n __html: s\n }\n }) : null;\n};\nfunction sanitizer(e, {\n useUnsafeMarkdown: t = !1\n} = {}) {\n const r = t,\n n = t ? [] : [\"style\", \"class\"];\n return t && !sanitizer.hasWarnedAboutDeprecation && (console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"), sanitizer.hasWarnedAboutDeprecation = !0), La.default.sanitize(e, {\n ADD_ATTR: [\"target\"],\n FORBID_TAGS: [\"style\", \"form\"],\n ALLOW_DATA_ATTR: r,\n FORBID_ATTR: n\n });\n}\nsanitizer.hasWarnedAboutDeprecation = !1;\nclass BaseLayout extends Xe.default.Component {\n render() {\n const {\n errSelectors: e,\n specSelectors: t,\n getComponent: r\n } = this.props,\n n = r(\"SvgAssets\"),\n a = r(\"InfoContainer\", !0),\n o = r(\"VersionPragmaFilter\"),\n s = r(\"operations\", !0),\n l = r(\"Models\", !0),\n i = r(\"Webhooks\", !0),\n c = r(\"Row\"),\n u = r(\"Col\"),\n d = r(\"errors\", !0),\n p = r(\"ServersContainer\", !0),\n m = r(\"SchemesContainer\", !0),\n f = r(\"AuthorizeBtnContainer\", !0),\n h = r(\"FilterContainer\", !0),\n g = t.isSwagger2(),\n y = t.isOAS3(),\n S = t.isOAS31(),\n _ = !t.specStr(),\n v = t.loadingStatus();\n let b = null;\n if (\"loading\" === v && (b = Xe.default.createElement(\"div\", {\n className: \"info\"\n }, Xe.default.createElement(\"div\", {\n className: \"loading-container\"\n }, Xe.default.createElement(\"div\", {\n className: \"loading\"\n })))), \"failed\" === v && (b = Xe.default.createElement(\"div\", {\n className: \"info\"\n }, Xe.default.createElement(\"div\", {\n className: \"loading-container\"\n }, Xe.default.createElement(\"h4\", {\n className: \"title\"\n }, \"Failed to load API definition.\"), Xe.default.createElement(d, null)))), \"failedConfig\" === v) {\n const t = e.lastError(),\n r = t ? t.get(\"message\") : \"\";\n b = Xe.default.createElement(\"div\", {\n className: \"info failed-config\"\n }, Xe.default.createElement(\"div\", {\n className: \"loading-container\"\n }, Xe.default.createElement(\"h4\", {\n className: \"title\"\n }, \"Failed to load remote configuration.\"), Xe.default.createElement(\"p\", null, r)));\n }\n if (!b && _ && (b = Xe.default.createElement(\"h4\", null, \"No API definition provided.\")), b) return Xe.default.createElement(\"div\", {\n className: \"swagger-ui\"\n }, Xe.default.createElement(\"div\", {\n className: \"loading-container\"\n }, b));\n const w = t.servers(),\n C = t.schemes(),\n x = w && w.size,\n O = C && C.size,\n k = !!t.securityDefinitions();\n return Xe.default.createElement(\"div\", {\n className: \"swagger-ui\"\n }, Xe.default.createElement(n, null), Xe.default.createElement(o, {\n isSwagger2: g,\n isOAS3: y,\n alsoShow: Xe.default.createElement(d, null)\n }, Xe.default.createElement(d, null), Xe.default.createElement(c, {\n className: \"information-container\"\n }, Xe.default.createElement(u, {\n mobile: 12\n }, Xe.default.createElement(a, null))), x || O || k ? Xe.default.createElement(\"div\", {\n className: \"scheme-container\"\n }, Xe.default.createElement(u, {\n className: \"schemes wrapper\",\n mobile: 12\n }, x || O ? Xe.default.createElement(\"div\", {\n className: \"schemes-server-container\"\n }, x ? Xe.default.createElement(p, null) : null, O ? Xe.default.createElement(m, null) : null) : null, k ? Xe.default.createElement(f, null) : null)) : null, Xe.default.createElement(h, null), Xe.default.createElement(c, null, Xe.default.createElement(u, {\n mobile: 12,\n desktop: 12\n }, Xe.default.createElement(s, null))), S && Xe.default.createElement(c, {\n className: \"webhooks-container\"\n }, Xe.default.createElement(u, {\n mobile: 12,\n desktop: 12\n }, Xe.default.createElement(i, null))), Xe.default.createElement(c, null, Xe.default.createElement(u, {\n mobile: 12,\n desktop: 12\n }, Xe.default.createElement(l, null)))));\n }\n}\nvar core_components = () => ({\n components: {\n App: Oa,\n authorizationPopup: AuthorizationPopup,\n authorizeBtn: AuthorizeBtn,\n AuthorizeBtnContainer,\n authorizeOperationBtn: AuthorizeOperationBtn,\n auths: Auths,\n AuthItem: auth_item_Auths,\n authError: AuthError,\n oauth2: Oauth2,\n apiKeyAuth: ApiKeyAuth,\n basicAuth: BasicAuth,\n clear: Clear,\n liveResponse: LiveResponse,\n InitializedInput,\n info: Ta,\n InfoContainer,\n InfoUrl,\n InfoBasePath,\n Contact: Ba,\n License: ja,\n JumpToPath,\n CopyToClipboardBtn,\n onlineValidatorBadge: OnlineValidatorBadge,\n operations: Operations,\n operation: Operation,\n OperationSummary,\n OperationSummaryMethod,\n OperationSummaryPath,\n responses: Responses,\n response: Response,\n ResponseExtension: response_extension,\n responseBody: ResponseBody,\n parameters: Parameters,\n parameterRow: ParameterRow,\n execute: Execute,\n headers: headers_Headers,\n errors: Errors,\n contentType: ContentType,\n overview: Overview,\n footer: Footer,\n FilterContainer,\n ParamBody,\n curl: Curl,\n Property: property,\n TryItOutButton,\n Markdown: Da,\n BaseLayout,\n VersionPragmaFilter,\n VersionStamp: version_stamp,\n OperationExt: operation_extensions,\n OperationExtRow: operation_extension_row,\n ParameterExt: parameter_extension,\n ParameterIncludeEmpty,\n OperationTag,\n OperationContainer,\n OpenAPIVersion: openapi_version,\n DeepLink: deep_link,\n SvgAssets: svg_assets,\n Example,\n ExamplesSelect,\n ExamplesSelectValueRetainer\n }\n});\nvar form_components = () => ({\n components: {\n ...Ke\n }\n});\nvar base = () => [configsPlugin, util, logs, view, view_legacy, plugins_spec, err, icons, plugins_layout, json_schema_5, json_schema_5_samples, core_components, form_components, swagger_client, auth, downloadUrlPlugin, deep_linking, filter, on_complete, plugins_request_snippets, syntax_highlighting, versions, safe_render()];\nconst Ua = (0, Qe.Map)();\nfunction onlyOAS3(e) {\n return (t, r) => (...n) => {\n if (r.getSystem().specSelectors.isOAS3()) {\n const t = e(...n);\n return \"function\" == typeof t ? t(r) : t;\n }\n return t(...n);\n };\n}\nconst $a = onlyOAS3((0, Jr.default)(null)),\n Ja = onlyOAS3((e, t) => e => e.getSystem().specSelectors.findSchema(t)),\n Va = onlyOAS3(() => e => {\n const t = e.getSystem().specSelectors.specJson().getIn([\"components\", \"schemas\"]);\n return Qe.Map.isMap(t) ? t : Ua;\n }),\n Ka = onlyOAS3(() => e => e.getSystem().specSelectors.specJson().hasIn([\"servers\", 0])),\n za = onlyOAS3((0, Dt.createSelector)(Yr, e => e.getIn([\"components\", \"securitySchemes\"]) || null)),\n wrap_selectors_validOperationMethods = (e, t) => (r, ...n) => t.specSelectors.isOAS3() ? t.oas3Selectors.validOperationMethods() : e(...n),\n Fa = $a,\n Wa = $a,\n Ha = $a,\n Ga = $a,\n Xa = $a;\nconst Ya = function wrap_selectors_onlyOAS3(e) {\n return (t, r) => (...n) => {\n if (r.getSystem().specSelectors.isOAS3()) {\n let t = r.getState().getIn([\"spec\", \"resolvedSubtrees\", \"components\", \"securitySchemes\"]);\n return e(r, t, ...n);\n }\n return t(...n);\n };\n}((0, Dt.createSelector)(e => e, ({\n specSelectors: e\n}) => e.securityDefinitions(), (e, t) => {\n let r = (0, Qe.List)();\n return t ? (t.entrySeq().forEach(([e, t]) => {\n const n = t.get(\"type\");\n if (\"oauth2\" === n && t.get(\"flows\").entrySeq().forEach(([n, a]) => {\n let o = (0, Qe.fromJS)({\n flow: n,\n authorizationUrl: a.get(\"authorizationUrl\"),\n tokenUrl: a.get(\"tokenUrl\"),\n scopes: a.get(\"scopes\"),\n type: t.get(\"type\"),\n description: t.get(\"description\")\n });\n r = r.push(new Qe.Map({\n [e]: o.filter(e => void 0 !== e)\n }));\n }), \"http\" !== n && \"apiKey\" !== n || (r = r.push(new Qe.Map({\n [e]: t\n }))), \"openIdConnect\" === n && t.get(\"openIdConnectData\")) {\n let n = t.get(\"openIdConnectData\");\n (n.get(\"grant_types_supported\") || [\"authorization_code\", \"implicit\"]).forEach(a => {\n let o = n.get(\"scopes_supported\") && n.get(\"scopes_supported\").reduce((e, t) => e.set(t, \"\"), new Qe.Map()),\n s = (0, Qe.fromJS)({\n flow: a,\n authorizationUrl: n.get(\"authorization_endpoint\"),\n tokenUrl: n.get(\"token_endpoint\"),\n scopes: o,\n type: \"oauth2\",\n openIdConnectUrl: t.get(\"openIdConnectUrl\")\n });\n r = r.push(new Qe.Map({\n [e]: s.filter(e => void 0 !== e)\n }));\n });\n }\n }), r) : r;\n}));\nfunction OAS3ComponentWrapFactory(e) {\n return (t, r) => n => \"function\" == typeof r.specSelectors?.isOAS3 ? r.specSelectors.isOAS3() ? Xe.default.createElement(e, (0, cr.default)({}, n, r, {\n Ori: t\n })) : Xe.default.createElement(t, n) : (console.warn(\"OAS3 wrapper: couldn't get spec\"), null);\n}\nconst Qa = (0, Qe.Map)(),\n selectors_isSwagger2 = () => e => function isSwagger2(e) {\n const t = e.get(\"swagger\");\n return \"string\" == typeof t && \"2.0\" === t;\n }(e.getSystem().specSelectors.specJson()),\n selectors_isOAS30 = () => e => function isOAS30(e) {\n const t = e.get(\"openapi\");\n return \"string\" == typeof t && /^3\\.0\\.(?:[1-9]\\d*|0)$/.test(t);\n }(e.getSystem().specSelectors.specJson()),\n selectors_isOAS3 = () => e => e.getSystem().specSelectors.isOAS30();\nfunction selectors_onlyOAS3(e) {\n return (t, ...r) => n => {\n if (n.specSelectors.isOAS3()) {\n const a = e(t, ...r);\n return \"function\" == typeof a ? a(n) : a;\n }\n return null;\n };\n}\nconst Za = selectors_onlyOAS3(() => e => e.specSelectors.specJson().get(\"servers\", Qa)),\n findSchema = (e, t) => {\n const r = e.getIn([\"resolvedSubtrees\", \"components\", \"schemas\", t], null),\n n = e.getIn([\"json\", \"components\", \"schemas\", t], null);\n return r || n || null;\n },\n eo = selectors_onlyOAS3((e, {\n callbacks: t,\n specPath: r\n }) => e => {\n const n = e.specSelectors.validOperationMethods();\n return Qe.Map.isMap(t) ? t.reduce((e, t, a) => {\n if (!Qe.Map.isMap(t)) return e;\n const o = t.reduce((e, t, o) => {\n if (!Qe.Map.isMap(t)) return e;\n const s = t.entrySeq().filter(([e]) => n.includes(e)).map(([e, t]) => ({\n operation: (0, Qe.Map)({\n operation: t\n }),\n method: e,\n path: o,\n callbackName: a,\n specPath: r.concat([a, o, e])\n }));\n return e.concat(s);\n }, (0, Qe.List)());\n return e.concat(o);\n }, (0, Qe.List)()).groupBy(e => e.callbackName).map(e => e.toArray()).toObject() : {};\n });\nvar callbacks = ({\n callbacks: e,\n specPath: t,\n specSelectors: r,\n getComponent: n\n}) => {\n const a = r.callbacksOperations({\n callbacks: e,\n specPath: t\n }),\n o = Object.keys(a),\n s = n(\"OperationContainer\", !0);\n return 0 === o.length ? Xe.default.createElement(\"span\", null, \"No callbacks\") : Xe.default.createElement(\"div\", null, o.map(e => Xe.default.createElement(\"div\", {\n key: `${e}`\n }, Xe.default.createElement(\"h2\", null, e), a[e].map(t => Xe.default.createElement(s, {\n key: `${e}-${t.path}-${t.method}`,\n op: t.operation,\n tag: \"callbacks\",\n method: t.method,\n path: t.path,\n specPath: t.specPath,\n allowTryItOut: !1\n })))));\n};\nconst getDefaultRequestBodyValue = (e, t, r, n) => {\n const a = e.getIn([\"content\", t]) ?? (0, Qe.OrderedMap)(),\n o = a.get(\"schema\", (0, Qe.OrderedMap)()).toJS(),\n s = void 0 !== a.get(\"examples\"),\n l = a.get(\"example\"),\n i = s ? a.getIn([\"examples\", r, \"value\"]) : l;\n return stringify(n.getSampleSchema(o, t, {\n includeWriteOnly: !0\n }, i));\n};\nvar request_body = ({\n userHasEditedBody: e,\n requestBody: t,\n requestBodyValue: r,\n requestBodyInclusionSetting: n,\n requestBodyErrors: a,\n getComponent: o,\n getConfigs: s,\n specSelectors: l,\n fn: i,\n contentType: c,\n isExecute: u,\n specPath: d,\n onChange: p,\n onChangeIncludeEmpty: m,\n activeExamplesKey: f,\n updateActiveExamplesKey: h,\n setRetainRequestBodyValueFlag: g\n}) => {\n const handleFile = e => {\n p(e.target.files[0]);\n },\n setIsIncludedOptions = e => {\n let t = {\n key: e,\n shouldDispatchInit: !1,\n defaultValue: !0\n };\n return \"no value\" === n.get(e, \"no value\") && (t.shouldDispatchInit = !0), t;\n },\n y = o(\"Markdown\", !0),\n S = o(\"modelExample\"),\n _ = o(\"RequestBodyEditor\"),\n v = o(\"HighlightCode\", !0),\n b = o(\"ExamplesSelectValueRetainer\"),\n w = o(\"Example\"),\n C = o(\"ParameterIncludeEmpty\"),\n {\n showCommonExtensions: x\n } = s(),\n O = t?.get(\"description\") ?? null,\n k = t?.get(\"content\") ?? new Qe.OrderedMap();\n c = c || k.keySeq().first() || \"\";\n const N = k.get(c) ?? (0, Qe.OrderedMap)(),\n A = N.get(\"schema\", (0, Qe.OrderedMap)()),\n I = N.get(\"examples\", null),\n R = I?.map((e, r) => {\n const n = e?.get(\"value\", null);\n return n && (e = e.set(\"value\", getDefaultRequestBodyValue(t, c, r, i), n)), e;\n });\n if (a = Qe.List.isList(a) ? a : (0, Qe.List)(), !N.size) return null;\n const T = \"object\" === N.getIn([\"schema\", \"type\"]),\n B = \"binary\" === N.getIn([\"schema\", \"format\"]),\n j = \"base64\" === N.getIn([\"schema\", \"format\"]);\n if (\"application/octet-stream\" === c || 0 === c.indexOf(\"image/\") || 0 === c.indexOf(\"audio/\") || 0 === c.indexOf(\"video/\") || B || j) {\n const e = o(\"Input\");\n return u ? Xe.default.createElement(e, {\n type: \"file\",\n onChange: handleFile\n }) : Xe.default.createElement(\"i\", null, \"Example values are not available for \", Xe.default.createElement(\"code\", null, c), \" media types.\");\n }\n if (T && (\"application/x-www-form-urlencoded\" === c || 0 === c.indexOf(\"multipart/\")) && A.get(\"properties\", (0, Qe.OrderedMap)()).size > 0) {\n const e = o(\"JsonSchemaForm\"),\n t = o(\"ParameterExt\"),\n s = A.get(\"properties\", (0, Qe.OrderedMap)());\n return r = Qe.Map.isMap(r) ? r : (0, Qe.OrderedMap)(), Xe.default.createElement(\"div\", {\n className: \"table-container\"\n }, O && Xe.default.createElement(y, {\n source: O\n }), Xe.default.createElement(\"table\", null, Xe.default.createElement(\"tbody\", null, Qe.Map.isMap(s) && s.entrySeq().map(([s, l]) => {\n if (l.get(\"readOnly\")) return;\n const c = l.get(\"oneOf\")?.get(0)?.toJS(),\n d = l.get(\"anyOf\")?.get(0)?.toJS();\n l = (0, Qe.fromJS)(i.mergeJsonSchema(l.toJS(), c ?? d ?? {}));\n let f = x ? getCommonExtensions(l) : null;\n const h = A.get(\"required\", (0, Qe.List)()).includes(s),\n g = l.get(\"type\"),\n S = l.get(\"format\"),\n _ = l.get(\"description\"),\n v = r.getIn([s, \"value\"]),\n b = r.getIn([s, \"errors\"]) || a,\n w = n.get(s) || !1;\n let O = i.getSampleSchema(l, !1, {\n includeWriteOnly: !0\n });\n !1 === O && (O = \"false\"), 0 === O && (O = \"0\"), \"string\" != typeof O && \"object\" === g && (O = stringify(O)), \"string\" == typeof O && \"array\" === g && (O = JSON.parse(O));\n const k = \"string\" === g && (\"binary\" === S || \"base64\" === S);\n return Xe.default.createElement(\"tr\", {\n key: s,\n className: \"parameters\",\n \"data-property-name\": s\n }, Xe.default.createElement(\"td\", {\n className: \"parameters-col_name\"\n }, Xe.default.createElement(\"div\", {\n className: h ? \"parameter__name required\" : \"parameter__name\"\n }, s, h ? Xe.default.createElement(\"span\", null, \" *\") : null), Xe.default.createElement(\"div\", {\n className: \"parameter__type\"\n }, g, S && Xe.default.createElement(\"span\", {\n className: \"prop-format\"\n }, \"($\", S, \")\"), x && f.size ? f.entrySeq().map(([e, r]) => Xe.default.createElement(t, {\n key: `${e}-${r}`,\n xKey: e,\n xVal: r\n })) : null), Xe.default.createElement(\"div\", {\n className: \"parameter__deprecated\"\n }, l.get(\"deprecated\") ? \"deprecated\" : null)), Xe.default.createElement(\"td\", {\n className: \"parameters-col_description\"\n }, Xe.default.createElement(y, {\n source: _\n }), u ? Xe.default.createElement(\"div\", null, Xe.default.createElement(e, {\n fn: i,\n dispatchInitialValue: !k,\n schema: l,\n description: s,\n getComponent: o,\n value: void 0 === v ? O : v,\n required: h,\n errors: b,\n onChange: e => {\n p(e, [s]);\n }\n }), h ? null : Xe.default.createElement(C, {\n onChange: e => m(s, e),\n isIncluded: w,\n isIncludedOptions: setIsIncludedOptions(s),\n isDisabled: Array.isArray(v) ? 0 !== v.length : !isEmptyValue(v)\n })) : null));\n }))));\n }\n const P = getDefaultRequestBodyValue(t, c, f, i);\n let M = null;\n return getKnownSyntaxHighlighterLanguage(P) && (M = \"json\"), Xe.default.createElement(\"div\", null, O && Xe.default.createElement(y, {\n source: O\n }), R ? Xe.default.createElement(b, {\n userHasEditedBody: e,\n examples: R,\n currentKey: f,\n currentUserInputValue: r,\n onSelect: e => {\n h(e);\n },\n updateValue: p,\n defaultToFirstExample: !0,\n getComponent: o,\n setRetainRequestBodyValueFlag: g\n }) : null, u ? Xe.default.createElement(\"div\", null, Xe.default.createElement(_, {\n value: r,\n errors: a,\n defaultValue: P,\n onChange: p,\n getComponent: o\n })) : Xe.default.createElement(S, {\n getComponent: o,\n getConfigs: s,\n specSelectors: l,\n expandDepth: 1,\n isExecute: u,\n schema: N.get(\"schema\"),\n specPath: d.push(\"content\", c),\n example: Xe.default.createElement(v, {\n className: \"body-param__example\",\n language: M\n }, stringify(r) || P),\n includeWriteOnly: !0\n }), R ? Xe.default.createElement(w, {\n example: R.get(f),\n getComponent: o,\n getConfigs: s\n }) : null);\n};\nclass operation_link_OperationLink extends Xe.Component {\n render() {\n const {\n link: e,\n name: t,\n getComponent: r\n } = this.props,\n n = r(\"Markdown\", !0);\n let a = e.get(\"operationId\") || e.get(\"operationRef\"),\n o = e.get(\"parameters\") && e.get(\"parameters\").toJS(),\n s = e.get(\"description\");\n return Xe.default.createElement(\"div\", {\n className: \"operation-link\"\n }, Xe.default.createElement(\"div\", {\n className: \"description\"\n }, Xe.default.createElement(\"b\", null, Xe.default.createElement(\"code\", null, t)), s ? Xe.default.createElement(n, {\n source: s\n }) : null), Xe.default.createElement(\"pre\", null, \"Operation `\", a, \"`\", Xe.default.createElement(\"br\", null), Xe.default.createElement(\"br\", null), \"Parameters \", function padString(e, t) {\n if (\"string\" != typeof t) return \"\";\n return t.split(\"\\n\").map((t, r) => r > 0 ? Array(e + 1).join(\" \") + t : t).join(\"\\n\");\n }(0, JSON.stringify(o, null, 2)) || \"{}\", Xe.default.createElement(\"br\", null)));\n }\n}\nvar to = operation_link_OperationLink;\nvar components_servers = ({\n servers: e,\n currentServer: t,\n setSelectedServer: r,\n setServerVariableValue: n,\n getServerVariable: a,\n getEffectiveServerValue: o\n}) => {\n const s = (e.find(e => e.get(\"url\") === t) || (0, Qe.OrderedMap)()).get(\"variables\") || (0, Qe.OrderedMap)(),\n l = 0 !== s.size;\n (0, Xe.useEffect)(() => {\n t || r(e.first()?.get(\"url\"));\n }, []), (0, Xe.useEffect)(() => {\n const a = e.find(e => e.get(\"url\") === t);\n if (!a) return void r(e.first().get(\"url\"));\n (a.get(\"variables\") || (0, Qe.OrderedMap)()).map((e, r) => {\n n({\n server: t,\n key: r,\n val: e.get(\"default\") || \"\"\n });\n });\n }, [t, e]);\n const i = (0, Xe.useCallback)(e => {\n r(e.target.value);\n }, [r]),\n c = (0, Xe.useCallback)(e => {\n const r = e.target.getAttribute(\"data-variable\"),\n a = e.target.value;\n n({\n server: t,\n key: r,\n val: a\n });\n }, [n, t]);\n return Xe.default.createElement(\"div\", {\n className: \"servers\"\n }, Xe.default.createElement(\"label\", {\n htmlFor: \"servers\"\n }, Xe.default.createElement(\"select\", {\n onChange: i,\n value: t,\n id: \"servers\"\n }, e.valueSeq().map(e => Xe.default.createElement(\"option\", {\n value: e.get(\"url\"),\n key: e.get(\"url\")\n }, e.get(\"url\"), e.get(\"description\") && ` - ${e.get(\"description\")}`)).toArray())), l && Xe.default.createElement(\"div\", null, Xe.default.createElement(\"div\", {\n className: \"computed-url\"\n }, \"Computed URL:\", Xe.default.createElement(\"code\", null, o(t))), Xe.default.createElement(\"h4\", null, \"Server variables\"), Xe.default.createElement(\"table\", null, Xe.default.createElement(\"tbody\", null, s.entrySeq().map(([e, r]) => Xe.default.createElement(\"tr\", {\n key: e\n }, Xe.default.createElement(\"td\", null, e), Xe.default.createElement(\"td\", null, r.get(\"enum\") ? Xe.default.createElement(\"select\", {\n \"data-variable\": e,\n onChange: c\n }, r.get(\"enum\").map(r => Xe.default.createElement(\"option\", {\n selected: r === a(t, e),\n key: r,\n value: r\n }, r))) : Xe.default.createElement(\"input\", {\n type: \"text\",\n value: a(t, e) || \"\",\n onChange: c,\n \"data-variable\": e\n }))))))));\n};\nclass ServersContainer extends Xe.default.Component {\n render() {\n const {\n specSelectors: e,\n oas3Selectors: t,\n oas3Actions: r,\n getComponent: n\n } = this.props,\n a = e.servers(),\n o = n(\"Servers\");\n return a && a.size ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"span\", {\n className: \"servers-title\"\n }, \"Servers\"), Xe.default.createElement(o, {\n servers: a,\n currentServer: t.selectedServer(),\n setSelectedServer: r.setSelectedServer,\n setServerVariableValue: r.setServerVariableValue,\n getServerVariable: t.serverVariableValue,\n getEffectiveServerValue: t.serverEffectiveValue\n })) : null;\n }\n}\nconst ro = Function.prototype;\nlet RequestBodyEditor = /*#__PURE__*/(() => {\n class RequestBodyEditor extends Xe.PureComponent {\n static defaultProps = {\n onChange: ro,\n userHasEditedBody: !1\n };\n constructor(e, t) {\n super(e, t), this.state = {\n value: stringify(e.value) || e.defaultValue\n }, e.onChange(e.value);\n }\n applyDefaultValue = e => {\n const {\n onChange: t,\n defaultValue: r\n } = e || this.props;\n return this.setState({\n value: r\n }), t(r);\n };\n onChange = e => {\n this.props.onChange(stringify(e));\n };\n onDomChange = e => {\n const t = e.target.value;\n this.setState({\n value: t\n }, () => this.onChange(t));\n };\n UNSAFE_componentWillReceiveProps(e) {\n this.props.value !== e.value && e.value !== this.state.value && this.setState({\n value: stringify(e.value)\n }), !e.value && e.defaultValue && this.state.value && this.applyDefaultValue(e);\n }\n render() {\n let {\n getComponent: e,\n errors: t\n } = this.props,\n {\n value: r\n } = this.state,\n n = t.size > 0;\n const a = e(\"TextArea\");\n return Xe.default.createElement(\"div\", {\n className: \"body-param\"\n }, Xe.default.createElement(a, {\n className: (0, _r.default)(\"body-param__text\", {\n invalid: n\n }),\n title: t.size ? t.join(\", \") : \"\",\n value: r,\n onChange: this.onDomChange\n }));\n }\n }\n return RequestBodyEditor;\n})();\nclass HttpAuth extends Xe.default.Component {\n constructor(e, t) {\n super(e, t);\n let {\n name: r,\n schema: n\n } = this.props,\n a = this.getValue();\n this.state = {\n name: r,\n schema: n,\n value: a\n };\n }\n getValue() {\n let {\n name: e,\n authorized: t\n } = this.props;\n return t && t.getIn([e, \"value\"]);\n }\n onChange = e => {\n let {\n onChange: t\n } = this.props,\n {\n value: r,\n name: n\n } = e.target,\n a = Object.assign({}, this.state.value);\n n ? a[n] = r : a = r, this.setState({\n value: a\n }, () => t(this.state));\n };\n render() {\n let {\n schema: e,\n getComponent: t,\n errSelectors: r,\n name: n\n } = this.props;\n const a = t(\"Input\"),\n o = t(\"Row\"),\n s = t(\"Col\"),\n l = t(\"authError\"),\n i = t(\"Markdown\", !0),\n c = t(\"JumpToPath\", !0),\n u = (e.get(\"scheme\") || \"\").toLowerCase();\n let d = this.getValue(),\n p = r.allErrors().filter(e => e.get(\"authId\") === n);\n if (\"basic\" === u) {\n let t = d ? d.get(\"username\") : null;\n return Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", null, Xe.default.createElement(\"code\", null, n || e.get(\"name\")), \"  (http, Basic)\", Xe.default.createElement(c, {\n path: [\"securityDefinitions\", n]\n })), t && Xe.default.createElement(\"h6\", null, \"Authorized\"), Xe.default.createElement(o, null, Xe.default.createElement(i, {\n source: e.get(\"description\")\n })), Xe.default.createElement(o, null, Xe.default.createElement(\"label\", {\n htmlFor: \"auth-basic-username\"\n }, \"Username:\"), t ? Xe.default.createElement(\"code\", null, \" \", t, \" \") : Xe.default.createElement(s, null, Xe.default.createElement(a, {\n id: \"auth-basic-username\",\n type: \"text\",\n required: \"required\",\n name: \"username\",\n \"aria-label\": \"auth-basic-username\",\n onChange: this.onChange,\n autoFocus: !0\n }))), Xe.default.createElement(o, null, Xe.default.createElement(\"label\", {\n htmlFor: \"auth-basic-password\"\n }, \"Password:\"), t ? Xe.default.createElement(\"code\", null, \" ****** \") : Xe.default.createElement(s, null, Xe.default.createElement(a, {\n id: \"auth-basic-password\",\n autoComplete: \"new-password\",\n name: \"password\",\n type: \"password\",\n \"aria-label\": \"auth-basic-password\",\n onChange: this.onChange\n }))), p.valueSeq().map((e, t) => Xe.default.createElement(l, {\n error: e,\n key: t\n })));\n }\n return \"bearer\" === u ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", null, Xe.default.createElement(\"code\", null, n || e.get(\"name\")), \"  (http, Bearer)\", Xe.default.createElement(c, {\n path: [\"securityDefinitions\", n]\n })), d && Xe.default.createElement(\"h6\", null, \"Authorized\"), Xe.default.createElement(o, null, Xe.default.createElement(i, {\n source: e.get(\"description\")\n })), Xe.default.createElement(o, null, Xe.default.createElement(\"label\", {\n htmlFor: \"auth-bearer-value\"\n }, \"Value:\"), d ? Xe.default.createElement(\"code\", null, \" ****** \") : Xe.default.createElement(s, null, Xe.default.createElement(a, {\n id: \"auth-bearer-value\",\n type: \"text\",\n \"aria-label\": \"auth-bearer-value\",\n onChange: this.onChange,\n autoFocus: !0\n }))), p.valueSeq().map((e, t) => Xe.default.createElement(l, {\n error: e,\n key: t\n }))) : Xe.default.createElement(\"div\", null, Xe.default.createElement(\"em\", null, Xe.default.createElement(\"b\", null, n), \" HTTP authentication: unsupported scheme \", `'${u}'`));\n }\n}\nclass OperationServers extends Xe.default.Component {\n setSelectedServer = e => {\n const {\n path: t,\n method: r\n } = this.props;\n return this.forceUpdate(), this.props.setSelectedServer(e, `${t}:${r}`);\n };\n setServerVariableValue = e => {\n const {\n path: t,\n method: r\n } = this.props;\n return this.forceUpdate(), this.props.setServerVariableValue({\n ...e,\n namespace: `${t}:${r}`\n });\n };\n getSelectedServer = () => {\n const {\n path: e,\n method: t\n } = this.props;\n return this.props.getSelectedServer(`${e}:${t}`);\n };\n getServerVariable = (e, t) => {\n const {\n path: r,\n method: n\n } = this.props;\n return this.props.getServerVariable({\n namespace: `${r}:${n}`,\n server: e\n }, t);\n };\n getEffectiveServerValue = e => {\n const {\n path: t,\n method: r\n } = this.props;\n return this.props.getEffectiveServerValue({\n server: e,\n namespace: `${t}:${r}`\n });\n };\n render() {\n const {\n operationServers: e,\n pathServers: t,\n getComponent: r\n } = this.props;\n if (!e && !t) return null;\n const n = r(\"Servers\"),\n a = e || t,\n o = e ? \"operation\" : \"path\";\n return Xe.default.createElement(\"div\", {\n className: \"opblock-section operation-servers\"\n }, Xe.default.createElement(\"div\", {\n className: \"opblock-section-header\"\n }, Xe.default.createElement(\"div\", {\n className: \"tab-header\"\n }, Xe.default.createElement(\"h4\", {\n className: \"opblock-title\"\n }, \"Servers\"))), Xe.default.createElement(\"div\", {\n className: \"opblock-description-wrapper\"\n }, Xe.default.createElement(\"h4\", {\n className: \"message\"\n }, \"These \", o, \"-level options override the global server options.\"), Xe.default.createElement(n, {\n servers: a,\n currentServer: this.getSelectedServer(),\n setSelectedServer: this.setSelectedServer,\n setServerVariableValue: this.setServerVariableValue,\n getServerVariable: this.getServerVariable,\n getEffectiveServerValue: this.getEffectiveServerValue\n })));\n }\n}\nvar no = {\n Callbacks: callbacks,\n HttpAuth,\n RequestBody: request_body,\n Servers: components_servers,\n ServersContainer,\n RequestBodyEditor,\n OperationServers,\n operationLink: to\n};\nconst ao = new Ma.Remarkable(\"commonmark\");\nao.block.ruler.enable([\"table\"]), ao.set({\n linkTarget: \"_blank\"\n});\nvar oo = OAS3ComponentWrapFactory(({\n source: e,\n className: t = \"\",\n getConfigs: r = () => ({\n useUnsafeMarkdown: !1\n })\n }) => {\n if (\"string\" != typeof e) return null;\n if (e) {\n const {\n useUnsafeMarkdown: n\n } = r(),\n a = sanitizer(ao.render(e), {\n useUnsafeMarkdown: n\n });\n let o;\n return \"string\" == typeof a && (o = a.trim()), Xe.default.createElement(\"div\", {\n dangerouslySetInnerHTML: {\n __html: o\n },\n className: (0, _r.default)(t, \"renderedMarkdown\")\n });\n }\n return null;\n }),\n so = OAS3ComponentWrapFactory(({\n Ori: e,\n ...t\n }) => {\n const {\n schema: r,\n getComponent: n,\n errSelectors: a,\n authorized: o,\n onAuthChange: s,\n name: l\n } = t,\n i = n(\"HttpAuth\");\n return \"http\" === r.get(\"type\") ? Xe.default.createElement(i, {\n key: l,\n schema: r,\n name: l,\n errSelectors: a,\n authorized: o,\n getComponent: n,\n onChange: s\n }) : Xe.default.createElement(e, t);\n }),\n lo = OAS3ComponentWrapFactory(OnlineValidatorBadge);\nclass ModelComponent extends Xe.Component {\n render() {\n let {\n getConfigs: e,\n schema: t,\n Ori: r\n } = this.props,\n n = [\"model-box\"],\n a = null;\n return !0 === t.get(\"deprecated\") && (n.push(\"deprecated\"), a = Xe.default.createElement(\"span\", {\n className: \"model-deprecated-warning\"\n }, \"Deprecated:\")), Xe.default.createElement(\"div\", {\n className: n.join(\" \")\n }, a, Xe.default.createElement(r, (0, cr.default)({}, this.props, {\n getConfigs: e,\n depth: 1,\n expandDepth: this.props.expandDepth || 0\n })));\n }\n}\nvar io = OAS3ComponentWrapFactory(ModelComponent),\n co = OAS3ComponentWrapFactory(({\n Ori: e,\n ...t\n }) => {\n const {\n schema: r,\n getComponent: n,\n errors: a,\n onChange: o\n } = t,\n s = r && r.get ? r.get(\"format\") : null,\n l = r && r.get ? r.get(\"type\") : null,\n i = n(\"Input\");\n return l && \"string\" === l && s && (\"binary\" === s || \"base64\" === s) ? Xe.default.createElement(i, {\n type: \"file\",\n className: a.length ? \"invalid\" : \"\",\n title: a.length ? a : \"\",\n onChange: e => {\n o(e.target.files[0]);\n },\n disabled: e.isDisabled\n }) : Xe.default.createElement(e, t);\n }),\n uo = {\n Markdown: oo,\n AuthItem: so,\n OpenAPIVersion: function OAS30ComponentWrapFactory(e) {\n return (t, r) => n => \"function\" == typeof r.specSelectors?.isOAS30 ? r.specSelectors.isOAS30() ? Xe.default.createElement(e, (0, cr.default)({}, n, r, {\n Ori: t\n })) : Xe.default.createElement(t, n) : (console.warn(\"OAS30 wrapper: couldn't get spec\"), null);\n }(e => {\n const {\n Ori: t\n } = e;\n return Xe.default.createElement(t, {\n oasVersion: \"3.0\"\n });\n }),\n JsonSchema_string: co,\n model: io,\n onlineValidatorBadge: lo\n };\nconst po = \"oas3_set_servers\",\n mo = \"oas3_set_request_body_value\",\n fo = \"oas3_set_request_body_retain_flag\",\n ho = \"oas3_set_request_body_inclusion\",\n go = \"oas3_set_active_examples_member\",\n yo = \"oas3_set_request_content_type\",\n Eo = \"oas3_set_response_content_type\",\n So = \"oas3_set_server_variable_value\",\n _o = \"oas3_set_request_body_validate_error\",\n vo = \"oas3_clear_request_body_validate_error\",\n bo = \"oas3_clear_request_body_value\";\nfunction setSelectedServer(e, t) {\n return {\n type: po,\n payload: {\n selectedServerUrl: e,\n namespace: t\n }\n };\n}\nfunction setRequestBodyValue({\n value: e,\n pathMethod: t\n}) {\n return {\n type: mo,\n payload: {\n value: e,\n pathMethod: t\n }\n };\n}\nconst setRetainRequestBodyValueFlag = ({\n value: e,\n pathMethod: t\n}) => ({\n type: fo,\n payload: {\n value: e,\n pathMethod: t\n }\n});\nfunction setRequestBodyInclusion({\n value: e,\n pathMethod: t,\n name: r\n}) {\n return {\n type: ho,\n payload: {\n value: e,\n pathMethod: t,\n name: r\n }\n };\n}\nfunction setActiveExamplesMember({\n name: e,\n pathMethod: t,\n contextType: r,\n contextName: n\n}) {\n return {\n type: go,\n payload: {\n name: e,\n pathMethod: t,\n contextType: r,\n contextName: n\n }\n };\n}\nfunction setRequestContentType({\n value: e,\n pathMethod: t\n}) {\n return {\n type: yo,\n payload: {\n value: e,\n pathMethod: t\n }\n };\n}\nfunction setResponseContentType({\n value: e,\n path: t,\n method: r\n}) {\n return {\n type: Eo,\n payload: {\n value: e,\n path: t,\n method: r\n }\n };\n}\nfunction setServerVariableValue({\n server: e,\n namespace: t,\n key: r,\n val: n\n}) {\n return {\n type: So,\n payload: {\n server: e,\n namespace: t,\n key: r,\n val: n\n }\n };\n}\nconst setRequestBodyValidateError = ({\n path: e,\n method: t,\n validationErrors: r\n }) => ({\n type: _o,\n payload: {\n path: e,\n method: t,\n validationErrors: r\n }\n }),\n clearRequestBodyValidateError = ({\n path: e,\n method: t\n }) => ({\n type: vo,\n payload: {\n path: e,\n method: t\n }\n }),\n initRequestBodyValidateError = ({\n pathMethod: e\n }) => ({\n type: vo,\n payload: {\n path: e[0],\n method: e[1]\n }\n }),\n clearRequestBodyValue = ({\n pathMethod: e\n }) => ({\n type: bo,\n payload: {\n pathMethod: e\n }\n });\nvar wo = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n}({\n default: function () {\n return _e.default;\n }\n});\nconst oas3_selectors_onlyOAS3 = e => (t, ...r) => n => {\n if (n.getSystem().specSelectors.isOAS3()) {\n const a = e(t, ...r);\n return \"function\" == typeof a ? a(n) : a;\n }\n return null;\n};\nconst Co = oas3_selectors_onlyOAS3((e, t) => {\n const r = t ? [t, \"selectedServer\"] : [\"selectedServer\"];\n return e.getIn(r) || \"\";\n }),\n xo = oas3_selectors_onlyOAS3((e, t, r) => e.getIn([\"requestData\", t, r, \"bodyValue\"]) || null),\n Oo = oas3_selectors_onlyOAS3((e, t, r) => e.getIn([\"requestData\", t, r, \"retainBodyValue\"]) || !1),\n selectDefaultRequestBodyValue = (e, t, r) => e => {\n const {\n oas3Selectors: n,\n specSelectors: a,\n fn: o\n } = e.getSystem();\n if (a.isOAS3()) {\n const e = n.requestContentType(t, r);\n if (e) return getDefaultRequestBodyValue(a.specResolvedSubtree([\"paths\", t, r, \"requestBody\"]), e, n.activeExamplesMember(t, r, \"requestBody\", \"requestBody\"), o);\n }\n return null;\n },\n ko = oas3_selectors_onlyOAS3((e, t, r) => e => {\n const {\n oas3Selectors: n,\n specSelectors: a,\n fn: o\n } = e;\n let s = !1;\n const l = n.requestContentType(t, r);\n let i = n.requestBodyValue(t, r);\n const c = a.specResolvedSubtree([\"paths\", t, r, \"requestBody\"]);\n if (!c) return !1;\n if (Qe.Map.isMap(i) && (i = stringify(i.mapEntries(e => Qe.Map.isMap(e[1]) ? [e[0], e[1].get(\"value\")] : e).toJS())), Qe.List.isList(i) && (i = stringify(i)), l) {\n const e = getDefaultRequestBodyValue(c, l, n.activeExamplesMember(t, r, \"requestBody\", \"requestBody\"), o);\n s = !!i && i !== e;\n }\n return s;\n }),\n No = oas3_selectors_onlyOAS3((e, t, r) => e.getIn([\"requestData\", t, r, \"bodyInclusion\"]) || (0, Qe.Map)()),\n Ao = oas3_selectors_onlyOAS3((e, t, r) => e.getIn([\"requestData\", t, r, \"errors\"]) || null),\n Io = oas3_selectors_onlyOAS3((e, t, r, n, a) => e.getIn([\"examples\", t, r, n, a, \"activeExample\"]) || null),\n Ro = oas3_selectors_onlyOAS3((e, t, r) => e.getIn([\"requestData\", t, r, \"requestContentType\"]) || null),\n To = oas3_selectors_onlyOAS3((e, t, r) => e.getIn([\"requestData\", t, r, \"responseContentType\"]) || null),\n Bo = oas3_selectors_onlyOAS3((e, t, r) => {\n let n;\n if (\"string\" != typeof t) {\n const {\n server: e,\n namespace: a\n } = t;\n n = a ? [a, \"serverVariableValues\", e, r] : [\"serverVariableValues\", e, r];\n } else {\n n = [\"serverVariableValues\", t, r];\n }\n return e.getIn(n) || null;\n }),\n jo = oas3_selectors_onlyOAS3((e, t) => {\n let r;\n if (\"string\" != typeof t) {\n const {\n server: e,\n namespace: n\n } = t;\n r = n ? [n, \"serverVariableValues\", e] : [\"serverVariableValues\", e];\n } else {\n r = [\"serverVariableValues\", t];\n }\n return e.getIn(r) || (0, Qe.OrderedMap)();\n }),\n Po = oas3_selectors_onlyOAS3((e, t) => {\n var r, n;\n if (\"string\" != typeof t) {\n const {\n server: a,\n namespace: o\n } = t;\n n = a, r = o ? e.getIn([o, \"serverVariableValues\", n]) : e.getIn([\"serverVariableValues\", n]);\n } else n = t, r = e.getIn([\"serverVariableValues\", n]);\n r = r || (0, Qe.OrderedMap)();\n let a = n;\n return r.map((e, t) => {\n a = a.replace(new RegExp(`{${(0, wo.default)(t)}}`, \"g\"), e);\n }), a;\n }),\n Mo = function validateRequestBodyIsRequired(e) {\n return (...t) => r => {\n const n = r.getSystem().specSelectors.specJson();\n let a = [...t][1] || [];\n return !n.getIn([\"paths\", ...a, \"requestBody\", \"required\"]) || e(...t);\n };\n }((e, t) => ((e, t) => (t = t || [], !!e.getIn([\"requestData\", ...t, \"bodyValue\"])))(e, t)),\n validateShallowRequired = (e, {\n oas3RequiredRequestBodyContentType: t,\n oas3RequestContentType: r,\n oas3RequestBodyValue: n\n }) => {\n let a = [];\n if (!Qe.Map.isMap(n)) return a;\n let o = [];\n return Object.keys(t.requestContentType).forEach(e => {\n if (e === r) {\n t.requestContentType[e].forEach(e => {\n o.indexOf(e) < 0 && o.push(e);\n });\n }\n }), o.forEach(e => {\n n.getIn([e, \"value\"]) || a.push(e);\n }), a;\n },\n qo = (0, Jr.default)([\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\", \"trace\"]);\nvar Lo = {\n [po]: (e, {\n payload: {\n selectedServerUrl: t,\n namespace: r\n }\n }) => {\n const n = r ? [r, \"selectedServer\"] : [\"selectedServer\"];\n return e.setIn(n, t);\n },\n [mo]: (e, {\n payload: {\n value: t,\n pathMethod: r\n }\n }) => {\n let [n, a] = r;\n if (!Qe.Map.isMap(t)) return e.setIn([\"requestData\", n, a, \"bodyValue\"], t);\n let o,\n s = e.getIn([\"requestData\", n, a, \"bodyValue\"]) || (0, Qe.Map)();\n Qe.Map.isMap(s) || (s = (0, Qe.Map)());\n const [...l] = t.keys();\n return l.forEach(e => {\n let r = t.getIn([e]);\n s.has(e) && Qe.Map.isMap(r) || (o = s.setIn([e, \"value\"], r));\n }), e.setIn([\"requestData\", n, a, \"bodyValue\"], o);\n },\n [fo]: (e, {\n payload: {\n value: t,\n pathMethod: r\n }\n }) => {\n let [n, a] = r;\n return e.setIn([\"requestData\", n, a, \"retainBodyValue\"], t);\n },\n [ho]: (e, {\n payload: {\n value: t,\n pathMethod: r,\n name: n\n }\n }) => {\n let [a, o] = r;\n return e.setIn([\"requestData\", a, o, \"bodyInclusion\", n], t);\n },\n [go]: (e, {\n payload: {\n name: t,\n pathMethod: r,\n contextType: n,\n contextName: a\n }\n }) => {\n let [o, s] = r;\n return e.setIn([\"examples\", o, s, n, a, \"activeExample\"], t);\n },\n [yo]: (e, {\n payload: {\n value: t,\n pathMethod: r\n }\n }) => {\n let [n, a] = r;\n return e.setIn([\"requestData\", n, a, \"requestContentType\"], t);\n },\n [Eo]: (e, {\n payload: {\n value: t,\n path: r,\n method: n\n }\n }) => e.setIn([\"requestData\", r, n, \"responseContentType\"], t),\n [So]: (e, {\n payload: {\n server: t,\n namespace: r,\n key: n,\n val: a\n }\n }) => {\n const o = r ? [r, \"serverVariableValues\", t, n] : [\"serverVariableValues\", t, n];\n return e.setIn(o, a);\n },\n [_o]: (e, {\n payload: {\n path: t,\n method: r,\n validationErrors: n\n }\n }) => {\n let a = [];\n if (a.push(\"Required field is not provided\"), n.missingBodyValue) return e.setIn([\"requestData\", t, r, \"errors\"], (0, Qe.fromJS)(a));\n if (n.missingRequiredKeys && n.missingRequiredKeys.length > 0) {\n const {\n missingRequiredKeys: o\n } = n;\n return e.updateIn([\"requestData\", t, r, \"bodyValue\"], (0, Qe.fromJS)({}), e => o.reduce((e, t) => e.setIn([t, \"errors\"], (0, Qe.fromJS)(a)), e));\n }\n return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"), e;\n },\n [vo]: (e, {\n payload: {\n path: t,\n method: r\n }\n }) => {\n const n = e.getIn([\"requestData\", t, r, \"bodyValue\"]);\n if (!Qe.Map.isMap(n)) return e.setIn([\"requestData\", t, r, \"errors\"], (0, Qe.fromJS)([]));\n const [...a] = n.keys();\n return a ? e.updateIn([\"requestData\", t, r, \"bodyValue\"], (0, Qe.fromJS)({}), e => a.reduce((e, t) => e.setIn([t, \"errors\"], (0, Qe.fromJS)([])), e)) : e;\n },\n [bo]: (e, {\n payload: {\n pathMethod: t\n }\n }) => {\n let [r, n] = t;\n const a = e.getIn([\"requestData\", r, n, \"bodyValue\"]);\n return a ? Qe.Map.isMap(a) ? e.setIn([\"requestData\", r, n, \"bodyValue\"], (0, Qe.Map)()) : e.setIn([\"requestData\", r, n, \"bodyValue\"], \"\") : e;\n }\n};\nfunction oas3() {\n return {\n components: no,\n wrapComponents: uo,\n statePlugins: {\n spec: {\n wrapSelectors: ze,\n selectors: We\n },\n auth: {\n wrapSelectors: Fe\n },\n oas3: {\n actions: {\n ...He\n },\n reducers: Lo,\n selectors: {\n ...Ge\n }\n }\n }\n };\n}\nvar webhooks = ({\n specSelectors: e,\n getComponent: t\n}) => {\n const r = e.selectWebhooksOperations(),\n n = Object.keys(r),\n a = t(\"OperationContainer\", !0);\n return 0 === n.length ? null : Xe.default.createElement(\"div\", {\n className: \"webhooks\"\n }, Xe.default.createElement(\"h2\", null, \"Webhooks\"), n.map(e => Xe.default.createElement(\"div\", {\n key: `${e}-webhook`\n }, r[e].map(t => Xe.default.createElement(a, {\n key: `${e}-${t.method}-webhook`,\n op: t.operation,\n tag: \"webhooks\",\n method: t.method,\n path: e,\n specPath: (0, Qe.List)(t.specPath),\n allowTryItOut: !1\n })))));\n};\nvar components_license = ({\n getComponent: e,\n specSelectors: t\n}) => {\n const r = t.selectLicenseNameField(),\n n = t.selectLicenseUrl(),\n a = e(\"Link\");\n return Xe.default.createElement(\"div\", {\n className: \"info__license\"\n }, n ? Xe.default.createElement(\"div\", {\n className: \"info__license__url\"\n }, Xe.default.createElement(a, {\n target: \"_blank\",\n href: sanitizeUrl(n)\n }, r)) : Xe.default.createElement(\"span\", null, r));\n};\nvar components_contact = ({\n getComponent: e,\n specSelectors: t\n}) => {\n const r = t.selectContactNameField(),\n n = t.selectContactUrl(),\n a = t.selectContactEmailField(),\n o = e(\"Link\");\n return Xe.default.createElement(\"div\", {\n className: \"info__contact\"\n }, n && Xe.default.createElement(\"div\", null, Xe.default.createElement(o, {\n href: sanitizeUrl(n),\n target: \"_blank\"\n }, r, \" - Website\")), a && Xe.default.createElement(o, {\n href: sanitizeUrl(`mailto:${a}`)\n }, n ? `Send email to ${r}` : `Contact ${r}`));\n};\nvar oas31_components_info = ({\n getComponent: e,\n specSelectors: t\n}) => {\n const r = t.version(),\n n = t.url(),\n a = t.basePath(),\n o = t.host(),\n s = t.selectInfoSummaryField(),\n l = t.selectInfoDescriptionField(),\n i = t.selectInfoTitleField(),\n c = t.selectInfoTermsOfServiceUrl(),\n u = t.selectExternalDocsUrl(),\n d = t.selectExternalDocsDescriptionField(),\n p = t.contact(),\n m = t.license(),\n f = e(\"Markdown\", !0),\n h = e(\"Link\"),\n g = e(\"VersionStamp\"),\n y = e(\"OpenAPIVersion\"),\n S = e(\"InfoUrl\"),\n _ = e(\"InfoBasePath\"),\n v = e(\"License\", !0),\n b = e(\"Contact\", !0),\n w = e(\"JsonSchemaDialect\", !0);\n return Xe.default.createElement(\"div\", {\n className: \"info\"\n }, Xe.default.createElement(\"hgroup\", {\n className: \"main\"\n }, Xe.default.createElement(\"h2\", {\n className: \"title\"\n }, i, Xe.default.createElement(\"span\", null, r && Xe.default.createElement(g, {\n version: r\n }), Xe.default.createElement(y, {\n oasVersion: \"3.1\"\n }))), (o || a) && Xe.default.createElement(_, {\n host: o,\n basePath: a\n }), n && Xe.default.createElement(S, {\n getComponent: e,\n url: n\n })), s && Xe.default.createElement(\"p\", {\n className: \"info__summary\"\n }, s), Xe.default.createElement(\"div\", {\n className: \"info__description description\"\n }, Xe.default.createElement(f, {\n source: l\n })), c && Xe.default.createElement(\"div\", {\n className: \"info__tos\"\n }, Xe.default.createElement(h, {\n target: \"_blank\",\n href: sanitizeUrl(c)\n }, \"Terms of service\")), p.size > 0 && Xe.default.createElement(b, null), m.size > 0 && Xe.default.createElement(v, null), u && Xe.default.createElement(h, {\n className: \"info__extdocs\",\n target: \"_blank\",\n href: sanitizeUrl(u)\n }, d || u), Xe.default.createElement(w, null));\n};\nvar json_schema_dialect = ({\n getComponent: e,\n specSelectors: t\n}) => {\n const r = t.selectJsonSchemaDialectField(),\n n = t.selectJsonSchemaDialectDefault(),\n a = e(\"Link\");\n return Xe.default.createElement(Xe.default.Fragment, null, r && r === n && Xe.default.createElement(\"p\", {\n className: \"info__jsonschemadialect\"\n }, \"JSON Schema dialect:\", \" \", Xe.default.createElement(a, {\n target: \"_blank\",\n href: sanitizeUrl(r)\n }, r)), r && r !== n && Xe.default.createElement(\"div\", {\n className: \"error-wrapper\"\n }, Xe.default.createElement(\"div\", {\n className: \"no-margin\"\n }, Xe.default.createElement(\"div\", {\n className: \"errors\"\n }, Xe.default.createElement(\"div\", {\n className: \"errors-wrapper\"\n }, Xe.default.createElement(\"h4\", {\n className: \"center\"\n }, \"Warning\"), Xe.default.createElement(\"p\", {\n className: \"message\"\n }, Xe.default.createElement(\"strong\", null, \"OpenAPI.jsonSchemaDialect\"), \" field contains a value different from the default value of\", \" \", Xe.default.createElement(a, {\n target: \"_blank\",\n href: n\n }, n), \". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))));\n};\nvar version_pragma_filter = ({\n bypass: e,\n isSwagger2: t,\n isOAS3: r,\n isOAS31: n,\n alsoShow: a,\n children: o\n}) => e ? Xe.default.createElement(\"div\", null, o) : t && (r || n) ? Xe.default.createElement(\"div\", {\n className: \"version-pragma\"\n}, a, Xe.default.createElement(\"div\", {\n className: \"version-pragma__message version-pragma__message--ambiguous\"\n}, Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h3\", null, \"Unable to render this definition\"), Xe.default.createElement(\"p\", null, Xe.default.createElement(\"code\", null, \"swagger\"), \" and \", Xe.default.createElement(\"code\", null, \"openapi\"), \" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"), Xe.default.createElement(\"p\", null, \"Supported version fields are \", Xe.default.createElement(\"code\", null, 'swagger: \"2.0\"'), \" and those that match \", Xe.default.createElement(\"code\", null, \"openapi: 3.x.y\"), \" (for example,\", \" \", Xe.default.createElement(\"code\", null, \"openapi: 3.1.0\"), \").\")))) : t || r || n ? Xe.default.createElement(\"div\", null, o) : Xe.default.createElement(\"div\", {\n className: \"version-pragma\"\n}, a, Xe.default.createElement(\"div\", {\n className: \"version-pragma__message version-pragma__message--missing\"\n}, Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h3\", null, \"Unable to render this definition\"), Xe.default.createElement(\"p\", null, \"The provided definition does not specify a valid version field.\"), Xe.default.createElement(\"p\", null, \"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \", Xe.default.createElement(\"code\", null, 'swagger: \"2.0\"'), \" and those that match \", Xe.default.createElement(\"code\", null, \"openapi: 3.x.y\"), \" (for example,\", \" \", Xe.default.createElement(\"code\", null, \"openapi: 3.1.0\"), \").\"))));\nconst getModelName = e => \"string\" == typeof e && e.includes(\"#/components/schemas/\") ? (e => {\n const t = e.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n try {\n return decodeURIComponent(t);\n } catch {\n return t;\n }\n })(e.replace(/^.*#\\/components\\/schemas\\//, \"\")) : null,\n Do = (0, Xe.forwardRef)(({\n schema: e,\n getComponent: t,\n onToggle: r = () => {}\n }, n) => {\n const a = t(\"JSONSchema202012\"),\n o = getModelName(e.get(\"$$ref\")),\n s = (0, Xe.useCallback)((e, t) => {\n r(o, t);\n }, [o, r]);\n return Xe.default.createElement(a, {\n name: o,\n schema: e.toJS(),\n ref: n,\n onExpand: s\n });\n });\nvar Uo = Do;\nvar models = ({\n specActions: e,\n specSelectors: t,\n layoutSelectors: r,\n layoutActions: n,\n getComponent: a,\n getConfigs: o,\n fn: s\n}) => {\n const l = t.selectSchemas(),\n i = Object.keys(l).length > 0,\n c = [\"components\", \"schemas\"],\n {\n docExpansion: u,\n defaultModelsExpandDepth: d\n } = o(),\n p = d > 0 && \"none\" !== u,\n m = r.isShown(c, p),\n f = a(\"Collapse\"),\n h = a(\"JSONSchema202012\"),\n g = a(\"ArrowUpIcon\"),\n y = a(\"ArrowDownIcon\"),\n {\n getTitle: S\n } = s.jsonSchema202012.useFn();\n (0, Xe.useEffect)(() => {\n const r = m && d > 1,\n n = null != t.specResolvedSubtree(c);\n r && !n && e.requestResolvedSubtree(c);\n }, [m, d]);\n const _ = (0, Xe.useCallback)(() => {\n n.show(c, !m);\n }, [m]),\n v = (0, Xe.useCallback)(e => {\n null !== e && n.readyToScroll(c, e);\n }, []),\n handleJSONSchema202012Ref = e => t => {\n null !== t && n.readyToScroll([...c, e], t);\n },\n handleJSONSchema202012Expand = r => (n, a) => {\n if (a) {\n const n = [...c, r];\n null != t.specResolvedSubtree(n) || e.requestResolvedSubtree([...c, r]);\n }\n };\n return !i || d < 0 ? null : Xe.default.createElement(\"section\", {\n className: (0, _r.default)(\"models\", {\n \"is-open\": m\n }),\n ref: v\n }, Xe.default.createElement(\"h4\", null, Xe.default.createElement(\"button\", {\n \"aria-expanded\": m,\n className: \"models-control\",\n onClick: _\n }, Xe.default.createElement(\"span\", null, \"Schemas\"), m ? Xe.default.createElement(g, null) : Xe.default.createElement(y, null))), Xe.default.createElement(f, {\n isOpened: m\n }, Object.entries(l).map(([e, t]) => {\n const r = S(t, {\n lookup: \"basic\"\n }) || e;\n return Xe.default.createElement(h, {\n key: e,\n ref: handleJSONSchema202012Ref(e),\n schema: t,\n name: r,\n onExpand: handleJSONSchema202012Expand(e)\n });\n })));\n};\nvar mutual_tls_auth = ({\n schema: e,\n getComponent: t\n}) => {\n const r = t(\"JumpToPath\", !0);\n return Xe.default.createElement(\"div\", null, Xe.default.createElement(\"h4\", null, e.get(\"name\"), \" (mutualTLS)\", \" \", Xe.default.createElement(r, {\n path: [\"securityDefinitions\", e.get(\"name\")]\n })), Xe.default.createElement(\"p\", null, \"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"), Xe.default.createElement(\"p\", null, e.get(\"description\")));\n};\nclass auths_Auths extends Xe.default.Component {\n constructor(e, t) {\n super(e, t), this.state = {};\n }\n onAuthChange = e => {\n let {\n name: t\n } = e;\n this.setState({\n [t]: e\n });\n };\n submitAuth = e => {\n e.preventDefault();\n let {\n authActions: t\n } = this.props;\n t.authorizeWithPersistOption(this.state);\n };\n logoutClick = e => {\n e.preventDefault();\n let {\n authActions: t,\n definitions: r\n } = this.props,\n n = r.map((e, t) => t).toArray();\n this.setState(n.reduce((e, t) => (e[t] = \"\", e), {})), t.logoutWithPersistOption(n);\n };\n close = e => {\n e.preventDefault();\n let {\n authActions: t\n } = this.props;\n t.showDefinitions(!1);\n };\n render() {\n let {\n definitions: e,\n getComponent: t,\n authSelectors: r,\n errSelectors: n\n } = this.props;\n const a = t(\"AuthItem\"),\n o = t(\"oauth2\", !0),\n s = t(\"Button\"),\n l = r.authorized(),\n i = e.filter((e, t) => !!l.get(t)),\n c = e.filter(e => \"oauth2\" !== e.get(\"type\") && \"mutualTLS\" !== e.get(\"type\")),\n u = e.filter(e => \"oauth2\" === e.get(\"type\")),\n d = e.filter(e => \"mutualTLS\" === e.get(\"type\"));\n return Xe.default.createElement(\"div\", {\n className: \"auth-container\"\n }, c.size > 0 && Xe.default.createElement(\"form\", {\n onSubmit: this.submitAuth\n }, c.map((e, r) => Xe.default.createElement(a, {\n key: r,\n schema: e,\n name: r,\n getComponent: t,\n onAuthChange: this.onAuthChange,\n authorized: l,\n errSelectors: n\n })).toArray(), Xe.default.createElement(\"div\", {\n className: \"auth-btn-wrapper\"\n }, c.size === i.size ? Xe.default.createElement(s, {\n className: \"btn modal-btn auth\",\n onClick: this.logoutClick,\n \"aria-label\": \"Remove authorization\"\n }, \"Logout\") : Xe.default.createElement(s, {\n type: \"submit\",\n className: \"btn modal-btn auth authorize\",\n \"aria-label\": \"Apply credentials\"\n }, \"Authorize\"), Xe.default.createElement(s, {\n className: \"btn modal-btn auth btn-done\",\n onClick: this.close\n }, \"Close\"))), u.size > 0 ? Xe.default.createElement(\"div\", null, Xe.default.createElement(\"div\", {\n className: \"scope-def\"\n }, Xe.default.createElement(\"p\", null, \"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"), Xe.default.createElement(\"p\", null, \"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")), e.filter(e => \"oauth2\" === e.get(\"type\")).map((e, t) => Xe.default.createElement(\"div\", {\n key: t\n }, Xe.default.createElement(o, {\n authorized: l,\n schema: e,\n name: t\n }))).toArray()) : null, d.size > 0 && Xe.default.createElement(\"div\", null, d.map((e, r) => Xe.default.createElement(a, {\n key: r,\n schema: e,\n name: r,\n getComponent: t,\n onAuthChange: this.onAuthChange,\n authorized: l,\n errSelectors: n\n })).toArray()));\n }\n}\nvar $o = auths_Auths;\nconst isOAS31 = e => {\n const t = e.get(\"openapi\");\n return \"string\" == typeof t && /^3\\.1\\.(?:[1-9]\\d*|0)$/.test(t);\n },\n fn_createOnlyOAS31Selector = e => (t, ...r) => n => {\n if (n.getSystem().specSelectors.isOAS31()) {\n const a = e(t, ...r);\n return \"function\" == typeof a ? a(n) : a;\n }\n return null;\n },\n createOnlyOAS31SelectorWrapper = e => (t, r) => (n, ...a) => {\n if (r.getSystem().specSelectors.isOAS31()) {\n const o = e(n, ...a);\n return \"function\" == typeof o ? o(t, r) : o;\n }\n return t(...a);\n },\n fn_createSystemSelector = e => (t, ...r) => n => {\n const a = e(t, n, ...r);\n return \"function\" == typeof a ? a(n) : a;\n },\n createOnlyOAS31ComponentWrapper = e => (t, r) => n => r.specSelectors.isOAS31() ? Xe.default.createElement(e, (0, cr.default)({}, n, {\n originalComponent: t,\n getSystem: r.getSystem\n })) : Xe.default.createElement(t, n);\nvar Jo = createOnlyOAS31ComponentWrapper(({\n getSystem: e\n}) => {\n const t = e().getComponent(\"OAS31License\", !0);\n return Xe.default.createElement(t, null);\n});\nvar Vo = createOnlyOAS31ComponentWrapper(({\n getSystem: e\n}) => {\n const t = e().getComponent(\"OAS31Contact\", !0);\n return Xe.default.createElement(t, null);\n});\nvar Ko = createOnlyOAS31ComponentWrapper(({\n getSystem: e\n}) => {\n const t = e().getComponent(\"OAS31Info\", !0);\n return Xe.default.createElement(t, null);\n});\nconst zo = createOnlyOAS31ComponentWrapper(({\n getSystem: e,\n ...t\n}) => {\n const r = e(),\n {\n getComponent: n,\n fn: a,\n getConfigs: o\n } = r,\n s = o(),\n l = n(\"OAS31Model\"),\n i = n(\"JSONSchema202012\"),\n c = n(\"JSONSchema202012Keyword$schema\"),\n u = n(\"JSONSchema202012Keyword$vocabulary\"),\n d = n(\"JSONSchema202012Keyword$id\"),\n p = n(\"JSONSchema202012Keyword$anchor\"),\n m = n(\"JSONSchema202012Keyword$dynamicAnchor\"),\n f = n(\"JSONSchema202012Keyword$ref\"),\n h = n(\"JSONSchema202012Keyword$dynamicRef\"),\n g = n(\"JSONSchema202012Keyword$defs\"),\n y = n(\"JSONSchema202012Keyword$comment\"),\n S = n(\"JSONSchema202012KeywordAllOf\"),\n _ = n(\"JSONSchema202012KeywordAnyOf\"),\n v = n(\"JSONSchema202012KeywordOneOf\"),\n b = n(\"JSONSchema202012KeywordNot\"),\n w = n(\"JSONSchema202012KeywordIf\"),\n C = n(\"JSONSchema202012KeywordThen\"),\n x = n(\"JSONSchema202012KeywordElse\"),\n O = n(\"JSONSchema202012KeywordDependentSchemas\"),\n k = n(\"JSONSchema202012KeywordPrefixItems\"),\n N = n(\"JSONSchema202012KeywordItems\"),\n A = n(\"JSONSchema202012KeywordContains\"),\n I = n(\"JSONSchema202012KeywordProperties\"),\n R = n(\"JSONSchema202012KeywordPatternProperties\"),\n T = n(\"JSONSchema202012KeywordAdditionalProperties\"),\n B = n(\"JSONSchema202012KeywordPropertyNames\"),\n j = n(\"JSONSchema202012KeywordUnevaluatedItems\"),\n P = n(\"JSONSchema202012KeywordUnevaluatedProperties\"),\n M = n(\"JSONSchema202012KeywordType\"),\n q = n(\"JSONSchema202012KeywordEnum\"),\n L = n(\"JSONSchema202012KeywordConst\"),\n D = n(\"JSONSchema202012KeywordConstraint\"),\n U = n(\"JSONSchema202012KeywordDependentRequired\"),\n $ = n(\"JSONSchema202012KeywordContentSchema\"),\n J = n(\"JSONSchema202012KeywordTitle\"),\n V = n(\"JSONSchema202012KeywordDescription\"),\n K = n(\"JSONSchema202012KeywordDefault\"),\n z = n(\"JSONSchema202012KeywordDeprecated\"),\n F = n(\"JSONSchema202012KeywordReadOnly\"),\n W = n(\"JSONSchema202012KeywordWriteOnly\"),\n H = n(\"JSONSchema202012Accordion\"),\n G = n(\"JSONSchema202012ExpandDeepButton\"),\n X = n(\"JSONSchema202012ChevronRightIcon\"),\n Y = n(\"withJSONSchema202012Context\")(l, {\n config: {\n default$schema: \"https://spec.openapis.org/oas/3.1/dialect/base\",\n defaultExpandedLevels: s.defaultModelExpandDepth,\n includeReadOnly: Boolean(t.includeReadOnly),\n includeWriteOnly: Boolean(t.includeWriteOnly)\n },\n components: {\n JSONSchema: i,\n Keyword$schema: c,\n Keyword$vocabulary: u,\n Keyword$id: d,\n Keyword$anchor: p,\n Keyword$dynamicAnchor: m,\n Keyword$ref: f,\n Keyword$dynamicRef: h,\n Keyword$defs: g,\n Keyword$comment: y,\n KeywordAllOf: S,\n KeywordAnyOf: _,\n KeywordOneOf: v,\n KeywordNot: b,\n KeywordIf: w,\n KeywordThen: C,\n KeywordElse: x,\n KeywordDependentSchemas: O,\n KeywordPrefixItems: k,\n KeywordItems: N,\n KeywordContains: A,\n KeywordProperties: I,\n KeywordPatternProperties: R,\n KeywordAdditionalProperties: T,\n KeywordPropertyNames: B,\n KeywordUnevaluatedItems: j,\n KeywordUnevaluatedProperties: P,\n KeywordType: M,\n KeywordEnum: q,\n KeywordConst: L,\n KeywordConstraint: D,\n KeywordDependentRequired: U,\n KeywordContentSchema: $,\n KeywordTitle: J,\n KeywordDescription: V,\n KeywordDefault: K,\n KeywordDeprecated: z,\n KeywordReadOnly: F,\n KeywordWriteOnly: W,\n Accordion: H,\n ExpandDeepButton: G,\n ChevronRightIcon: X\n },\n fn: {\n upperFirst: a.upperFirst,\n isExpandable: a.jsonSchema202012.isExpandable,\n getProperties: a.jsonSchema202012.getProperties\n }\n });\n return Xe.default.createElement(Y, t);\n});\nvar Fo = zo;\nconst Wo = createOnlyOAS31ComponentWrapper(({\n getSystem: e\n}) => {\n const {\n getComponent: t,\n fn: r,\n getConfigs: n\n } = e(),\n a = n();\n if (Wo.ModelsWithJSONSchemaContext) return Xe.default.createElement(Wo.ModelsWithJSONSchemaContext, null);\n const o = t(\"OAS31Models\", !0),\n s = t(\"JSONSchema202012\"),\n l = t(\"JSONSchema202012Keyword$schema\"),\n i = t(\"JSONSchema202012Keyword$vocabulary\"),\n c = t(\"JSONSchema202012Keyword$id\"),\n u = t(\"JSONSchema202012Keyword$anchor\"),\n d = t(\"JSONSchema202012Keyword$dynamicAnchor\"),\n p = t(\"JSONSchema202012Keyword$ref\"),\n m = t(\"JSONSchema202012Keyword$dynamicRef\"),\n f = t(\"JSONSchema202012Keyword$defs\"),\n h = t(\"JSONSchema202012Keyword$comment\"),\n g = t(\"JSONSchema202012KeywordAllOf\"),\n y = t(\"JSONSchema202012KeywordAnyOf\"),\n S = t(\"JSONSchema202012KeywordOneOf\"),\n _ = t(\"JSONSchema202012KeywordNot\"),\n v = t(\"JSONSchema202012KeywordIf\"),\n b = t(\"JSONSchema202012KeywordThen\"),\n w = t(\"JSONSchema202012KeywordElse\"),\n C = t(\"JSONSchema202012KeywordDependentSchemas\"),\n x = t(\"JSONSchema202012KeywordPrefixItems\"),\n O = t(\"JSONSchema202012KeywordItems\"),\n k = t(\"JSONSchema202012KeywordContains\"),\n N = t(\"JSONSchema202012KeywordProperties\"),\n A = t(\"JSONSchema202012KeywordPatternProperties\"),\n I = t(\"JSONSchema202012KeywordAdditionalProperties\"),\n R = t(\"JSONSchema202012KeywordPropertyNames\"),\n T = t(\"JSONSchema202012KeywordUnevaluatedItems\"),\n B = t(\"JSONSchema202012KeywordUnevaluatedProperties\"),\n j = t(\"JSONSchema202012KeywordType\"),\n P = t(\"JSONSchema202012KeywordEnum\"),\n M = t(\"JSONSchema202012KeywordConst\"),\n q = t(\"JSONSchema202012KeywordConstraint\"),\n L = t(\"JSONSchema202012KeywordDependentRequired\"),\n D = t(\"JSONSchema202012KeywordContentSchema\"),\n U = t(\"JSONSchema202012KeywordTitle\"),\n $ = t(\"JSONSchema202012KeywordDescription\"),\n J = t(\"JSONSchema202012KeywordDefault\"),\n V = t(\"JSONSchema202012KeywordDeprecated\"),\n K = t(\"JSONSchema202012KeywordReadOnly\"),\n z = t(\"JSONSchema202012KeywordWriteOnly\"),\n F = t(\"JSONSchema202012Accordion\"),\n W = t(\"JSONSchema202012ExpandDeepButton\"),\n H = t(\"JSONSchema202012ChevronRightIcon\"),\n G = t(\"withJSONSchema202012Context\");\n return Wo.ModelsWithJSONSchemaContext = G(o, {\n config: {\n default$schema: \"https://spec.openapis.org/oas/3.1/dialect/base\",\n defaultExpandedLevels: a.defaultModelsExpandDepth - 1,\n includeReadOnly: !0,\n includeWriteOnly: !0\n },\n components: {\n JSONSchema: s,\n Keyword$schema: l,\n Keyword$vocabulary: i,\n Keyword$id: c,\n Keyword$anchor: u,\n Keyword$dynamicAnchor: d,\n Keyword$ref: p,\n Keyword$dynamicRef: m,\n Keyword$defs: f,\n Keyword$comment: h,\n KeywordAllOf: g,\n KeywordAnyOf: y,\n KeywordOneOf: S,\n KeywordNot: _,\n KeywordIf: v,\n KeywordThen: b,\n KeywordElse: w,\n KeywordDependentSchemas: C,\n KeywordPrefixItems: x,\n KeywordItems: O,\n KeywordContains: k,\n KeywordProperties: N,\n KeywordPatternProperties: A,\n KeywordAdditionalProperties: I,\n KeywordPropertyNames: R,\n KeywordUnevaluatedItems: T,\n KeywordUnevaluatedProperties: B,\n KeywordType: j,\n KeywordEnum: P,\n KeywordConst: M,\n KeywordConstraint: q,\n KeywordDependentRequired: L,\n KeywordContentSchema: D,\n KeywordTitle: U,\n KeywordDescription: $,\n KeywordDefault: J,\n KeywordDeprecated: V,\n KeywordReadOnly: K,\n KeywordWriteOnly: z,\n Accordion: F,\n ExpandDeepButton: W,\n ChevronRightIcon: H\n },\n fn: {\n upperFirst: r.upperFirst,\n isExpandable: r.jsonSchema202012.isExpandable,\n getProperties: r.jsonSchema202012.getProperties\n }\n }), Xe.default.createElement(Wo.ModelsWithJSONSchemaContext, null);\n});\nWo.ModelsWithJSONSchemaContext = null;\nvar Ho = Wo;\nvar wrap_components_version_pragma_filter = (e, t) => e => {\n const r = t.specSelectors.isOAS31(),\n n = t.getComponent(\"OAS31VersionPragmaFilter\");\n return Xe.default.createElement(n, (0, cr.default)({\n isOAS31: r\n }, e));\n};\nconst Go = createOnlyOAS31ComponentWrapper(({\n originalComponent: e,\n ...t\n}) => {\n const {\n getComponent: r,\n schema: n\n } = t,\n a = r(\"MutualTLSAuth\", !0);\n return \"mutualTLS\" === n.get(\"type\") ? Xe.default.createElement(a, {\n schema: n\n }) : Xe.default.createElement(e, t);\n});\nvar Xo = Go;\nvar Yo = createOnlyOAS31ComponentWrapper(({\n getSystem: e,\n ...t\n}) => {\n const r = e().getComponent(\"OAS31Auths\", !0);\n return Xe.default.createElement(r, t);\n});\nconst Qo = (0, Qe.Map)(),\n Zo = (0, Dt.createSelector)((e, t) => t.specSelectors.specJson(), isOAS31),\n selectors_webhooks = () => e => {\n const t = e.specSelectors.specJson().get(\"webhooks\");\n return Qe.Map.isMap(t) ? t : Qo;\n },\n es = (0, Dt.createSelector)([(e, t) => t.specSelectors.webhooks(), (e, t) => t.specSelectors.validOperationMethods(), (e, t) => t.specSelectors.specResolvedSubtree([\"webhooks\"])], (e, t) => e.reduce((e, r, n) => {\n if (!Qe.Map.isMap(r)) return e;\n const a = r.entrySeq().filter(([e]) => t.includes(e)).map(([e, t]) => ({\n operation: (0, Qe.Map)({\n operation: t\n }),\n method: e,\n path: n,\n specPath: [\"webhooks\", n, e]\n }));\n return e.concat(a);\n }, (0, Qe.List)()).groupBy(e => e.path).map(e => e.toArray()).toObject()),\n selectors_license = () => e => {\n const t = e.specSelectors.info().get(\"license\");\n return Qe.Map.isMap(t) ? t : Qo;\n },\n selectLicenseNameField = () => e => e.specSelectors.license().get(\"name\", \"License\"),\n selectLicenseUrlField = () => e => e.specSelectors.license().get(\"url\"),\n ts = (0, Dt.createSelector)([(e, t) => t.specSelectors.url(), (e, t) => t.oas3Selectors.selectedServer(), (e, t) => t.specSelectors.selectLicenseUrlField()], (e, t, r) => {\n if (r) return safeBuildUrl(r, e, {\n selectedServer: t\n });\n }),\n selectLicenseIdentifierField = () => e => e.specSelectors.license().get(\"identifier\"),\n selectors_contact = () => e => {\n const t = e.specSelectors.info().get(\"contact\");\n return Qe.Map.isMap(t) ? t : Qo;\n },\n selectContactNameField = () => e => e.specSelectors.contact().get(\"name\", \"the developer\"),\n selectContactEmailField = () => e => e.specSelectors.contact().get(\"email\"),\n selectContactUrlField = () => e => e.specSelectors.contact().get(\"url\"),\n rs = (0, Dt.createSelector)([(e, t) => t.specSelectors.url(), (e, t) => t.oas3Selectors.selectedServer(), (e, t) => t.specSelectors.selectContactUrlField()], (e, t, r) => {\n if (r) return safeBuildUrl(r, e, {\n selectedServer: t\n });\n }),\n selectInfoTitleField = () => e => e.specSelectors.info().get(\"title\"),\n selectInfoSummaryField = () => e => e.specSelectors.info().get(\"summary\"),\n selectInfoDescriptionField = () => e => e.specSelectors.info().get(\"description\"),\n selectInfoTermsOfServiceField = () => e => e.specSelectors.info().get(\"termsOfService\"),\n ns = (0, Dt.createSelector)([(e, t) => t.specSelectors.url(), (e, t) => t.oas3Selectors.selectedServer(), (e, t) => t.specSelectors.selectInfoTermsOfServiceField()], (e, t, r) => {\n if (r) return safeBuildUrl(r, e, {\n selectedServer: t\n });\n }),\n selectExternalDocsDescriptionField = () => e => e.specSelectors.externalDocs().get(\"description\"),\n selectExternalDocsUrlField = () => e => e.specSelectors.externalDocs().get(\"url\"),\n as = (0, Dt.createSelector)([(e, t) => t.specSelectors.url(), (e, t) => t.oas3Selectors.selectedServer(), (e, t) => t.specSelectors.selectExternalDocsUrlField()], (e, t, r) => {\n if (r) return safeBuildUrl(r, e, {\n selectedServer: t\n });\n }),\n selectJsonSchemaDialectField = () => e => e.specSelectors.specJson().get(\"jsonSchemaDialect\"),\n selectJsonSchemaDialectDefault = () => \"https://spec.openapis.org/oas/3.1/dialect/base\",\n os = (0, Dt.createSelector)((e, t) => t.specSelectors.definitions(), (e, t) => t.specSelectors.specResolvedSubtree([\"components\", \"schemas\"]), (e, t) => Qe.Map.isMap(e) ? Qe.Map.isMap(t) ? Object.entries(e.toJS()).reduce((e, [r, n]) => {\n const a = t.get(r);\n return e[r] = a?.toJS() || n, e;\n }, {}) : e.toJS() : {}),\n wrap_selectors_isOAS3 = (e, t) => (r, ...n) => t.specSelectors.isOAS31() || e(...n),\n ss = createOnlyOAS31SelectorWrapper(() => (e, t) => t.oas31Selectors.selectLicenseUrl()),\n ls = createOnlyOAS31SelectorWrapper(() => (e, t) => {\n const r = t.specSelectors.securityDefinitions();\n let n = e();\n return r ? (r.entrySeq().forEach(([e, t]) => {\n \"mutualTLS\" === t.get(\"type\") && (n = n.push(new Qe.Map({\n [e]: t\n })));\n }), n) : n;\n }),\n is = (0, Dt.createSelector)([(e, t) => t.specSelectors.url(), (e, t) => t.oas3Selectors.selectedServer(), (e, t) => t.specSelectors.selectLicenseUrlField(), (e, t) => t.specSelectors.selectLicenseIdentifierField()], (e, t, r, n) => r ? safeBuildUrl(r, e, {\n selectedServer: t\n }) : n ? `https://spdx.org/licenses/${n}.html` : void 0);\nvar keywords_Example = ({\n schema: e,\n getSystem: t\n}) => {\n const {\n fn: r\n } = t(),\n {\n hasKeyword: n,\n stringify: a\n } = r.jsonSchema202012.useFn();\n return n(e, \"example\") ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"Example\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"\n }, a(e.example))) : null;\n};\nvar keywords_Xml = ({\n schema: e,\n getSystem: t\n}) => {\n const r = e?.xml || {},\n {\n fn: n,\n getComponent: a\n } = t(),\n {\n useIsExpandedDeeply: o,\n useComponent: s\n } = n.jsonSchema202012,\n l = o(),\n i = !!(r.name || r.namespace || r.prefix),\n [c, u] = (0, Xe.useState)(l),\n [d, p] = (0, Xe.useState)(!1),\n m = s(\"Accordion\"),\n f = s(\"ExpandDeepButton\"),\n h = a(\"JSONSchema202012DeepExpansionContext\")(),\n g = (0, Xe.useCallback)(() => {\n u(e => !e);\n }, []),\n y = (0, Xe.useCallback)((e, t) => {\n u(t), p(t);\n }, []);\n return 0 === Object.keys(r).length ? null : Xe.default.createElement(h.Provider, {\n value: d\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\"\n }, i ? Xe.default.createElement(Xe.default.Fragment, null, Xe.default.createElement(m, {\n expanded: c,\n onChange: g\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"XML\")), Xe.default.createElement(f, {\n expanded: c,\n onClick: y\n })) : Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"XML\"), !0 === r.attribute && Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"\n }, \"attribute\"), !0 === r.wrapped && Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"\n }, \"wrapped\"), Xe.default.createElement(\"strong\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, \"object\"), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !c\n })\n }, c && Xe.default.createElement(Xe.default.Fragment, null, r.name && Xe.default.createElement(\"li\", {\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"name\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n }, r.name))), r.namespace && Xe.default.createElement(\"li\", {\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"namespace\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n }, r.namespace))), r.prefix && Xe.default.createElement(\"li\", {\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"prefix\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n }, r.prefix)))))));\n};\nvar Discriminator_DiscriminatorMapping = ({\n discriminator: e\n}) => {\n const t = e?.mapping || {};\n return 0 === Object.keys(t).length ? null : Object.entries(t).map(([e, t]) => Xe.default.createElement(\"div\", {\n key: `${e}-${t}`,\n className: \"json-schema-2020-12-keyword\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, e), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n }, t)));\n};\nvar Discriminator_Discriminator = ({\n schema: e,\n getSystem: t\n}) => {\n const r = e?.discriminator || {},\n {\n fn: n,\n getComponent: a\n } = t(),\n {\n useIsExpandedDeeply: o,\n useComponent: s\n } = n.jsonSchema202012,\n l = o(),\n i = !!r.mapping,\n [c, u] = (0, Xe.useState)(l),\n [d, p] = (0, Xe.useState)(!1),\n m = s(\"Accordion\"),\n f = s(\"ExpandDeepButton\"),\n h = a(\"JSONSchema202012DeepExpansionContext\")(),\n g = (0, Xe.useCallback)(() => {\n u(e => !e);\n }, []),\n y = (0, Xe.useCallback)((e, t) => {\n u(t), p(t);\n }, []);\n return 0 === Object.keys(r).length ? null : Xe.default.createElement(h.Provider, {\n value: d\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\"\n }, i ? Xe.default.createElement(Xe.default.Fragment, null, Xe.default.createElement(m, {\n expanded: c,\n onChange: g\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"Discriminator\")), Xe.default.createElement(f, {\n expanded: c,\n onClick: y\n })) : Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"Discriminator\"), r.propertyName && Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"\n }, r.propertyName), Xe.default.createElement(\"strong\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, \"object\"), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !c\n })\n }, c && Xe.default.createElement(\"li\", {\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(Discriminator_DiscriminatorMapping, {\n discriminator: r\n })))));\n};\nvar keywords_ExternalDocs = ({\n schema: e,\n getSystem: t\n}) => {\n const r = e?.externalDocs || {},\n {\n fn: n,\n getComponent: a\n } = t(),\n {\n useIsExpandedDeeply: o,\n useComponent: s\n } = n.jsonSchema202012,\n l = o(),\n i = !(!r.description && !r.url),\n [c, u] = (0, Xe.useState)(l),\n [d, p] = (0, Xe.useState)(!1),\n m = s(\"Accordion\"),\n f = s(\"ExpandDeepButton\"),\n h = a(\"JSONSchema202012KeywordDescription\"),\n g = a(\"Link\"),\n y = a(\"JSONSchema202012DeepExpansionContext\")(),\n S = (0, Xe.useCallback)(() => {\n u(e => !e);\n }, []),\n _ = (0, Xe.useCallback)((e, t) => {\n u(t), p(t);\n }, []);\n return 0 === Object.keys(r).length ? null : Xe.default.createElement(y.Provider, {\n value: d\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\"\n }, i ? Xe.default.createElement(Xe.default.Fragment, null, Xe.default.createElement(m, {\n expanded: c,\n onChange: S\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"External documentation\")), Xe.default.createElement(f, {\n expanded: c,\n onClick: _\n })) : Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"External documentation\"), Xe.default.createElement(\"strong\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, \"object\"), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !c\n })\n }, c && Xe.default.createElement(Xe.default.Fragment, null, r.description && Xe.default.createElement(\"li\", {\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(h, {\n schema: r,\n getSystem: t\n })), r.url && Xe.default.createElement(\"li\", {\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"url\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n }, Xe.default.createElement(g, {\n target: \"_blank\",\n href: sanitizeUrl(r.url)\n }, r.url))))))));\n};\nvar keywords_Description = ({\n schema: e,\n getSystem: t\n}) => {\n if (!e?.description) return null;\n const {\n getComponent: r\n } = t(),\n n = r(\"Markdown\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"\n }, Xe.default.createElement(n, {\n source: e.description\n })));\n};\nvar cs = createOnlyOAS31ComponentWrapper(keywords_Description);\nconst us = createOnlyOAS31ComponentWrapper(({\n schema: e,\n getSystem: t,\n originalComponent: r\n}) => {\n const {\n getComponent: n\n } = t(),\n a = n(\"JSONSchema202012KeywordDiscriminator\"),\n o = n(\"JSONSchema202012KeywordXml\"),\n s = n(\"JSONSchema202012KeywordExample\"),\n l = n(\"JSONSchema202012KeywordExternalDocs\");\n return Xe.default.createElement(Xe.default.Fragment, null, Xe.default.createElement(r, {\n schema: e\n }), Xe.default.createElement(a, {\n schema: e,\n getSystem: t\n }), Xe.default.createElement(o, {\n schema: e,\n getSystem: t\n }), Xe.default.createElement(l, {\n schema: e,\n getSystem: t\n }), Xe.default.createElement(s, {\n schema: e,\n getSystem: t\n }));\n});\nvar ds = us;\nvar keywords_Properties = ({\n schema: e,\n getSystem: t\n}) => {\n const {\n fn: r\n } = t(),\n {\n useComponent: n\n } = r.jsonSchema202012,\n {\n getDependentRequired: a,\n getProperties: o\n } = r.jsonSchema202012.useFn(),\n s = r.jsonSchema202012.useConfig(),\n l = Array.isArray(e?.required) ? e.required : [],\n i = n(\"JSONSchema\"),\n c = o(e, s);\n return 0 === Object.keys(c).length ? null : Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"\n }, Xe.default.createElement(\"ul\", null, Object.entries(c).map(([t, r]) => {\n const n = l.includes(t),\n o = a(t, e);\n return Xe.default.createElement(\"li\", {\n key: t,\n className: (0, _r.default)(\"json-schema-2020-12-property\", {\n \"json-schema-2020-12-property--required\": n\n })\n }, Xe.default.createElement(i, {\n name: t,\n schema: r,\n dependentRequired: o\n }));\n })));\n};\nvar ps = createOnlyOAS31ComponentWrapper(keywords_Properties);\nconst getProperties = (e, {\n includeReadOnly: t,\n includeWriteOnly: r\n}) => {\n if (!e?.properties) return {};\n const n = Object.entries(e.properties).filter(([, e]) => (!(!0 === e?.readOnly) || t) && (!(!0 === e?.writeOnly) || r));\n return Object.fromEntries(n);\n};\nvar ms = function oas31_after_load_afterLoad({\n fn: e,\n getSystem: t\n}) {\n if (e.jsonSchema202012) {\n const r = ((e, t) => {\n const {\n fn: r\n } = t();\n if (\"function\" != typeof e) return null;\n const {\n hasKeyword: n\n } = r.jsonSchema202012;\n return t => e(t) || n(t, \"example\") || t?.xml || t?.discriminator || t?.externalDocs;\n })(e.jsonSchema202012.isExpandable, t);\n Object.assign(this.fn.jsonSchema202012, {\n isExpandable: r,\n getProperties\n });\n }\n if (\"function\" == typeof e.sampleFromSchema && e.jsonSchema202012) {\n const r = ((e, t) => {\n const {\n fn: r,\n specSelectors: n\n } = t;\n return Object.fromEntries(Object.entries(e).map(([e, t]) => {\n const a = r[e];\n return [e, (...e) => n.isOAS31() ? t(...e) : \"function\" == typeof a ? a(...e) : void 0];\n }));\n })({\n sampleFromSchema: e.jsonSchema202012.sampleFromSchema,\n sampleFromSchemaGeneric: e.jsonSchema202012.sampleFromSchemaGeneric,\n createXMLExample: e.jsonSchema202012.createXMLExample,\n memoizedSampleFromSchema: e.jsonSchema202012.memoizedSampleFromSchema,\n memoizedCreateXMLExample: e.jsonSchema202012.memoizedCreateXMLExample,\n getJsonSampleSchema: e.jsonSchema202012.getJsonSampleSchema,\n getYamlSampleSchema: e.jsonSchema202012.getYamlSampleSchema,\n getXmlSampleSchema: e.jsonSchema202012.getXmlSampleSchema,\n getSampleSchema: e.jsonSchema202012.getSampleSchema,\n mergeJsonSchema: e.jsonSchema202012.mergeJsonSchema\n }, t());\n Object.assign(this.fn, r);\n }\n};\nvar oas31 = ({\n fn: e\n}) => {\n const t = e.createSystemSelector || fn_createSystemSelector,\n r = e.createOnlyOAS31Selector || fn_createOnlyOAS31Selector;\n return {\n afterLoad: ms,\n fn: {\n isOAS31,\n createSystemSelector: fn_createSystemSelector,\n createOnlyOAS31Selector: fn_createOnlyOAS31Selector\n },\n components: {\n Webhooks: webhooks,\n JsonSchemaDialect: json_schema_dialect,\n MutualTLSAuth: mutual_tls_auth,\n OAS31Info: oas31_components_info,\n OAS31License: components_license,\n OAS31Contact: components_contact,\n OAS31VersionPragmaFilter: version_pragma_filter,\n OAS31Model: Uo,\n OAS31Models: models,\n OAS31Auths: $o,\n JSONSchema202012KeywordExample: keywords_Example,\n JSONSchema202012KeywordXml: keywords_Xml,\n JSONSchema202012KeywordDiscriminator: Discriminator_Discriminator,\n JSONSchema202012KeywordExternalDocs: keywords_ExternalDocs\n },\n wrapComponents: {\n InfoContainer: Ko,\n License: Jo,\n Contact: Vo,\n VersionPragmaFilter: wrap_components_version_pragma_filter,\n Model: Fo,\n Models: Ho,\n AuthItem: Xo,\n auths: Yo,\n JSONSchema202012KeywordDescription: cs,\n JSONSchema202012KeywordDefault: ds,\n JSONSchema202012KeywordProperties: ps\n },\n statePlugins: {\n auth: {\n wrapSelectors: {\n definitionsToAuthorize: ls\n }\n },\n spec: {\n selectors: {\n isOAS31: t(Zo),\n license: selectors_license,\n selectLicenseNameField,\n selectLicenseUrlField,\n selectLicenseIdentifierField: r(selectLicenseIdentifierField),\n selectLicenseUrl: t(ts),\n contact: selectors_contact,\n selectContactNameField,\n selectContactEmailField,\n selectContactUrlField,\n selectContactUrl: t(rs),\n selectInfoTitleField,\n selectInfoSummaryField: r(selectInfoSummaryField),\n selectInfoDescriptionField,\n selectInfoTermsOfServiceField,\n selectInfoTermsOfServiceUrl: t(ns),\n selectExternalDocsDescriptionField,\n selectExternalDocsUrlField,\n selectExternalDocsUrl: t(as),\n webhooks: r(selectors_webhooks),\n selectWebhooksOperations: r(t(es)),\n selectJsonSchemaDialectField,\n selectJsonSchemaDialectDefault,\n selectSchemas: t(os)\n },\n wrapSelectors: {\n isOAS3: wrap_selectors_isOAS3,\n selectLicenseUrl: ss\n }\n },\n oas31: {\n selectors: {\n selectLicenseUrl: r(t(is))\n }\n }\n }\n };\n};\nconst fs = Kt.default.object,\n hs = Kt.default.bool,\n gs = (Kt.default.oneOfType([fs, hs]), (0, Xe.createContext)(null));\ngs.displayName = \"JSONSchemaContext\";\nconst ys = (0, Xe.createContext)(0);\nys.displayName = \"JSONSchemaLevelContext\";\nconst Es = (0, Xe.createContext)(!1);\nEs.displayName = \"JSONSchemaDeepExpansionContext\";\nconst Ss = (0, Xe.createContext)(new Set()),\n useConfig = () => {\n const {\n config: e\n } = (0, Xe.useContext)(gs);\n return e;\n },\n useComponent = e => {\n const {\n components: t\n } = (0, Xe.useContext)(gs);\n return t[e] || null;\n },\n useFn = (e = void 0) => {\n const {\n fn: t\n } = (0, Xe.useContext)(gs);\n return void 0 !== e ? t[e] : t;\n },\n useLevel = () => {\n const e = (0, Xe.useContext)(ys);\n return [e, e + 1];\n },\n useIsExpanded = () => {\n const [e] = useLevel(),\n {\n defaultExpandedLevels: t\n } = useConfig();\n return t - e > 0;\n },\n useIsExpandedDeeply = () => (0, Xe.useContext)(Es),\n useRenderedSchemas = (e = void 0) => {\n if (void 0 === e) return (0, Xe.useContext)(Ss);\n const t = (0, Xe.useContext)(Ss);\n return new Set([...t, e]);\n },\n _s = (0, Xe.forwardRef)(({\n schema: e,\n name: t = \"\",\n dependentRequired: r = [],\n onExpand: n = () => {}\n }, a) => {\n const o = useFn(),\n s = useIsExpanded(),\n l = useIsExpandedDeeply(),\n [i, c] = (0, Xe.useState)(s || l),\n [u, d] = (0, Xe.useState)(l),\n [p, m] = useLevel(),\n f = (() => {\n const [e] = useLevel();\n return e > 0;\n })(),\n h = o.isExpandable(e) || r.length > 0,\n g = (e => useRenderedSchemas().has(e))(e),\n y = useRenderedSchemas(e),\n S = o.stringifyConstraints(e),\n _ = useComponent(\"Accordion\"),\n v = useComponent(\"Keyword$schema\"),\n b = useComponent(\"Keyword$vocabulary\"),\n w = useComponent(\"Keyword$id\"),\n C = useComponent(\"Keyword$anchor\"),\n x = useComponent(\"Keyword$dynamicAnchor\"),\n O = useComponent(\"Keyword$ref\"),\n k = useComponent(\"Keyword$dynamicRef\"),\n N = useComponent(\"Keyword$defs\"),\n A = useComponent(\"Keyword$comment\"),\n I = useComponent(\"KeywordAllOf\"),\n R = useComponent(\"KeywordAnyOf\"),\n T = useComponent(\"KeywordOneOf\"),\n B = useComponent(\"KeywordNot\"),\n j = useComponent(\"KeywordIf\"),\n P = useComponent(\"KeywordThen\"),\n M = useComponent(\"KeywordElse\"),\n q = useComponent(\"KeywordDependentSchemas\"),\n L = useComponent(\"KeywordPrefixItems\"),\n D = useComponent(\"KeywordItems\"),\n U = useComponent(\"KeywordContains\"),\n $ = useComponent(\"KeywordProperties\"),\n J = useComponent(\"KeywordPatternProperties\"),\n V = useComponent(\"KeywordAdditionalProperties\"),\n K = useComponent(\"KeywordPropertyNames\"),\n z = useComponent(\"KeywordUnevaluatedItems\"),\n F = useComponent(\"KeywordUnevaluatedProperties\"),\n W = useComponent(\"KeywordType\"),\n H = useComponent(\"KeywordEnum\"),\n G = useComponent(\"KeywordConst\"),\n X = useComponent(\"KeywordConstraint\"),\n Y = useComponent(\"KeywordDependentRequired\"),\n Q = useComponent(\"KeywordContentSchema\"),\n Z = useComponent(\"KeywordTitle\"),\n ee = useComponent(\"KeywordDescription\"),\n te = useComponent(\"KeywordDefault\"),\n re = useComponent(\"KeywordDeprecated\"),\n ne = useComponent(\"KeywordReadOnly\"),\n ae = useComponent(\"KeywordWriteOnly\"),\n oe = useComponent(\"ExpandDeepButton\");\n (0, Xe.useEffect)(() => {\n d(l);\n }, [l]), (0, Xe.useEffect)(() => {\n d(u);\n }, [u]);\n const se = (0, Xe.useCallback)((e, t) => {\n c(t), !t && d(!1), n(e, t, !1);\n }, [n]),\n le = (0, Xe.useCallback)((e, t) => {\n c(t), d(t), n(e, t, !0);\n }, [n]);\n return Xe.default.createElement(ys.Provider, {\n value: m\n }, Xe.default.createElement(Es.Provider, {\n value: u\n }, Xe.default.createElement(Ss.Provider, {\n value: y\n }, Xe.default.createElement(\"article\", {\n ref: a,\n \"data-json-schema-level\": p,\n className: (0, _r.default)(\"json-schema-2020-12\", {\n \"json-schema-2020-12--embedded\": f,\n \"json-schema-2020-12--circular\": g\n })\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-head\"\n }, h && !g ? Xe.default.createElement(Xe.default.Fragment, null, Xe.default.createElement(_, {\n expanded: i,\n onChange: se\n }, Xe.default.createElement(Z, {\n title: t,\n schema: e\n })), Xe.default.createElement(oe, {\n expanded: i,\n onClick: le\n })) : Xe.default.createElement(Z, {\n title: t,\n schema: e\n }), Xe.default.createElement(re, {\n schema: e\n }), Xe.default.createElement(ne, {\n schema: e\n }), Xe.default.createElement(ae, {\n schema: e\n }), Xe.default.createElement(W, {\n schema: e,\n isCircular: g\n }), S.length > 0 && S.map(e => Xe.default.createElement(X, {\n key: `${e.scope}-${e.value}`,\n constraint: e\n }))), Xe.default.createElement(\"div\", {\n className: (0, _r.default)(\"json-schema-2020-12-body\", {\n \"json-schema-2020-12-body--collapsed\": !i\n })\n }, i && Xe.default.createElement(Xe.default.Fragment, null, Xe.default.createElement(ee, {\n schema: e\n }), !g && h && Xe.default.createElement(Xe.default.Fragment, null, Xe.default.createElement($, {\n schema: e\n }), Xe.default.createElement(J, {\n schema: e\n }), Xe.default.createElement(V, {\n schema: e\n }), Xe.default.createElement(F, {\n schema: e\n }), Xe.default.createElement(K, {\n schema: e\n }), Xe.default.createElement(I, {\n schema: e\n }), Xe.default.createElement(R, {\n schema: e\n }), Xe.default.createElement(T, {\n schema: e\n }), Xe.default.createElement(B, {\n schema: e\n }), Xe.default.createElement(j, {\n schema: e\n }), Xe.default.createElement(P, {\n schema: e\n }), Xe.default.createElement(M, {\n schema: e\n }), Xe.default.createElement(q, {\n schema: e\n }), Xe.default.createElement(L, {\n schema: e\n }), Xe.default.createElement(D, {\n schema: e\n }), Xe.default.createElement(z, {\n schema: e\n }), Xe.default.createElement(U, {\n schema: e\n }), Xe.default.createElement(Q, {\n schema: e\n })), Xe.default.createElement(H, {\n schema: e\n }), Xe.default.createElement(G, {\n schema: e\n }), Xe.default.createElement(Y, {\n schema: e,\n dependentRequired: r\n }), Xe.default.createElement(te, {\n schema: e\n }), Xe.default.createElement(v, {\n schema: e\n }), Xe.default.createElement(b, {\n schema: e\n }), Xe.default.createElement(w, {\n schema: e\n }), Xe.default.createElement(C, {\n schema: e\n }), Xe.default.createElement(x, {\n schema: e\n }), Xe.default.createElement(O, {\n schema: e\n }), !g && h && Xe.default.createElement(N, {\n schema: e\n }), Xe.default.createElement(k, {\n schema: e\n }), Xe.default.createElement(A, {\n schema: e\n })))))));\n });\nvar vs = _s;\nvar keywords_$schema = ({\n schema: e\n}) => e?.$schema ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n}, \"$schema\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n}, e.$schema)) : null;\nvar $vocabulary_$vocabulary = ({\n schema: e\n}) => {\n const t = useIsExpanded(),\n r = useIsExpandedDeeply(),\n [n, a] = (0, Xe.useState)(t || r),\n o = useComponent(\"Accordion\"),\n s = (0, Xe.useCallback)(() => {\n a(e => !e);\n }, []);\n return e?.$vocabulary ? \"object\" != typeof e.$vocabulary ? null : Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"\n }, Xe.default.createElement(o, {\n expanded: n,\n onChange: s\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"$vocabulary\")), Xe.default.createElement(\"strong\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, \"object\"), Xe.default.createElement(\"ul\", null, n && Object.entries(e.$vocabulary).map(([e, t]) => Xe.default.createElement(\"li\", {\n key: e,\n className: (0, _r.default)(\"json-schema-2020-12-$vocabulary-uri\", {\n \"json-schema-2020-12-$vocabulary-uri--disabled\": !t\n })\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n }, e))))) : null;\n};\nvar keywords_$id = ({\n schema: e\n}) => e?.$id ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n}, \"$id\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n}, e.$id)) : null;\nvar keywords_$anchor = ({\n schema: e\n}) => e?.$anchor ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n}, \"$anchor\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n}, e.$anchor)) : null;\nvar keywords_$dynamicAnchor = ({\n schema: e\n}) => e?.$dynamicAnchor ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n}, \"$dynamicAnchor\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n}, e.$dynamicAnchor)) : null;\nvar keywords_$ref = ({\n schema: e\n}) => e?.$ref ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n}, \"$ref\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n}, e.$ref)) : null;\nvar keywords_$dynamicRef = ({\n schema: e\n}) => e?.$dynamicRef ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n}, \"$dynamicRef\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n}, e.$dynamicRef)) : null;\nvar keywords_$defs = ({\n schema: e\n}) => {\n const t = e?.$defs || {},\n r = useIsExpanded(),\n n = useIsExpandedDeeply(),\n [a, o] = (0, Xe.useState)(r || n),\n [s, l] = (0, Xe.useState)(!1),\n i = useComponent(\"Accordion\"),\n c = useComponent(\"ExpandDeepButton\"),\n u = useComponent(\"JSONSchema\"),\n d = (0, Xe.useCallback)(() => {\n o(e => !e);\n }, []),\n p = (0, Xe.useCallback)((e, t) => {\n o(t), l(t);\n }, []);\n return 0 === Object.keys(t).length ? null : Xe.default.createElement(Es.Provider, {\n value: s\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\"\n }, Xe.default.createElement(i, {\n expanded: a,\n onChange: d\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n }, \"$defs\")), Xe.default.createElement(c, {\n expanded: a,\n onClick: p\n }), Xe.default.createElement(\"strong\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, \"object\"), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !a\n })\n }, a && Xe.default.createElement(Xe.default.Fragment, null, Object.entries(t).map(([e, t]) => Xe.default.createElement(\"li\", {\n key: e,\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(u, {\n name: e,\n schema: t\n })))))));\n};\nvar keywords_$comment = ({\n schema: e\n}) => e?.$comment ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"\n}, \"$comment\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"\n}, e.$comment)) : null;\nvar keywords_AllOf = ({\n schema: e\n}) => {\n const t = e?.allOf || [],\n r = useFn(),\n n = useIsExpanded(),\n a = useIsExpandedDeeply(),\n [o, s] = (0, Xe.useState)(n || a),\n [l, i] = (0, Xe.useState)(!1),\n c = useComponent(\"Accordion\"),\n u = useComponent(\"ExpandDeepButton\"),\n d = useComponent(\"JSONSchema\"),\n p = useComponent(\"KeywordType\"),\n m = (0, Xe.useCallback)(() => {\n s(e => !e);\n }, []),\n f = (0, Xe.useCallback)((e, t) => {\n s(t), i(t);\n }, []);\n return Array.isArray(t) && 0 !== t.length ? Xe.default.createElement(Es.Provider, {\n value: l\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\"\n }, Xe.default.createElement(c, {\n expanded: o,\n onChange: m\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"All of\")), Xe.default.createElement(u, {\n expanded: o,\n onClick: f\n }), Xe.default.createElement(p, {\n schema: {\n allOf: t\n }\n }), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !o\n })\n }, o && Xe.default.createElement(Xe.default.Fragment, null, t.map((e, t) => Xe.default.createElement(\"li\", {\n key: `#${t}`,\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(d, {\n name: `#${t} ${r.getTitle(e)}`,\n schema: e\n }))))))) : null;\n};\nvar keywords_AnyOf = ({\n schema: e\n}) => {\n const t = e?.anyOf || [],\n r = useFn(),\n n = useIsExpanded(),\n a = useIsExpandedDeeply(),\n [o, s] = (0, Xe.useState)(n || a),\n [l, i] = (0, Xe.useState)(!1),\n c = useComponent(\"Accordion\"),\n u = useComponent(\"ExpandDeepButton\"),\n d = useComponent(\"JSONSchema\"),\n p = useComponent(\"KeywordType\"),\n m = (0, Xe.useCallback)(() => {\n s(e => !e);\n }, []),\n f = (0, Xe.useCallback)((e, t) => {\n s(t), i(t);\n }, []);\n return Array.isArray(t) && 0 !== t.length ? Xe.default.createElement(Es.Provider, {\n value: l\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\"\n }, Xe.default.createElement(c, {\n expanded: o,\n onChange: m\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Any of\")), Xe.default.createElement(u, {\n expanded: o,\n onClick: f\n }), Xe.default.createElement(p, {\n schema: {\n anyOf: t\n }\n }), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !o\n })\n }, o && Xe.default.createElement(Xe.default.Fragment, null, t.map((e, t) => Xe.default.createElement(\"li\", {\n key: `#${t}`,\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(d, {\n name: `#${t} ${r.getTitle(e)}`,\n schema: e\n }))))))) : null;\n};\nvar keywords_OneOf = ({\n schema: e\n}) => {\n const t = e?.oneOf || [],\n r = useFn(),\n n = useIsExpanded(),\n a = useIsExpandedDeeply(),\n [o, s] = (0, Xe.useState)(n || a),\n [l, i] = (0, Xe.useState)(!1),\n c = useComponent(\"Accordion\"),\n u = useComponent(\"ExpandDeepButton\"),\n d = useComponent(\"JSONSchema\"),\n p = useComponent(\"KeywordType\"),\n m = (0, Xe.useCallback)(() => {\n s(e => !e);\n }, []),\n f = (0, Xe.useCallback)((e, t) => {\n s(t), i(t);\n }, []);\n return Array.isArray(t) && 0 !== t.length ? Xe.default.createElement(Es.Provider, {\n value: l\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\"\n }, Xe.default.createElement(c, {\n expanded: o,\n onChange: m\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"One of\")), Xe.default.createElement(u, {\n expanded: o,\n onClick: f\n }), Xe.default.createElement(p, {\n schema: {\n oneOf: t\n }\n }), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !o\n })\n }, o && Xe.default.createElement(Xe.default.Fragment, null, t.map((e, t) => Xe.default.createElement(\"li\", {\n key: `#${t}`,\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(d, {\n name: `#${t} ${r.getTitle(e)}`,\n schema: e\n }))))))) : null;\n};\nvar keywords_Not = ({\n schema: e\n}) => {\n const t = useFn(),\n r = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"not\")) return null;\n const n = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Not\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"\n }, Xe.default.createElement(r, {\n name: n,\n schema: e.not\n }));\n};\nvar keywords_If = ({\n schema: e\n}) => {\n const t = useFn(),\n r = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"if\")) return null;\n const n = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"If\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"\n }, Xe.default.createElement(r, {\n name: n,\n schema: e.if\n }));\n};\nvar keywords_Then = ({\n schema: e\n}) => {\n const t = useFn(),\n r = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"then\")) return null;\n const n = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Then\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"\n }, Xe.default.createElement(r, {\n name: n,\n schema: e.then\n }));\n};\nvar keywords_Else = ({\n schema: e\n}) => {\n const t = useFn(),\n r = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"else\")) return null;\n const n = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Else\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"\n }, Xe.default.createElement(r, {\n name: n,\n schema: e.else\n }));\n};\nvar keywords_DependentSchemas = ({\n schema: e\n}) => {\n const t = e?.dependentSchemas || [],\n r = useIsExpanded(),\n n = useIsExpandedDeeply(),\n [a, o] = (0, Xe.useState)(r || n),\n [s, l] = (0, Xe.useState)(!1),\n i = useComponent(\"Accordion\"),\n c = useComponent(\"ExpandDeepButton\"),\n u = useComponent(\"JSONSchema\"),\n d = (0, Xe.useCallback)(() => {\n o(e => !e);\n }, []),\n p = (0, Xe.useCallback)((e, t) => {\n o(t), l(t);\n }, []);\n return \"object\" != typeof t || 0 === Object.keys(t).length ? null : Xe.default.createElement(Es.Provider, {\n value: s\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\"\n }, Xe.default.createElement(i, {\n expanded: a,\n onChange: d\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Dependent schemas\")), Xe.default.createElement(c, {\n expanded: a,\n onClick: p\n }), Xe.default.createElement(\"strong\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, \"object\"), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !a\n })\n }, a && Xe.default.createElement(Xe.default.Fragment, null, Object.entries(t).map(([e, t]) => Xe.default.createElement(\"li\", {\n key: e,\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(u, {\n name: e,\n schema: t\n })))))));\n};\nvar keywords_PrefixItems = ({\n schema: e\n}) => {\n const t = e?.prefixItems || [],\n r = useFn(),\n n = useIsExpanded(),\n a = useIsExpandedDeeply(),\n [o, s] = (0, Xe.useState)(n || a),\n [l, i] = (0, Xe.useState)(!1),\n c = useComponent(\"Accordion\"),\n u = useComponent(\"ExpandDeepButton\"),\n d = useComponent(\"JSONSchema\"),\n p = useComponent(\"KeywordType\"),\n m = (0, Xe.useCallback)(() => {\n s(e => !e);\n }, []),\n f = (0, Xe.useCallback)((e, t) => {\n s(t), i(t);\n }, []);\n return Array.isArray(t) && 0 !== t.length ? Xe.default.createElement(Es.Provider, {\n value: l\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\"\n }, Xe.default.createElement(c, {\n expanded: o,\n onChange: m\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Prefix items\")), Xe.default.createElement(u, {\n expanded: o,\n onClick: f\n }), Xe.default.createElement(p, {\n schema: {\n prefixItems: t\n }\n }), Xe.default.createElement(\"ul\", {\n className: (0, _r.default)(\"json-schema-2020-12-keyword__children\", {\n \"json-schema-2020-12-keyword__children--collapsed\": !o\n })\n }, o && Xe.default.createElement(Xe.default.Fragment, null, t.map((e, t) => Xe.default.createElement(\"li\", {\n key: `#${t}`,\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(d, {\n name: `#${t} ${r.getTitle(e)}`,\n schema: e\n }))))))) : null;\n};\nvar keywords_Items = ({\n schema: e\n}) => {\n const t = useFn(),\n r = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"items\")) return null;\n const n = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Items\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"\n }, Xe.default.createElement(r, {\n name: n,\n schema: e.items\n }));\n};\nvar keywords_Contains = ({\n schema: e\n}) => {\n const t = useFn(),\n r = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"contains\")) return null;\n const n = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Contains\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"\n }, Xe.default.createElement(r, {\n name: n,\n schema: e.contains\n }));\n};\nvar keywords_Properties_Properties = ({\n schema: e\n}) => {\n const t = useFn(),\n r = e?.properties || {},\n n = Array.isArray(e?.required) ? e.required : [],\n a = useComponent(\"JSONSchema\");\n return 0 === Object.keys(r).length ? null : Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"\n }, Xe.default.createElement(\"ul\", null, Object.entries(r).map(([r, o]) => {\n const s = n.includes(r),\n l = t.getDependentRequired(r, e);\n return Xe.default.createElement(\"li\", {\n key: r,\n className: (0, _r.default)(\"json-schema-2020-12-property\", {\n \"json-schema-2020-12-property--required\": s\n })\n }, Xe.default.createElement(a, {\n name: r,\n schema: o,\n dependentRequired: l\n }));\n })));\n};\nvar PatternProperties_PatternProperties = ({\n schema: e\n}) => {\n const t = e?.patternProperties || {},\n r = useComponent(\"JSONSchema\");\n return 0 === Object.keys(t).length ? null : Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"\n }, Xe.default.createElement(\"ul\", null, Object.entries(t).map(([e, t]) => Xe.default.createElement(\"li\", {\n key: e,\n className: \"json-schema-2020-12-property\"\n }, Xe.default.createElement(r, {\n name: e,\n schema: t\n })))));\n};\nvar keywords_AdditionalProperties = ({\n schema: e\n}) => {\n const t = useFn(),\n {\n additionalProperties: r\n } = e,\n n = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"additionalProperties\")) return null;\n const a = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Additional properties\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"\n }, !0 === r ? Xe.default.createElement(Xe.default.Fragment, null, a, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, \"allowed\")) : !1 === r ? Xe.default.createElement(Xe.default.Fragment, null, a, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, \"forbidden\")) : Xe.default.createElement(n, {\n name: a,\n schema: r\n }));\n};\nvar keywords_PropertyNames = ({\n schema: e\n}) => {\n const t = useFn(),\n {\n propertyNames: r\n } = e,\n n = useComponent(\"JSONSchema\"),\n a = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Property names\");\n return t.hasKeyword(e, \"propertyNames\") ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"\n }, Xe.default.createElement(n, {\n name: a,\n schema: r\n })) : null;\n};\nvar keywords_UnevaluatedItems = ({\n schema: e\n}) => {\n const t = useFn(),\n {\n unevaluatedItems: r\n } = e,\n n = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"unevaluatedItems\")) return null;\n const a = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Unevaluated items\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"\n }, Xe.default.createElement(n, {\n name: a,\n schema: r\n }));\n};\nvar keywords_UnevaluatedProperties = ({\n schema: e\n}) => {\n const t = useFn(),\n {\n unevaluatedProperties: r\n } = e,\n n = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"unevaluatedProperties\")) return null;\n const a = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Unevaluated properties\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"\n }, Xe.default.createElement(n, {\n name: a,\n schema: r\n }));\n};\nvar keywords_Type = ({\n schema: e,\n isCircular: t = !1\n}) => {\n const r = useFn().getType(e),\n n = t ? \" [circular]\" : \"\";\n return Xe.default.createElement(\"strong\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"\n }, `${r}${n}`);\n};\nvar Enum_Enum = ({\n schema: e\n}) => {\n const t = useFn();\n return Array.isArray(e?.enum) ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Allowed values\"), Xe.default.createElement(\"ul\", null, e.enum.map(e => {\n const r = t.stringify(e);\n return Xe.default.createElement(\"li\", {\n key: r\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"\n }, r));\n }))) : null;\n};\nvar keywords_Const = ({\n schema: e\n}) => {\n const t = useFn();\n return t.hasKeyword(e, \"const\") ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Const\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"\n }, t.stringify(e.const))) : null;\n};\nconst Constraint = ({\n constraint: e\n}) => Xe.default.createElement(\"span\", {\n className: `json-schema-2020-12__constraint json-schema-2020-12__constraint--${e.scope}`\n}, e.value);\nvar bs = Xe.default.memo(Constraint);\nvar DependentRequired_DependentRequired = ({\n dependentRequired: e\n}) => 0 === e.length ? null : Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n}, \"Required when defined\"), Xe.default.createElement(\"ul\", null, e.map(e => Xe.default.createElement(\"li\", {\n key: e\n}, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"\n}, e)))));\nvar keywords_ContentSchema = ({\n schema: e\n}) => {\n const t = useFn(),\n r = useComponent(\"JSONSchema\");\n if (!t.hasKeyword(e, \"contentSchema\")) return null;\n const n = Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Content schema\");\n return Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"\n }, Xe.default.createElement(r, {\n name: n,\n schema: e.contentSchema\n }));\n};\nvar Title_Title = ({\n title: e = \"\",\n schema: t\n}) => {\n const r = useFn(),\n n = e || r.getTitle(t);\n return n ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12__title\"\n }, n) : null;\n};\nvar keywords_Description_Description = ({\n schema: e\n}) => e?.description ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"\n}, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"\n}, e.description)) : null;\nvar keywords_Default = ({\n schema: e\n}) => {\n const t = useFn();\n return t.hasKeyword(e, \"default\") ? Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"\n }, Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"\n }, \"Default\"), Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--const\"\n }, t.stringify(e.default))) : null;\n};\nvar keywords_Deprecated = ({\n schema: e\n}) => !0 !== e?.deprecated ? null : Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"\n}, \"deprecated\");\nvar keywords_ReadOnly = ({\n schema: e\n}) => !0 !== e?.readOnly ? null : Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"\n}, \"read-only\");\nvar keywords_WriteOnly = ({\n schema: e\n}) => !0 !== e?.writeOnly ? null : Xe.default.createElement(\"span\", {\n className: \"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"\n}, \"write-only\");\nvar Accordion_Accordion = ({\n expanded: e = !1,\n children: t,\n onChange: r\n}) => {\n const n = useComponent(\"ChevronRightIcon\"),\n a = (0, Xe.useCallback)(t => {\n r(t, !e);\n }, [e, r]);\n return Xe.default.createElement(\"button\", {\n type: \"button\",\n className: \"json-schema-2020-12-accordion\",\n onClick: a\n }, Xe.default.createElement(\"div\", {\n className: \"json-schema-2020-12-accordion__children\"\n }, t), Xe.default.createElement(\"span\", {\n className: (0, _r.default)(\"json-schema-2020-12-accordion__icon\", {\n \"json-schema-2020-12-accordion__icon--expanded\": e,\n \"json-schema-2020-12-accordion__icon--collapsed\": !e\n })\n }, Xe.default.createElement(n, null)));\n};\nvar ExpandDeepButton_ExpandDeepButton = ({\n expanded: e,\n onClick: t\n}) => {\n const r = (0, Xe.useCallback)(r => {\n t(r, !e);\n }, [e, t]);\n return Xe.default.createElement(\"button\", {\n type: \"button\",\n className: \"json-schema-2020-12-expand-deep-button\",\n onClick: r\n }, e ? \"Collapse all\" : \"Expand all\");\n};\nvar icons_ChevronRight = () => Xe.default.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\"\n}, Xe.default.createElement(\"path\", {\n d: \"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"\n}));\nconst fn_upperFirst = e => \"string\" == typeof e ? `${e.charAt(0).toUpperCase()}${e.slice(1)}` : e,\n getTitle = (e, {\n lookup: t = \"extended\"\n } = {}) => {\n const r = useFn();\n if (null != e?.title) return r.upperFirst(String(e.title));\n if (\"extended\" === t) {\n if (null != e?.$anchor) return r.upperFirst(String(e.$anchor));\n if (null != e?.$id) return String(e.$id);\n }\n return \"\";\n },\n getType = (e, t = new WeakSet()) => {\n const r = useFn();\n if (null == e) return \"any\";\n if (r.isBooleanJSONSchema(e)) return e ? \"any\" : \"never\";\n if (\"object\" != typeof e) return \"any\";\n if (t.has(e)) return \"any\";\n t.add(e);\n const {\n type: n,\n prefixItems: a,\n items: o\n } = e,\n getArrayType = () => {\n if (Array.isArray(a)) {\n const e = a.map(e => getType(e, t)),\n r = o ? getType(o, t) : \"any\";\n return `array<[${e.join(\", \")}], ${r}>`;\n }\n if (o) {\n return `array<${getType(o, t)}>`;\n }\n return \"array\";\n };\n if (e.not && \"any\" === getType(e.not)) return \"never\";\n const handleCombiningKeywords = (r, n) => {\n if (Array.isArray(e[r])) {\n return `(${e[r].map(e => getType(e, t)).join(n)})`;\n }\n return null;\n },\n s = [Array.isArray(n) ? n.map(e => \"array\" === e ? getArrayType() : e).join(\" | \") : \"array\" === n ? getArrayType() : [\"null\", \"boolean\", \"object\", \"array\", \"number\", \"integer\", \"string\"].includes(n) ? n : (() => {\n if (Object.hasOwn(e, \"prefixItems\") || Object.hasOwn(e, \"items\") || Object.hasOwn(e, \"contains\")) return getArrayType();\n if (Object.hasOwn(e, \"properties\") || Object.hasOwn(e, \"additionalProperties\") || Object.hasOwn(e, \"patternProperties\")) return \"object\";\n if ([\"int32\", \"int64\"].includes(e.format)) return \"integer\";\n if ([\"float\", \"double\"].includes(e.format)) return \"number\";\n if (Object.hasOwn(e, \"minimum\") || Object.hasOwn(e, \"maximum\") || Object.hasOwn(e, \"exclusiveMinimum\") || Object.hasOwn(e, \"exclusiveMaximum\") || Object.hasOwn(e, \"multipleOf\")) return \"number | integer\";\n if (Object.hasOwn(e, \"pattern\") || Object.hasOwn(e, \"format\") || Object.hasOwn(e, \"minLength\") || Object.hasOwn(e, \"maxLength\")) return \"string\";\n if (void 0 !== e.const) {\n if (null === e.const) return \"null\";\n if (\"boolean\" == typeof e.const) return \"boolean\";\n if (\"number\" == typeof e.const) return Number.isInteger(e.const) ? \"integer\" : \"number\";\n if (\"string\" == typeof e.const) return \"string\";\n if (Array.isArray(e.const)) return \"array\";\n if (\"object\" == typeof e.const) return \"object\";\n }\n return null;\n })(), handleCombiningKeywords(\"oneOf\", \" | \"), handleCombiningKeywords(\"anyOf\", \" | \"), handleCombiningKeywords(\"allOf\", \" & \")].filter(Boolean).join(\" | \");\n return t.delete(e), s || \"any\";\n },\n isBooleanJSONSchema = e => \"boolean\" == typeof e,\n hasKeyword = (e, t) => null !== e && \"object\" == typeof e && Object.hasOwn(e, t),\n isExpandable = e => {\n const t = useFn();\n return e?.$schema || e?.$vocabulary || e?.$id || e?.$anchor || e?.$dynamicAnchor || e?.$ref || e?.$dynamicRef || e?.$defs || e?.$comment || e?.allOf || e?.anyOf || e?.oneOf || t.hasKeyword(e, \"not\") || t.hasKeyword(e, \"if\") || t.hasKeyword(e, \"then\") || t.hasKeyword(e, \"else\") || e?.dependentSchemas || e?.prefixItems || t.hasKeyword(e, \"items\") || t.hasKeyword(e, \"contains\") || e?.properties || e?.patternProperties || t.hasKeyword(e, \"additionalProperties\") || t.hasKeyword(e, \"propertyNames\") || t.hasKeyword(e, \"unevaluatedItems\") || t.hasKeyword(e, \"unevaluatedProperties\") || e?.description || e?.enum || t.hasKeyword(e, \"const\") || t.hasKeyword(e, \"contentSchema\") || t.hasKeyword(e, \"default\");\n },\n fn_stringify = e => null === e || [\"number\", \"bigint\", \"boolean\"].includes(typeof e) ? String(e) : Array.isArray(e) ? `[${e.map(fn_stringify).join(\", \")}]` : JSON.stringify(e),\n stringifyConstraintRange = (e, t, r) => {\n const n = \"number\" == typeof t,\n a = \"number\" == typeof r;\n return n && a ? t === r ? `${t} ${e}` : `[${t}, ${r}] ${e}` : n ? `>= ${t} ${e}` : a ? `<= ${r} ${e}` : null;\n },\n stringifyConstraints = e => {\n const t = [],\n r = (e => {\n if (\"number\" != typeof e?.multipleOf) return null;\n if (e.multipleOf <= 0) return null;\n if (1 === e.multipleOf) return null;\n const {\n multipleOf: t\n } = e;\n if (Number.isInteger(t)) return `multiple of ${t}`;\n const r = 10 ** t.toString().split(\".\")[1].length;\n return `multiple of ${t * r}/${r}`;\n })(e);\n null !== r && t.push({\n scope: \"number\",\n value: r\n });\n const n = (e => {\n const t = e?.minimum,\n r = e?.maximum,\n n = e?.exclusiveMinimum,\n a = e?.exclusiveMaximum,\n o = \"number\" == typeof t,\n s = \"number\" == typeof r,\n l = \"number\" == typeof n,\n i = \"number\" == typeof a,\n c = l && (!o || t < n),\n u = i && (!s || r > a);\n if ((o || l) && (s || i)) return `${c ? \"(\" : \"[\"}${c ? n : t}, ${u ? a : r}${u ? \")\" : \"]\"}`;\n if (o || l) return `${c ? \">\" : \"≥\"} ${c ? n : t}`;\n if (s || i) return `${u ? \"<\" : \"≤\"} ${u ? a : r}`;\n return null;\n })(e);\n null !== n && t.push({\n scope: \"number\",\n value: n\n }), e?.format && t.push({\n scope: \"string\",\n value: e.format\n });\n const a = stringifyConstraintRange(\"characters\", e?.minLength, e?.maxLength);\n null !== a && t.push({\n scope: \"string\",\n value: a\n }), e?.pattern && t.push({\n scope: \"string\",\n value: `matches ${e?.pattern}`\n }), e?.contentMediaType && t.push({\n scope: \"string\",\n value: `media type: ${e.contentMediaType}`\n }), e?.contentEncoding && t.push({\n scope: \"string\",\n value: `encoding: ${e.contentEncoding}`\n });\n const o = stringifyConstraintRange(e?.hasUniqueItems ? \"unique items\" : \"items\", e?.minItems, e?.maxItems);\n null !== o && t.push({\n scope: \"array\",\n value: o\n });\n const s = stringifyConstraintRange(\"contained items\", e?.minContains, e?.maxContains);\n null !== s && t.push({\n scope: \"array\",\n value: s\n });\n const l = stringifyConstraintRange(\"properties\", e?.minProperties, e?.maxProperties);\n return null !== l && t.push({\n scope: \"object\",\n value: l\n }), t;\n },\n getDependentRequired = (e, t) => t?.dependentRequired ? Array.from(Object.entries(t.dependentRequired).reduce((t, [r, n]) => Array.isArray(n) && n.includes(e) ? (t.add(r), t) : t, new Set())) : [],\n withJSONSchemaContext = (e, t = {}) => {\n const r = {\n components: {\n JSONSchema: vs,\n Keyword$schema: keywords_$schema,\n Keyword$vocabulary: $vocabulary_$vocabulary,\n Keyword$id: keywords_$id,\n Keyword$anchor: keywords_$anchor,\n Keyword$dynamicAnchor: keywords_$dynamicAnchor,\n Keyword$ref: keywords_$ref,\n Keyword$dynamicRef: keywords_$dynamicRef,\n Keyword$defs: keywords_$defs,\n Keyword$comment: keywords_$comment,\n KeywordAllOf: keywords_AllOf,\n KeywordAnyOf: keywords_AnyOf,\n KeywordOneOf: keywords_OneOf,\n KeywordNot: keywords_Not,\n KeywordIf: keywords_If,\n KeywordThen: keywords_Then,\n KeywordElse: keywords_Else,\n KeywordDependentSchemas: keywords_DependentSchemas,\n KeywordPrefixItems: keywords_PrefixItems,\n KeywordItems: keywords_Items,\n KeywordContains: keywords_Contains,\n KeywordProperties: keywords_Properties_Properties,\n KeywordPatternProperties: PatternProperties_PatternProperties,\n KeywordAdditionalProperties: keywords_AdditionalProperties,\n KeywordPropertyNames: keywords_PropertyNames,\n KeywordUnevaluatedItems: keywords_UnevaluatedItems,\n KeywordUnevaluatedProperties: keywords_UnevaluatedProperties,\n KeywordType: keywords_Type,\n KeywordEnum: Enum_Enum,\n KeywordConst: keywords_Const,\n KeywordConstraint: bs,\n KeywordDependentRequired: DependentRequired_DependentRequired,\n KeywordContentSchema: keywords_ContentSchema,\n KeywordTitle: Title_Title,\n KeywordDescription: keywords_Description_Description,\n KeywordDefault: keywords_Default,\n KeywordDeprecated: keywords_Deprecated,\n KeywordReadOnly: keywords_ReadOnly,\n KeywordWriteOnly: keywords_WriteOnly,\n Accordion: Accordion_Accordion,\n ExpandDeepButton: ExpandDeepButton_ExpandDeepButton,\n ChevronRightIcon: icons_ChevronRight,\n ...t.components\n },\n config: {\n default$schema: \"https://json-schema.org/draft/2020-12/schema\",\n defaultExpandedLevels: 0,\n ...t.config\n },\n fn: {\n upperFirst: fn_upperFirst,\n getTitle,\n getType,\n isBooleanJSONSchema,\n hasKeyword,\n isExpandable,\n stringify: fn_stringify,\n stringifyConstraints,\n getDependentRequired,\n ...t.fn\n }\n },\n HOC = t => Xe.default.createElement(gs.Provider, {\n value: r\n }, Xe.default.createElement(e, t));\n return HOC.contexts = {\n JSONSchemaContext: gs\n }, HOC.displayName = e.displayName, HOC;\n };\nvar json_schema_2020_12 = () => ({\n components: {\n JSONSchema202012: vs,\n JSONSchema202012Keyword$schema: keywords_$schema,\n JSONSchema202012Keyword$vocabulary: $vocabulary_$vocabulary,\n JSONSchema202012Keyword$id: keywords_$id,\n JSONSchema202012Keyword$anchor: keywords_$anchor,\n JSONSchema202012Keyword$dynamicAnchor: keywords_$dynamicAnchor,\n JSONSchema202012Keyword$ref: keywords_$ref,\n JSONSchema202012Keyword$dynamicRef: keywords_$dynamicRef,\n JSONSchema202012Keyword$defs: keywords_$defs,\n JSONSchema202012Keyword$comment: keywords_$comment,\n JSONSchema202012KeywordAllOf: keywords_AllOf,\n JSONSchema202012KeywordAnyOf: keywords_AnyOf,\n JSONSchema202012KeywordOneOf: keywords_OneOf,\n JSONSchema202012KeywordNot: keywords_Not,\n JSONSchema202012KeywordIf: keywords_If,\n JSONSchema202012KeywordThen: keywords_Then,\n JSONSchema202012KeywordElse: keywords_Else,\n JSONSchema202012KeywordDependentSchemas: keywords_DependentSchemas,\n JSONSchema202012KeywordPrefixItems: keywords_PrefixItems,\n JSONSchema202012KeywordItems: keywords_Items,\n JSONSchema202012KeywordContains: keywords_Contains,\n JSONSchema202012KeywordProperties: keywords_Properties_Properties,\n JSONSchema202012KeywordPatternProperties: PatternProperties_PatternProperties,\n JSONSchema202012KeywordAdditionalProperties: keywords_AdditionalProperties,\n JSONSchema202012KeywordPropertyNames: keywords_PropertyNames,\n JSONSchema202012KeywordUnevaluatedItems: keywords_UnevaluatedItems,\n JSONSchema202012KeywordUnevaluatedProperties: keywords_UnevaluatedProperties,\n JSONSchema202012KeywordType: keywords_Type,\n JSONSchema202012KeywordEnum: Enum_Enum,\n JSONSchema202012KeywordConst: keywords_Const,\n JSONSchema202012KeywordConstraint: bs,\n JSONSchema202012KeywordDependentRequired: DependentRequired_DependentRequired,\n JSONSchema202012KeywordContentSchema: keywords_ContentSchema,\n JSONSchema202012KeywordTitle: Title_Title,\n JSONSchema202012KeywordDescription: keywords_Description_Description,\n JSONSchema202012KeywordDefault: keywords_Default,\n JSONSchema202012KeywordDeprecated: keywords_Deprecated,\n JSONSchema202012KeywordReadOnly: keywords_ReadOnly,\n JSONSchema202012KeywordWriteOnly: keywords_WriteOnly,\n JSONSchema202012Accordion: Accordion_Accordion,\n JSONSchema202012ExpandDeepButton: ExpandDeepButton_ExpandDeepButton,\n JSONSchema202012ChevronRightIcon: icons_ChevronRight,\n withJSONSchema202012Context: withJSONSchemaContext,\n JSONSchema202012DeepExpansionContext: () => Es\n },\n fn: {\n upperFirst: fn_upperFirst,\n jsonSchema202012: {\n isExpandable,\n hasKeyword,\n useFn,\n useConfig,\n useComponent,\n useIsExpandedDeeply\n }\n }\n }),\n ws = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return ve.default;\n }\n });\nvar array = (e, {\n sample: t\n}) => ((e, t = {}) => {\n const {\n minItems: r,\n maxItems: n,\n uniqueItems: a\n } = t,\n {\n contains: o,\n minContains: s,\n maxContains: l\n } = t;\n let i = [...e];\n if (null != o && \"object\" == typeof o) {\n if (Number.isInteger(s) && s > 1) {\n const e = i.at(0);\n for (let t = 1; t < s; t += 1) i.unshift(e);\n }\n Number.isInteger(l);\n }\n if (Number.isInteger(n) && n > 0 && (i = e.slice(0, n)), Number.isInteger(r) && r > 0) for (let e = 0; i.length < r; e += 1) i.push(i[e % i.length]);\n return !0 === a && (i = Array.from(new Set(i))), i;\n})(t, e);\nvar object = () => {\n throw new Error(\"Not implemented\");\n};\nconst bytes = e => vt()(e),\n pick = e => e.at(0),\n predicates_isBooleanJSONSchema = e => \"boolean\" == typeof e,\n isJSONSchemaObject = e => (0, ws.default)(e),\n isJSONSchema = e => predicates_isBooleanJSONSchema(e) || isJSONSchemaObject(e);\nvar Cs = class Registry {\n data = {};\n register(e, t) {\n this.data[e] = t;\n }\n unregister(e) {\n void 0 === e ? this.data = {} : delete this.data[e];\n }\n get(e) {\n return this.data[e];\n }\n};\nvar int32 = () => 2 ** 30 >>> 0;\nvar int64 = () => 2 ** 53 - 1;\nvar generators_float = () => .1;\nvar generators_double = () => .1;\nvar email = () => \"user@example.com\";\nvar idn_email = () => \"실례@example.com\";\nvar hostname = () => \"example.com\";\nvar idn_hostname = () => \"실례.com\";\nvar ipv4 = () => \"198.51.100.42\";\nvar ipv6 = () => \"2001:0db8:5b96:0000:0000:426f:8e17:642a\";\nvar uri = () => \"https://example.com/\";\nvar uri_reference = () => \"path/index.html\";\nvar iri = () => \"https://실례.com/\";\nvar iri_reference = () => \"path/실례.html\";\nvar uuid = () => \"3fa85f64-5717-4562-b3fc-2c963f66afa6\";\nvar uri_template = () => \"https://example.com/dictionary/{term:1}/{term}\";\nvar json_pointer = () => \"/a/b/c\";\nvar relative_json_pointer = () => \"1/0\";\nvar date_time = () => new Date().toISOString();\nvar date = () => new Date().toISOString().substring(0, 10);\nvar time = () => new Date().toISOString().substring(11);\nvar duration = () => \"P3D\";\nvar generators_password = () => \"********\";\nvar regex = () => \"^[a-z]+$\";\nconst xs = new class FormatRegistry extends Cs {\n #e = {\n int32,\n int64,\n float: generators_float,\n double: generators_double,\n email,\n \"idn-email\": idn_email,\n hostname,\n \"idn-hostname\": idn_hostname,\n ipv4,\n ipv6,\n uri,\n \"uri-reference\": uri_reference,\n iri,\n \"iri-reference\": iri_reference,\n uuid,\n \"uri-template\": uri_template,\n \"json-pointer\": json_pointer,\n \"relative-json-pointer\": relative_json_pointer,\n \"date-time\": date_time,\n date,\n time,\n duration,\n password: generators_password,\n regex\n };\n data = {\n ...this.#e\n };\n get defaults() {\n return {\n ...this.#e\n };\n }\n }(),\n formatAPI = (e, t) => \"function\" == typeof t ? xs.register(e, t) : null === t ? xs.unregister(e) : xs.get(e);\nformatAPI.getDefaults = () => xs.defaults;\nvar Os = formatAPI,\n ks = __webpack_require__(287).Buffer;\nvar _7bit = e => ks.from(e).toString(\"ascii\"),\n Ns = __webpack_require__(287).Buffer;\nvar _8bit = e => Ns.from(e).toString(\"utf8\"),\n As = __webpack_require__(287).Buffer;\nvar binary = e => As.from(e).toString(\"binary\");\nvar quoted_printable = e => {\n let t = \"\";\n for (let r = 0; r < e.length; r++) {\n const n = e.charCodeAt(r);\n if (61 === n) t += \"=3D\";else if (n >= 33 && n <= 60 || n >= 62 && n <= 126 || 9 === n || 32 === n) t += e.charAt(r);else if (13 === n || 10 === n) t += \"\\r\\n\";else if (n > 126) {\n const n = unescape(encodeURIComponent(e.charAt(r)));\n for (let e = 0; e < n.length; e++) t += \"=\" + (\"0\" + n.charCodeAt(e).toString(16)).slice(-2).toUpperCase();\n } else t += \"=\" + (\"0\" + n.toString(16)).slice(-2).toUpperCase();\n }\n return t;\n },\n Is = __webpack_require__(287).Buffer;\nvar base16 = e => Is.from(e).toString(\"hex\"),\n Rs = __webpack_require__(287).Buffer;\nvar base32 = e => {\n const t = Rs.from(e).toString(\"utf8\"),\n r = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";\n let n = 0,\n a = \"\",\n o = 0,\n s = 0;\n for (let e = 0; e < t.length; e++) for (o = o << 8 | t.charCodeAt(e), s += 8; s >= 5;) a += r.charAt(o >>> s - 5 & 31), s -= 5;\n s > 0 && (a += r.charAt(o << 5 - s & 31), n = (8 - 8 * t.length % 5) % 5);\n for (let e = 0; e < n; e++) a += \"=\";\n return a;\n },\n Ts = __webpack_require__(287).Buffer;\nvar base64 = e => Ts.from(e).toString(\"base64\"),\n Bs = __webpack_require__(287).Buffer;\nvar base64url = e => Bs.from(e).toString(\"base64url\");\nconst js = new class EncoderRegistry extends Cs {\n #e = {\n \"7bit\": _7bit,\n \"8bit\": _8bit,\n binary,\n \"quoted-printable\": quoted_printable,\n base16,\n base32,\n base64,\n base64url\n };\n data = {\n ...this.#e\n };\n get defaults() {\n return {\n ...this.#e\n };\n }\n }(),\n encoderAPI = (e, t) => \"function\" == typeof t ? js.register(e, t) : null === t ? js.unregister(e) : js.get(e);\nencoderAPI.getDefaults = () => js.defaults;\nvar Ps = encoderAPI;\nvar Ms = {\n \"text/plain\": () => \"string\",\n \"text/css\": () => \".selector { border: 1px solid red }\",\n \"text/csv\": () => \"value1,value2,value3\",\n \"text/html\": () => \"

content

\",\n \"text/calendar\": () => \"BEGIN:VCALENDAR\",\n \"text/javascript\": () => \"console.dir('Hello world!');\",\n \"text/xml\": () => 'John Doe',\n \"text/*\": () => \"string\"\n};\nvar qs = {\n \"image/*\": () => bytes(25).toString(\"binary\")\n};\nvar Ls = {\n \"audio/*\": () => bytes(25).toString(\"binary\")\n};\nvar Ds = {\n \"video/*\": () => bytes(25).toString(\"binary\")\n};\nvar Us = {\n \"application/json\": () => '{\"key\":\"value\"}',\n \"application/ld+json\": () => '{\"name\": \"John Doe\"}',\n \"application/x-httpd-php\": () => \"Hello World!

'; ?>\",\n \"application/rtf\": () => String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\n \"application/x-sh\": () => 'echo \"Hello World!\"',\n \"application/xhtml+xml\": () => \"

content

\",\n \"application/*\": () => bytes(25).toString(\"binary\")\n};\nconst $s = new class MediaTypeRegistry extends Cs {\n #e = {\n ...Ms,\n ...qs,\n ...Ls,\n ...Ds,\n ...Us\n };\n data = {\n ...this.#e\n };\n get defaults() {\n return {\n ...this.#e\n };\n }\n }(),\n mediaTypeAPI = (e, t) => {\n if (\"function\" == typeof t) return $s.register(e, t);\n if (null === t) return $s.unregister(e);\n const r = e.split(\";\").at(0),\n n = `${r.split(\"/\").at(0)}/*`;\n return $s.get(e) || $s.get(r) || $s.get(n);\n };\nmediaTypeAPI.getDefaults = () => $s.defaults;\nvar Js = mediaTypeAPI;\nconst applyStringConstraints = (e, t = {}) => {\n const {\n maxLength: r,\n minLength: n\n } = t;\n let a = e;\n if (Number.isInteger(r) && r > 0 && (a = a.slice(0, r)), Number.isInteger(n) && n > 0) {\n let e = 0;\n for (; a.length < n;) a += a[e++ % a.length];\n }\n return a;\n};\nvar types_string = (e, {\n sample: t\n} = {}) => {\n const {\n contentEncoding: r,\n contentMediaType: n,\n contentSchema: a\n } = e,\n {\n pattern: o,\n format: s\n } = e,\n l = Ps(r) || aa.default;\n let i;\n return i = \"string\" == typeof o ? applyStringConstraints((e => {\n try {\n return new Rr.default(e).gen();\n } catch {\n return \"string\";\n }\n })(o), e) : \"string\" == typeof s ? (e => {\n const {\n format: t\n } = e,\n r = Os(t);\n return \"function\" == typeof r ? r(e) : \"string\";\n })(e) : isJSONSchema(a) && \"string\" == typeof n && void 0 !== t ? Array.isArray(t) || \"object\" == typeof t ? JSON.stringify(t) : applyStringConstraints(String(t), e) : \"string\" == typeof n ? (e => {\n const {\n contentMediaType: t\n } = e,\n r = Js(t);\n return \"function\" == typeof r ? r(e) : \"string\";\n })(e) : applyStringConstraints(\"string\", e), l(i);\n};\nconst applyNumberConstraints = (e, t = {}) => {\n const {\n minimum: r,\n maximum: n,\n exclusiveMinimum: a,\n exclusiveMaximum: o\n } = t,\n {\n multipleOf: s\n } = t,\n l = Number.isInteger(e) ? 1 : Number.EPSILON;\n let i = \"number\" == typeof r ? r : null,\n c = \"number\" == typeof n ? n : null,\n u = e;\n if (\"number\" == typeof a && (i = null !== i ? Math.max(i, a + l) : a + l), \"number\" == typeof o && (c = null !== c ? Math.min(c, o - l) : o - l), u = i > c && e || i || c || u, \"number\" == typeof s && s > 0) {\n const e = u % s;\n u = 0 === e ? u : u + s - e;\n }\n return u;\n};\nvar types_number = e => {\n const {\n format: t\n } = e;\n let r;\n return r = \"string\" == typeof t ? (e => {\n const {\n format: t\n } = e,\n r = Os(t);\n return \"function\" == typeof r ? r(e) : 0;\n })(e) : 0, applyNumberConstraints(r, e);\n};\nvar types_integer = e => {\n const {\n format: t\n } = e;\n let r;\n return r = \"string\" == typeof t ? (e => {\n const {\n format: t\n } = e,\n r = Os(t);\n if (\"function\" == typeof r) return r(e);\n switch (t) {\n case \"int32\":\n return int32();\n case \"int64\":\n return int64();\n }\n return 0;\n })(e) : 0, applyNumberConstraints(r, e);\n};\nvar types_boolean = e => \"boolean\" != typeof e.default || e.default;\nvar Vs = new Proxy({\n array,\n object,\n string: types_string,\n number: types_number,\n integer: types_integer,\n boolean: types_boolean,\n null: () => null\n}, {\n get: (e, t) => \"string\" == typeof t && Object.hasOwn(e, t) ? e[t] : () => `Unknown Type: ${t}`\n});\nconst Ks = [\"array\", \"object\", \"number\", \"integer\", \"string\", \"boolean\", \"null\"],\n hasExample = e => {\n if (!isJSONSchemaObject(e)) return !1;\n const {\n examples: t,\n example: r,\n default: n\n } = e;\n return !!(Array.isArray(t) && t.length >= 1) || void 0 !== n || void 0 !== r;\n },\n extractExample = e => {\n if (!isJSONSchemaObject(e)) return null;\n const {\n examples: t,\n example: r,\n default: n\n } = e;\n return Array.isArray(t) && t.length >= 1 ? t.at(0) : void 0 !== n ? n : void 0 !== r ? r : void 0;\n },\n zs = {\n array: [\"items\", \"prefixItems\", \"contains\", \"maxContains\", \"minContains\", \"maxItems\", \"minItems\", \"uniqueItems\", \"unevaluatedItems\"],\n object: [\"properties\", \"additionalProperties\", \"patternProperties\", \"propertyNames\", \"minProperties\", \"maxProperties\", \"required\", \"dependentSchemas\", \"dependentRequired\", \"unevaluatedProperties\"],\n string: [\"pattern\", \"format\", \"minLength\", \"maxLength\", \"contentEncoding\", \"contentMediaType\", \"contentSchema\"],\n integer: [\"minimum\", \"maximum\", \"exclusiveMinimum\", \"exclusiveMaximum\", \"multipleOf\"]\n };\nzs.number = zs.integer;\nconst Fs = \"string\",\n inferTypeFromValue = e => void 0 === e ? null : null === e ? \"null\" : Array.isArray(e) ? \"array\" : Number.isInteger(e) ? \"integer\" : typeof e,\n foldType = e => {\n if (Array.isArray(e) && e.length >= 1) {\n if (e.includes(\"array\")) return \"array\";\n if (e.includes(\"object\")) return \"object\";\n {\n const t = pick(e);\n if (Ks.includes(t)) return t;\n }\n }\n return Ks.includes(e) ? e : null;\n },\n inferType = (e, t = new WeakSet()) => {\n if (!isJSONSchemaObject(e)) return Fs;\n if (t.has(e)) return Fs;\n t.add(e);\n let {\n type: r,\n const: n\n } = e;\n if (r = foldType(r), \"string\" != typeof r) {\n const t = Object.keys(zs);\n e: for (let n = 0; n < t.length; n += 1) {\n const a = t[n],\n o = zs[a];\n for (let t = 0; t < o.length; t += 1) {\n const n = o[t];\n if (Object.hasOwn(e, n)) {\n r = a;\n break e;\n }\n }\n }\n }\n if (\"string\" != typeof r && void 0 !== n) {\n const e = inferTypeFromValue(n);\n r = \"string\" == typeof e ? e : r;\n }\n if (\"string\" != typeof r) {\n const combineTypes = r => {\n if (Array.isArray(e[r])) {\n const n = e[r].map(e => inferType(e, t));\n return foldType(n);\n }\n return null;\n },\n n = combineTypes(\"allOf\"),\n a = combineTypes(\"anyOf\"),\n o = combineTypes(\"oneOf\"),\n s = e.not ? inferType(e.not, t) : null;\n (n || a || o || s) && (r = foldType([n, a, o, s].filter(Boolean)));\n }\n if (\"string\" != typeof r && hasExample(e)) {\n const t = extractExample(e),\n n = inferTypeFromValue(t);\n r = \"string\" == typeof n ? n : r;\n }\n return t.delete(e), r || Fs;\n },\n type_getType = e => inferType(e),\n typeCast = e => predicates_isBooleanJSONSchema(e) ? (e => !1 === e ? {\n not: {}\n } : {})(e) : isJSONSchemaObject(e) ? e : {},\n merge = (e, t, r = {}) => {\n if (predicates_isBooleanJSONSchema(e) && !0 === e) return !0;\n if (predicates_isBooleanJSONSchema(e) && !1 === e) return !1;\n if (predicates_isBooleanJSONSchema(t) && !0 === t) return !0;\n if (predicates_isBooleanJSONSchema(t) && !1 === t) return !1;\n if (!isJSONSchema(e)) return t;\n if (!isJSONSchema(t)) return e;\n const n = {\n ...t,\n ...e\n };\n if (t.type && e.type && Array.isArray(t.type) && \"string\" == typeof t.type) {\n const r = normalizeArray(t.type).concat(e.type);\n n.type = Array.from(new Set(r));\n }\n if (Array.isArray(t.required) && Array.isArray(e.required) && (n.required = [...new Set([...e.required, ...t.required])]), t.properties && e.properties) {\n const a = new Set([...Object.keys(t.properties), ...Object.keys(e.properties)]);\n n.properties = {};\n for (const o of a) {\n const a = t.properties[o] || {},\n s = e.properties[o] || {};\n a.readOnly && !r.includeReadOnly || a.writeOnly && !r.includeWriteOnly ? n.required = (n.required || []).filter(e => e !== o) : n.properties[o] = merge(s, a, r);\n }\n }\n return isJSONSchema(t.items) && isJSONSchema(e.items) && (n.items = merge(e.items, t.items, r)), isJSONSchema(t.contains) && isJSONSchema(e.contains) && (n.contains = merge(e.contains, t.contains, r)), isJSONSchema(t.contentSchema) && isJSONSchema(e.contentSchema) && (n.contentSchema = merge(e.contentSchema, t.contentSchema, r)), n;\n };\nvar Ws = merge;\nconst main_sampleFromSchemaGeneric = (e, t = {}, r = void 0, n = !1) => {\n if (null == e && void 0 === r) return;\n \"function\" == typeof e?.toJS && (e = e.toJS()), e = typeCast(e);\n let a = void 0 !== r || hasExample(e);\n const o = !a && Array.isArray(e.oneOf) && e.oneOf.length > 0,\n s = !a && Array.isArray(e.anyOf) && e.anyOf.length > 0;\n if (!a && (o || s)) {\n const r = typeCast(pick(o ? e.oneOf : e.anyOf));\n !(e = Ws(e, r, t)).xml && r.xml && (e.xml = r.xml), hasExample(e) && hasExample(r) && (a = !0);\n }\n const l = {};\n let {\n xml: i,\n properties: c,\n additionalProperties: u,\n items: d,\n contains: p\n } = e || {},\n m = type_getType(e),\n {\n includeReadOnly: f,\n includeWriteOnly: h\n } = t;\n i = i || {};\n let g,\n {\n name: y,\n prefix: S,\n namespace: _\n } = i,\n v = {};\n if (Object.hasOwn(e, \"type\") || (e.type = m), n && (y = y || \"notagname\", g = (S ? `${S}:` : \"\") + y, _)) {\n l[S ? `xmlns:${S}` : \"xmlns\"] = _;\n }\n n && (v[g] = []);\n const b = objectify(c);\n let w,\n C = 0;\n const hasExceededMaxProperties = () => Number.isInteger(e.maxProperties) && e.maxProperties > 0 && C >= e.maxProperties,\n canAddProperty = t => !(Number.isInteger(e.maxProperties) && e.maxProperties > 0) || !hasExceededMaxProperties() && (!(t => !Array.isArray(e.required) || 0 === e.required.length || !e.required.includes(t))(t) || e.maxProperties - C - (() => {\n if (!Array.isArray(e.required) || 0 === e.required.length) return 0;\n let t = 0;\n return n ? e.required.forEach(e => t += void 0 === v[e] ? 0 : 1) : e.required.forEach(e => {\n t += void 0 === v[g]?.find(t => void 0 !== t[e]) ? 0 : 1;\n }), e.required.length - t;\n })() > 0);\n if (w = n ? (r, a = void 0) => {\n if (e && b[r]) {\n if (b[r].xml = b[r].xml || {}, b[r].xml.attribute) {\n const e = Array.isArray(b[r].enum) ? pick(b[r].enum) : void 0;\n if (hasExample(b[r])) l[b[r].xml.name || r] = extractExample(b[r]);else if (void 0 !== e) l[b[r].xml.name || r] = e;else {\n const e = typeCast(b[r]),\n t = type_getType(e),\n n = b[r].xml.name || r;\n l[n] = Vs[t](e);\n }\n return;\n }\n b[r].xml.name = b[r].xml.name || r;\n } else b[r] || !1 === u || (b[r] = {\n xml: {\n name: r\n }\n });\n let o = main_sampleFromSchemaGeneric(b[r], t, a, n);\n canAddProperty(r) && (C++, Array.isArray(o) ? v[g] = v[g].concat(o) : v[g].push(o));\n } : (r, a) => {\n if (canAddProperty(r)) {\n if ((0, ws.default)(e.discriminator?.mapping) && e.discriminator.propertyName === r && \"string\" == typeof e.$$ref) {\n for (const t in e.discriminator.mapping) if (-1 !== e.$$ref.search(e.discriminator.mapping[t])) {\n v[r] = t;\n break;\n }\n } else v[r] = main_sampleFromSchemaGeneric(b[r], t, a, n);\n C++;\n }\n }, a) {\n let a;\n if (a = void 0 !== r ? r : extractExample(e), !n) {\n if (\"number\" == typeof a && \"string\" === m) return `${a}`;\n if (\"string\" != typeof a || \"string\" === m) return a;\n try {\n return JSON.parse(a);\n } catch {\n return a;\n }\n }\n if (\"array\" === m) {\n if (!Array.isArray(a)) {\n if (\"string\" == typeof a) return a;\n a = [a];\n }\n let r = [];\n return isJSONSchemaObject(d) && (d.xml = d.xml || i || {}, d.xml.name = d.xml.name || i.name, r = a.map(e => main_sampleFromSchemaGeneric(d, t, e, n))), isJSONSchemaObject(p) && (p.xml = p.xml || i || {}, p.xml.name = p.xml.name || i.name, r = [main_sampleFromSchemaGeneric(p, t, void 0, n), ...r]), r = Vs.array(e, {\n sample: r\n }), i.wrapped ? (v[g] = r, (0, Tr.default)(l) || v[g].push({\n _attr: l\n })) : v = r, v;\n }\n if (\"object\" === m) {\n if (\"string\" == typeof a) return a;\n for (const e in a) Object.hasOwn(a, e) && (b[e]?.readOnly && !f || b[e]?.writeOnly && !h || (b[e]?.xml?.attribute ? l[b[e].xml.name || e] = a[e] : w(e, a[e])));\n return (0, Tr.default)(l) || v[g].push({\n _attr: l\n }), v;\n }\n return v[g] = (0, Tr.default)(l) ? a : [{\n _attr: l\n }, a], v;\n }\n if (\"array\" === m) {\n let r = [];\n if (isJSONSchemaObject(p)) if (n && (p.xml = p.xml || e.xml || {}, p.xml.name = p.xml.name || i.name), Array.isArray(p.anyOf)) {\n const {\n anyOf: e,\n ...a\n } = d;\n r.push(...p.anyOf.map(e => main_sampleFromSchemaGeneric(Ws(e, a, t), t, void 0, n)));\n } else if (Array.isArray(p.oneOf)) {\n const {\n oneOf: e,\n ...a\n } = d;\n r.push(...p.oneOf.map(e => main_sampleFromSchemaGeneric(Ws(e, a, t), t, void 0, n)));\n } else {\n if (!(!n || n && i.wrapped)) return main_sampleFromSchemaGeneric(p, t, void 0, n);\n r.push(main_sampleFromSchemaGeneric(p, t, void 0, n));\n }\n if (isJSONSchemaObject(d)) if (n && (d.xml = d.xml || e.xml || {}, d.xml.name = d.xml.name || i.name), Array.isArray(d.anyOf)) {\n const {\n anyOf: e,\n ...a\n } = d;\n r.push(...d.anyOf.map(e => main_sampleFromSchemaGeneric(Ws(e, a, t), t, void 0, n)));\n } else if (Array.isArray(d.oneOf)) {\n const {\n oneOf: e,\n ...a\n } = d;\n r.push(...d.oneOf.map(e => main_sampleFromSchemaGeneric(Ws(e, a, t), t, void 0, n)));\n } else {\n if (!(!n || n && i.wrapped)) return main_sampleFromSchemaGeneric(d, t, void 0, n);\n r.push(main_sampleFromSchemaGeneric(d, t, void 0, n));\n }\n return r = Vs.array(e, {\n sample: r\n }), n && i.wrapped ? (v[g] = r, (0, Tr.default)(l) || v[g].push({\n _attr: l\n }), v) : r;\n }\n if (\"object\" === m) {\n for (let e in b) Object.hasOwn(b, e) && (b[e]?.deprecated || b[e]?.readOnly && !f || b[e]?.writeOnly && !h || w(e));\n if (n && l && v[g].push({\n _attr: l\n }), hasExceededMaxProperties()) return v;\n if (predicates_isBooleanJSONSchema(u) && u) n ? v[g].push({\n additionalProp: \"Anything can be here\"\n }) : v.additionalProp1 = {}, C++;else if (isJSONSchemaObject(u)) {\n const r = u,\n a = main_sampleFromSchemaGeneric(r, t, void 0, n);\n if (n && \"string\" == typeof r?.xml?.name && \"notagname\" !== r?.xml?.name) v[g].push(a);else {\n const t = Number.isInteger(e.minProperties) && e.minProperties > 0 && C < e.minProperties ? e.minProperties - C : 3;\n for (let e = 1; e <= t; e++) {\n if (hasExceededMaxProperties()) return v;\n if (n) {\n const t = {};\n t[\"additionalProp\" + e] = a.notagname, v[g].push(t);\n } else v[\"additionalProp\" + e] = a;\n C++;\n }\n }\n }\n return v;\n }\n let x;\n if (void 0 !== e.const) x = e.const;else if (e && Array.isArray(e.enum)) x = pick(normalizeArray(e.enum));else {\n const r = isJSONSchemaObject(e.contentSchema) ? main_sampleFromSchemaGeneric(e.contentSchema, t, void 0, n) : void 0;\n x = Vs[m](e, {\n sample: r\n });\n }\n return n ? (v[g] = (0, Tr.default)(l) ? x : [{\n _attr: l\n }, x], v) : x;\n },\n main_createXMLExample = (e, t, r) => {\n const n = main_sampleFromSchemaGeneric(e, t, r, !0);\n if (n) return \"string\" == typeof n ? n : Ir()(n, {\n declaration: !0,\n indent: \"\\t\"\n });\n },\n main_sampleFromSchema = (e, t, r) => main_sampleFromSchemaGeneric(e, t, r, !1),\n main_resolver = (e, t, r) => [e, JSON.stringify(t), JSON.stringify(r)],\n Hs = utils_memoizeN(main_createXMLExample, main_resolver),\n Gs = utils_memoizeN(main_sampleFromSchema, main_resolver);\nconst Xs = new class OptionRegistry extends Cs {\n #e = {};\n data = {\n ...this.#e\n };\n get defaults() {\n return {\n ...this.#e\n };\n }\n}();\nvar api_optionAPI = (e, t) => (void 0 !== t && Xs.register(e, t), Xs.get(e));\nconst Ys = [{\n when: /json/,\n shouldStringifyTypes: [\"string\"]\n }],\n Qs = [\"object\"];\nvar fn_get_json_sample_schema = e => (t, r, n, a) => {\n const {\n fn: o\n } = e(),\n s = o.jsonSchema202012.memoizedSampleFromSchema(t, r, a),\n l = typeof s,\n i = Ys.reduce((e, t) => t.when.test(n) ? [...e, ...t.shouldStringifyTypes] : e, Qs);\n return (0, gt.default)(i, e => e === l) ? JSON.stringify(s, null, 2) : s;\n};\nvar fn_get_yaml_sample_schema = e => (t, r, n, a) => {\n const {\n fn: o\n } = e(),\n s = o.jsonSchema202012.getJsonSampleSchema(t, r, n, a);\n let l;\n try {\n l = Ht.default.dump(Ht.default.load(s), {\n lineWidth: -1\n }, {\n schema: Ht.JSON_SCHEMA\n }), \"\\n\" === l[l.length - 1] && (l = l.slice(0, l.length - 1));\n } catch (e) {\n return console.error(e), \"error: could not generate yaml example\";\n }\n return l.replace(/\\t/g, \" \");\n};\nvar fn_get_xml_sample_schema = e => (t, r, n) => {\n const {\n fn: a\n } = e();\n if (t && !t.xml && (t.xml = {}), t && !t.xml.name) {\n if (!t.$$ref && (t.type || t.items || t.properties || t.additionalProperties)) return '\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';\n if (t.$$ref) {\n let e = t.$$ref.match(/\\S*\\/(\\S+)$/);\n t.xml.name = e[1];\n }\n }\n return a.jsonSchema202012.memoizedCreateXMLExample(t, r, n);\n};\nvar fn_get_sample_schema = e => (t, r = \"\", n = {}, a = void 0) => {\n const {\n fn: o\n } = e();\n return \"function\" == typeof t?.toJS && (t = t.toJS()), \"function\" == typeof a?.toJS && (a = a.toJS()), /xml/.test(r) ? o.jsonSchema202012.getXmlSampleSchema(t, n, a) : /(yaml|yml)/.test(r) ? o.jsonSchema202012.getYamlSampleSchema(t, n, r, a) : o.jsonSchema202012.getJsonSampleSchema(t, n, r, a);\n};\nvar json_schema_2020_12_samples = ({\n getSystem: e\n}) => {\n const t = fn_get_json_sample_schema(e),\n r = fn_get_yaml_sample_schema(e),\n n = fn_get_xml_sample_schema(e),\n a = fn_get_sample_schema(e);\n return {\n fn: {\n jsonSchema202012: {\n sampleFromSchema: main_sampleFromSchema,\n sampleFromSchemaGeneric: main_sampleFromSchemaGeneric,\n sampleOptionAPI: api_optionAPI,\n sampleEncoderAPI: Ps,\n sampleFormatAPI: Os,\n sampleMediaTypeAPI: Js,\n createXMLExample: main_createXMLExample,\n memoizedSampleFromSchema: Gs,\n memoizedCreateXMLExample: Hs,\n getJsonSampleSchema: t,\n getYamlSampleSchema: r,\n getXmlSampleSchema: n,\n getSampleSchema: a,\n mergeJsonSchema: Ws\n }\n }\n };\n};\nfunction PresetApis() {\n return [base, oas3, json_schema_2020_12, json_schema_2020_12_samples, oas31];\n}\nvar inline_plugin = e => () => ({\n fn: e.fn,\n components: e.components\n});\nvar factorization_system = e => {\n const t = et()({\n layout: {\n layout: e.layout,\n filter: e.filter\n },\n spec: {\n spec: \"\",\n url: e.url\n },\n requestSnippets: e.requestSnippets\n }, e.initialState);\n if (e.initialState) for (const [r, n] of Object.entries(e.initialState)) void 0 === n && delete t[r];\n return {\n system: {\n configs: e.configs\n },\n plugins: e.presets,\n state: t\n };\n};\nvar query = () => e => {\n const t = e.queryConfigEnabled ? (() => {\n const e = new URLSearchParams(dt.location.search);\n return Object.fromEntries(e);\n })() : {};\n return Object.entries(t).reduce((e, [t, r]) => (\"config\" === t ? e.configUrl = r : \"urls.primaryName\" === t ? e[t] = r : e = (0, Cn.default)(e, t, r), e), {});\n};\nvar sources_url = ({\n url: e,\n system: t\n}) => async r => {\n if (!e) return {};\n if (\"function\" != typeof t.configsActions?.getConfigByUrl) return {};\n const n = (() => {\n const e = {};\n return e.promise = new Promise((t, r) => {\n e.resolve = t, e.reject = r;\n }), e;\n })();\n return t.configsActions.getConfigByUrl({\n url: e,\n loadRemoteConfig: !0,\n requestInterceptor: r.requestInterceptor,\n responseInterceptor: r.responseInterceptor\n }, e => {\n n.resolve(e);\n }), n.promise;\n};\nvar runtime = () => () => {\n const e = {};\n return globalThis.location && (e.oauth2RedirectUrl = `${globalThis.location.protocol}//${globalThis.location.host}${globalThis.location.pathname.substring(0, globalThis.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`), e;\n};\nvar Zs = Object.freeze({\n dom_id: null,\n domNode: null,\n spec: {},\n url: \"\",\n urls: null,\n configUrl: null,\n layout: \"BaseLayout\",\n docExpansion: \"list\",\n maxDisplayedTags: -1,\n filter: !1,\n validatorUrl: \"https://validator.swagger.io/validator\",\n oauth2RedirectUrl: void 0,\n persistAuthorization: !1,\n configs: {},\n displayOperationId: !1,\n displayRequestDuration: !1,\n deepLinking: !1,\n tryItOutEnabled: !1,\n requestInterceptor: e => (e.curlOptions = [], e),\n responseInterceptor: e => e,\n showMutatedRequest: !0,\n defaultModelRendering: \"example\",\n defaultModelExpandDepth: 1,\n defaultModelsExpandDepth: 1,\n showExtensions: !1,\n showCommonExtensions: !1,\n withCredentials: !1,\n requestSnippetsEnabled: !1,\n requestSnippets: {\n generators: {\n curl_bash: {\n title: \"cURL (bash)\",\n syntax: \"bash\"\n },\n curl_powershell: {\n title: \"cURL (PowerShell)\",\n syntax: \"powershell\"\n },\n curl_cmd: {\n title: \"cURL (CMD)\",\n syntax: \"bash\"\n }\n },\n defaultExpanded: !0,\n languages: null\n },\n supportedSubmitMethods: [\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\", \"trace\"],\n queryConfigEnabled: !1,\n presets: [PresetApis],\n plugins: [],\n initialState: {},\n fn: {},\n components: {},\n syntaxHighlight: {\n activated: !0,\n theme: \"agate\"\n },\n operationsSorter: null,\n tagsSorter: null,\n onComplete: null,\n modelPropertyMacro: null,\n parameterMacro: null\n }),\n el = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return be.default;\n }\n }),\n tl = function (e) {\n var t = {};\n return __webpack_require__.d(t, e), t;\n }({\n default: function () {\n return we.default;\n }\n });\nvar type_casters_array = (e, t = []) => Array.isArray(e) ? e : t;\nvar type_casters_boolean = (e, t = !1) => !0 === e || \"true\" === e || 1 === e || \"1\" === e || !1 !== e && \"false\" !== e && 0 !== e && \"0\" !== e && t;\nvar dom_node = e => null === e || \"null\" === e ? null : e;\nvar type_casters_filter = e => {\n const t = String(e);\n return type_casters_boolean(e, t);\n};\nvar type_casters_function = (e, t) => \"function\" == typeof e ? e : t;\nvar nullable_array = e => Array.isArray(e) ? e : null;\nvar nullable_function = e => \"function\" == typeof e ? e : null;\nvar nullable_string = e => null === e || \"null\" === e ? null : String(e);\nvar type_casters_number = (e, t = -1) => {\n const r = parseInt(e, 10);\n return Number.isNaN(r) ? t : r;\n};\nvar type_casters_object = (e, t = {}) => (0, ws.default)(e) ? e : t;\nvar sorter = e => \"function\" == typeof e || \"string\" == typeof e ? e : null;\nvar type_casters_string = e => String(e);\nvar syntax_highlight = (e, t) => (0, ws.default)(e) ? e : !1 === e || \"false\" === e || 0 === e || \"0\" === e ? {\n activated: !1\n} : t;\nvar undefined_string = e => void 0 === e || \"undefined\" === e ? void 0 : String(e);\nvar rl = {\n components: {\n typeCaster: type_casters_object\n },\n configs: {\n typeCaster: type_casters_object\n },\n configUrl: {\n typeCaster: nullable_string\n },\n deepLinking: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.deepLinking\n },\n defaultModelExpandDepth: {\n typeCaster: type_casters_number,\n defaultValue: Zs.defaultModelExpandDepth\n },\n defaultModelRendering: {\n typeCaster: type_casters_string\n },\n defaultModelsExpandDepth: {\n typeCaster: type_casters_number,\n defaultValue: Zs.defaultModelsExpandDepth\n },\n displayOperationId: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.displayOperationId\n },\n displayRequestDuration: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.displayRequestDuration\n },\n docExpansion: {\n typeCaster: type_casters_string\n },\n dom_id: {\n typeCaster: nullable_string\n },\n domNode: {\n typeCaster: dom_node\n },\n filter: {\n typeCaster: type_casters_filter\n },\n fn: {\n typeCaster: type_casters_object\n },\n initialState: {\n typeCaster: type_casters_object\n },\n layout: {\n typeCaster: type_casters_string\n },\n maxDisplayedTags: {\n typeCaster: type_casters_number,\n defaultValue: Zs.maxDisplayedTags\n },\n modelPropertyMacro: {\n typeCaster: nullable_function\n },\n oauth2RedirectUrl: {\n typeCaster: undefined_string\n },\n onComplete: {\n typeCaster: nullable_function\n },\n operationsSorter: {\n typeCaster: sorter\n },\n paramaterMacro: {\n typeCaster: nullable_function\n },\n persistAuthorization: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.persistAuthorization\n },\n plugins: {\n typeCaster: type_casters_array,\n defaultValue: Zs.plugins\n },\n presets: {\n typeCaster: type_casters_array,\n defaultValue: Zs.presets\n },\n requestInterceptor: {\n typeCaster: type_casters_function,\n defaultValue: Zs.requestInterceptor\n },\n requestSnippets: {\n typeCaster: type_casters_object,\n defaultValue: Zs.requestSnippets\n },\n requestSnippetsEnabled: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.requestSnippetsEnabled\n },\n responseInterceptor: {\n typeCaster: type_casters_function,\n defaultValue: Zs.responseInterceptor\n },\n showCommonExtensions: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.showCommonExtensions\n },\n showExtensions: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.showExtensions\n },\n showMutatedRequest: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.showMutatedRequest\n },\n spec: {\n typeCaster: type_casters_object,\n defaultValue: Zs.spec\n },\n supportedSubmitMethods: {\n typeCaster: type_casters_array,\n defaultValue: Zs.supportedSubmitMethods\n },\n syntaxHighlight: {\n typeCaster: syntax_highlight,\n defaultValue: Zs.syntaxHighlight\n },\n \"syntaxHighlight.activated\": {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.syntaxHighlight.activated\n },\n \"syntaxHighlight.theme\": {\n typeCaster: type_casters_string\n },\n tagsSorter: {\n typeCaster: sorter\n },\n tryItOutEnabled: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.tryItOutEnabled\n },\n url: {\n typeCaster: type_casters_string\n },\n urls: {\n typeCaster: nullable_array\n },\n \"urls.primaryName\": {\n typeCaster: type_casters_string\n },\n validatorUrl: {\n typeCaster: nullable_string\n },\n withCredentials: {\n typeCaster: type_casters_boolean,\n defaultValue: Zs.withCredentials\n }\n};\nvar type_cast = e => Object.entries(rl).reduce((e, [t, {\n typeCaster: r,\n defaultValue: n\n}]) => {\n if ((0, el.default)(e, t)) {\n const a = r((0, ar.default)(e, t), n);\n e = (0, tl.default)(t, a, e);\n }\n return e;\n}, {\n ...e\n});\nvar config_merge = (e, ...t) => {\n let r = Symbol.for(\"domNode\"),\n n = Symbol.for(\"primaryName\");\n const a = [];\n for (const e of t) {\n const t = {\n ...e\n };\n Object.hasOwn(t, \"domNode\") && (r = t.domNode, delete t.domNode), Object.hasOwn(t, \"urls.primaryName\") ? (n = t[\"urls.primaryName\"], delete t[\"urls.primaryName\"]) : Array.isArray(t.urls) && Object.hasOwn(t.urls, \"primaryName\") && (n = t.urls.primaryName, delete t.urls.primaryName), a.push(t);\n }\n const o = et()(e, ...a);\n return r !== Symbol.for(\"domNode\") && (o.domNode = r), n !== Symbol.for(\"primaryName\") && Array.isArray(o.urls) && (o.urls.primaryName = n), type_cast(o);\n};\nfunction SwaggerUI(e) {\n const t = query()(e),\n r = runtime()(),\n n = SwaggerUI.config.merge({}, SwaggerUI.config.defaults, r, e, t),\n a = factorization_system(n),\n o = inline_plugin(n),\n s = new Store(a);\n s.register([n.plugins, o]);\n const l = s.getSystem(),\n persistConfigs = e => {\n s.setConfigs(e), l.configsActions.loaded();\n },\n updateSpec = e => {\n !t.url && \"object\" == typeof e.spec && Object.keys(e.spec).length > 0 ? (l.specActions.updateUrl(\"\"), l.specActions.updateLoadingStatus(\"success\"), l.specActions.updateSpec(JSON.stringify(e.spec))) : \"function\" == typeof l.specActions.download && e.url && !e.urls && (l.specActions.updateUrl(e.url), l.specActions.download(e.url));\n },\n render = e => {\n if (e.domNode) l.render(e.domNode, \"App\");else if (e.dom_id) {\n const t = document.querySelector(e.dom_id);\n l.render(t, \"App\");\n } else null === e.dom_id || null === e.domNode || console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\");\n };\n return n.configUrl ? ((async () => {\n const {\n configUrl: e\n } = n,\n r = await sources_url({\n url: e,\n system: l\n })(n),\n a = SwaggerUI.config.merge({}, n, r, t);\n persistConfigs(a), null !== r && updateSpec(a), render(a);\n })(), l) : (persistConfigs(n), updateSpec(n), render(n), l);\n}\nSwaggerUI.System = Store, SwaggerUI.config = {\n defaults: Zs,\n merge: config_merge,\n typeCast: type_cast,\n typeCastMappings: rl\n}, SwaggerUI.presets = {\n base,\n apis: PresetApis\n}, SwaggerUI.plugins = {\n Auth: auth,\n Configs: configsPlugin,\n DeepLining: deep_linking,\n Err: err,\n Filter: filter,\n Icons: icons,\n JSONSchema5: json_schema_5,\n JSONSchema5Samples: json_schema_5_samples,\n JSONSchema202012: json_schema_2020_12,\n JSONSchema202012Samples: json_schema_2020_12_samples,\n Layout: plugins_layout,\n Logs: logs,\n OpenAPI30: oas3,\n OpenAPI31: oas3,\n OnComplete: on_complete,\n RequestSnippets: plugins_request_snippets,\n Spec: plugins_spec,\n SwaggerClient: swagger_client,\n Util: util,\n View: view,\n ViewLegacy: view_legacy,\n DownloadUrl: downloadUrlPlugin,\n SyntaxHighlighting: syntax_highlighting,\n Versions: versions,\n SafeRender: safe_render\n};\nvar nl = SwaggerUI,\n al = Oe.A;\nexport { al as default };\n","// src/utils/formatProdErrorMessage.ts\nfunction formatProdErrorMessage(code) {\n return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;\n}\n\n// src/utils/symbol-observable.ts\nvar $$observable = /* @__PURE__ */(() => typeof Symbol === \"function\" && Symbol.observable || \"@@observable\")();\nvar symbol_observable_default = $$observable;\n\n// src/utils/actionTypes.ts\nvar randomString = () => Math.random().toString(36).substring(7).split(\"\").join(\".\");\nvar ActionTypes = {\n INIT: `@@redux/INIT${/* @__PURE__ */randomString()}`,\n REPLACE: `@@redux/REPLACE${/* @__PURE__ */randomString()}`,\n PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`\n};\nvar actionTypes_default = ActionTypes;\n\n// src/utils/isPlainObject.ts\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" || obj === null) return false;\n let proto = obj;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;\n}\n\n// src/utils/kindOf.ts\nfunction miniKindOf(val) {\n if (val === void 0) return \"undefined\";\n if (val === null) return \"null\";\n const type = typeof val;\n switch (type) {\n case \"boolean\":\n case \"string\":\n case \"number\":\n case \"symbol\":\n case \"function\":\n {\n return type;\n }\n }\n if (Array.isArray(val)) return \"array\";\n if (isDate(val)) return \"date\";\n if (isError(val)) return \"error\";\n const constructorName = ctorName(val);\n switch (constructorName) {\n case \"Symbol\":\n case \"Promise\":\n case \"WeakMap\":\n case \"WeakSet\":\n case \"Map\":\n case \"Set\":\n return constructorName;\n }\n return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\\s/g, \"\");\n}\nfunction ctorName(val) {\n return typeof val.constructor === \"function\" ? val.constructor.name : null;\n}\nfunction isError(val) {\n return val instanceof Error || typeof val.message === \"string\" && val.constructor && typeof val.constructor.stackTraceLimit === \"number\";\n}\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === \"function\" && typeof val.getDate === \"function\" && typeof val.setDate === \"function\";\n}\nfunction kindOf(val) {\n let typeOfVal = typeof val;\n if (process.env.NODE_ENV !== \"production\") {\n typeOfVal = miniKindOf(val);\n }\n return typeOfVal;\n}\n\n// src/createStore.ts\nfunction createStore(reducer, preloadedState, enhancer) {\n if (typeof reducer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);\n }\n if (typeof preloadedState === \"function\" && typeof enhancer === \"function\" || typeof enhancer === \"function\" && typeof arguments[3] === \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(0) : \"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.\");\n }\n if (typeof preloadedState === \"function\" && typeof enhancer === \"undefined\") {\n enhancer = preloadedState;\n preloadedState = void 0;\n }\n if (typeof enhancer !== \"undefined\") {\n if (typeof enhancer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);\n }\n return enhancer(createStore)(reducer, preloadedState);\n }\n let currentReducer = reducer;\n let currentState = preloadedState;\n let currentListeners = /* @__PURE__ */new Map();\n let nextListeners = currentListeners;\n let listenerIdCounter = 0;\n let isDispatching = false;\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = /* @__PURE__ */new Map();\n currentListeners.forEach((listener, key) => {\n nextListeners.set(key, listener);\n });\n }\n }\n function getState() {\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(3) : \"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");\n }\n return currentState;\n }\n function subscribe(listener) {\n if (typeof listener !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener)}'`);\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(5) : \"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.\");\n }\n let isSubscribed = true;\n ensureCanMutateNextListeners();\n const listenerId = listenerIdCounter++;\n nextListeners.set(listenerId, listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(6) : \"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.\");\n }\n isSubscribed = false;\n ensureCanMutateNextListeners();\n nextListeners.delete(listenerId);\n currentListeners = null;\n };\n }\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(7) : `Actions must be plain objects. Instead, the actual type was: '${kindOf(action)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);\n }\n if (typeof action.type === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(8) : 'Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.');\n }\n if (typeof action.type !== \"string\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(17) : `Action \"type\" property must be a string. Instead, the actual type was: '${kindOf(action.type)}'. Value was: '${action.type}' (stringified)`);\n }\n if (isDispatching) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(9) : \"Reducers may not dispatch actions.\");\n }\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n const listeners = currentListeners = nextListeners;\n listeners.forEach(listener => {\n listener();\n });\n return action;\n }\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== \"function\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);\n }\n currentReducer = nextReducer;\n dispatch({\n type: actionTypes_default.REPLACE\n });\n }\n function observable() {\n const outerSubscribe = subscribe;\n return {\n /**\n * The minimal observable subscription method.\n * @param observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe(observer) {\n if (typeof observer !== \"object\" || observer === null) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);\n }\n function observeState() {\n const observerAsObserver = observer;\n if (observerAsObserver.next) {\n observerAsObserver.next(getState());\n }\n }\n observeState();\n const unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe\n };\n },\n [symbol_observable_default]() {\n return this;\n }\n };\n }\n dispatch({\n type: actionTypes_default.INIT\n });\n const store = {\n dispatch,\n subscribe,\n getState,\n replaceReducer,\n [symbol_observable_default]: observable\n };\n return store;\n}\nfunction legacy_createStore(reducer, preloadedState, enhancer) {\n return createStore(reducer, preloadedState, enhancer);\n}\n\n// src/utils/warning.ts\nfunction warning(message) {\n if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(message);\n }\n try {\n throw new Error(message);\n } catch (e) {}\n}\n\n// src/combineReducers.ts\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n const reducerKeys = Object.keys(reducers);\n const argumentName = action && action.type === actionTypes_default.INIT ? \"preloadedState argument passed to createStore\" : \"previous state received by the reducer\";\n if (reducerKeys.length === 0) {\n return \"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";\n }\n if (!isPlainObject(inputState)) {\n return `The ${argumentName} has unexpected type of \"${kindOf(inputState)}\". Expected argument to be an object with the following keys: \"${reducerKeys.join('\", \"')}\"`;\n }\n const unexpectedKeys = Object.keys(inputState).filter(key => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);\n unexpectedKeys.forEach(key => {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === actionTypes_default.REPLACE) return;\n if (unexpectedKeys.length > 0) {\n return `Unexpected ${unexpectedKeys.length > 1 ? \"keys\" : \"key\"} \"${unexpectedKeys.join('\", \"')}\" found in ${argumentName}. Expected to find one of the known reducer keys instead: \"${reducerKeys.join('\", \"')}\". Unexpected keys will be ignored.`;\n }\n}\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(key => {\n const reducer = reducers[key];\n const initialState = reducer(void 0, {\n type: actionTypes_default.INIT\n });\n if (typeof initialState === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(12) : `The slice reducer for key \"${key}\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);\n }\n if (typeof reducer(void 0, {\n type: actionTypes_default.PROBE_UNKNOWN_ACTION()\n }) === \"undefined\") {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(13) : `The slice reducer for key \"${key}\" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);\n }\n });\n}\nfunction combineReducers(reducers) {\n const reducerKeys = Object.keys(reducers);\n const finalReducers = {};\n for (let i = 0; i < reducerKeys.length; i++) {\n const key = reducerKeys[i];\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof reducers[key] === \"undefined\") {\n warning(`No reducer provided for key \"${key}\"`);\n }\n }\n if (typeof reducers[key] === \"function\") {\n finalReducers[key] = reducers[key];\n }\n }\n const finalReducerKeys = Object.keys(finalReducers);\n let unexpectedKeyCache;\n if (process.env.NODE_ENV !== \"production\") {\n unexpectedKeyCache = {};\n }\n let shapeAssertionError;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n return function combination(state = {}, action) {\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n if (process.env.NODE_ENV !== \"production\") {\n const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n let hasChanged = false;\n const nextState = {};\n for (let i = 0; i < finalReducerKeys.length; i++) {\n const key = finalReducerKeys[i];\n const reducer = finalReducers[key];\n const previousStateForKey = state[key];\n const nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === \"undefined\") {\n const actionType = action && action.type;\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(14) : `When called with an action of type ${actionType ? `\"${String(actionType)}\"` : \"(unknown type)\"}, the slice reducer for key \"${key}\" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);\n }\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\n// src/bindActionCreators.ts\nfunction bindActionCreator(actionCreator, dispatch) {\n return function (...args) {\n return dispatch(actionCreator.apply(this, args));\n };\n}\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === \"function\") {\n return bindActionCreator(actionCreators, dispatch);\n }\n if (typeof actionCreators !== \"object\" || actionCreators === null) {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(16) : `bindActionCreators expected an object or a function, but instead received: '${kindOf(actionCreators)}'. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?`);\n }\n const boundActionCreators = {};\n for (const key in actionCreators) {\n const actionCreator = actionCreators[key];\n if (typeof actionCreator === \"function\") {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n// src/compose.ts\nfunction compose(...funcs) {\n if (funcs.length === 0) {\n return arg => arg;\n }\n if (funcs.length === 1) {\n return funcs[0];\n }\n return funcs.reduce((a, b) => (...args) => a(b(...args)));\n}\n\n// src/applyMiddleware.ts\nfunction applyMiddleware(...middlewares) {\n return createStore2 => (reducer, preloadedState) => {\n const store = createStore2(reducer, preloadedState);\n let dispatch = () => {\n throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(15) : \"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.\");\n };\n const middlewareAPI = {\n getState: store.getState,\n dispatch: (action, ...args) => dispatch(action, ...args)\n };\n const chain = middlewares.map(middleware => middleware(middlewareAPI));\n dispatch = compose(...chain)(store.dispatch);\n return {\n ...store,\n dispatch\n };\n };\n}\n\n// src/utils/isAction.ts\nfunction isAction(action) {\n return isPlainObject(action) && \"type\" in action && typeof action.type === \"string\";\n}\nexport { actionTypes_default as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore, isAction, isPlainObject, legacy_createStore };\n","// src/devModeChecks/identityFunctionCheck.ts\nvar runIdentityFunctionCheck = (resultFunc, inputSelectorsResults, outputSelectorResult) => {\n if (inputSelectorsResults.length === 1 && inputSelectorsResults[0] === outputSelectorResult) {\n let isInputSameAsOutput = false;\n try {\n const emptyObject = {};\n if (resultFunc(emptyObject) === emptyObject) isInputSameAsOutput = true;\n } catch {}\n if (isInputSameAsOutput) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({\n stack\n } = e);\n }\n console.warn(\"The result function returned its own inputs without modification. e.g\\n`createSelector([state => state.todos], todos => todos)`\\nThis could lead to inefficient memoization and unnecessary re-renders.\\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.\", {\n stack\n });\n }\n }\n};\n\n// src/devModeChecks/inputStabilityCheck.ts\nvar runInputStabilityCheck = (inputSelectorResultsObject, options, inputSelectorArgs) => {\n const {\n memoize,\n memoizeOptions\n } = options;\n const {\n inputSelectorResults,\n inputSelectorResultsCopy\n } = inputSelectorResultsObject;\n const createAnEmptyObject = memoize(() => ({}), ...memoizeOptions);\n const areInputSelectorResultsEqual = createAnEmptyObject.apply(null, inputSelectorResults) === createAnEmptyObject.apply(null, inputSelectorResultsCopy);\n if (!areInputSelectorResultsEqual) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({\n stack\n } = e);\n }\n console.warn(\"An input selector returned a different result when passed same arguments.\\nThis means your output selector will likely run more frequently than intended.\\nAvoid returning a new reference inside your input selector, e.g.\\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`\", {\n arguments: inputSelectorArgs,\n firstInputs: inputSelectorResults,\n secondInputs: inputSelectorResultsCopy,\n stack\n });\n }\n};\n\n// src/devModeChecks/setGlobalDevModeChecks.ts\nvar globalDevModeChecks = {\n inputStabilityCheck: \"once\",\n identityFunctionCheck: \"once\"\n};\nvar setGlobalDevModeChecks = devModeChecks => {\n Object.assign(globalDevModeChecks, devModeChecks);\n};\n\n// src/utils.ts\nvar NOT_FOUND = /* @__PURE__ */Symbol(\"NOT_FOUND\");\nfunction assertIsFunction(func, errorMessage = `expected a function, instead received ${typeof func}`) {\n if (typeof func !== \"function\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsObject(object, errorMessage = `expected an object, instead received ${typeof object}`) {\n if (typeof object !== \"object\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsArrayOfFunctions(array, errorMessage = `expected all items to be functions, instead received the following types: `) {\n if (!array.every(item => typeof item === \"function\")) {\n const itemTypes = array.map(item => typeof item === \"function\" ? `function ${item.name || \"unnamed\"}()` : typeof item).join(\", \");\n throw new TypeError(`${errorMessage}[${itemTypes}]`);\n }\n}\nvar ensureIsArray = item => {\n return Array.isArray(item) ? item : [item];\n};\nfunction getDependencies(createSelectorArgs) {\n const dependencies = Array.isArray(createSelectorArgs[0]) ? createSelectorArgs[0] : createSelectorArgs;\n assertIsArrayOfFunctions(dependencies, `createSelector expects all input-selectors to be functions, but received the following types: `);\n return dependencies;\n}\nfunction collectInputSelectorResults(dependencies, inputSelectorArgs) {\n const inputSelectorResults = [];\n const {\n length\n } = dependencies;\n for (let i = 0; i < length; i++) {\n inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs));\n }\n return inputSelectorResults;\n}\nvar getDevModeChecksExecutionInfo = (firstRun, devModeChecks) => {\n const {\n identityFunctionCheck,\n inputStabilityCheck\n } = {\n ...globalDevModeChecks,\n ...devModeChecks\n };\n return {\n identityFunctionCheck: {\n shouldRun: identityFunctionCheck === \"always\" || identityFunctionCheck === \"once\" && firstRun,\n run: runIdentityFunctionCheck\n },\n inputStabilityCheck: {\n shouldRun: inputStabilityCheck === \"always\" || inputStabilityCheck === \"once\" && firstRun,\n run: runInputStabilityCheck\n }\n };\n};\n\n// src/autotrackMemoize/autotracking.ts\nvar $REVISION = 0;\nvar CURRENT_TRACKER = null;\nvar Cell = class {\n revision = $REVISION;\n _value;\n _lastValue;\n _isEqual = tripleEq;\n constructor(initialValue, isEqual = tripleEq) {\n this._value = this._lastValue = initialValue;\n this._isEqual = isEqual;\n }\n // Whenever a storage value is read, it'll add itself to the current tracker if\n // one exists, entangling its state with that cache.\n get value() {\n CURRENT_TRACKER?.add(this);\n return this._value;\n }\n // Whenever a storage value is updated, we bump the global revision clock,\n // assign the revision for this storage to the new value, _and_ we schedule a\n // rerender. This is important, and it's what makes autotracking _pull_\n // based. We don't actively tell the caches which depend on the storage that\n // anything has happened. Instead, we recompute the caches when needed.\n set value(newValue) {\n if (this.value === newValue) return;\n this._value = newValue;\n this.revision = ++$REVISION;\n }\n};\nfunction tripleEq(a, b) {\n return a === b;\n}\nvar TrackingCache = class {\n _cachedValue;\n _cachedRevision = -1;\n _deps = [];\n hits = 0;\n fn;\n constructor(fn) {\n this.fn = fn;\n }\n clear() {\n this._cachedValue = void 0;\n this._cachedRevision = -1;\n this._deps = [];\n this.hits = 0;\n }\n get value() {\n if (this.revision > this._cachedRevision) {\n const {\n fn\n } = this;\n const currentTracker = /* @__PURE__ */new Set();\n const prevTracker = CURRENT_TRACKER;\n CURRENT_TRACKER = currentTracker;\n this._cachedValue = fn();\n CURRENT_TRACKER = prevTracker;\n this.hits++;\n this._deps = Array.from(currentTracker);\n this._cachedRevision = this.revision;\n }\n CURRENT_TRACKER?.add(this);\n return this._cachedValue;\n }\n get revision() {\n return Math.max(...this._deps.map(d => d.revision), 0);\n }\n};\nfunction getValue(cell) {\n if (!(cell instanceof Cell)) {\n console.warn(\"Not a valid cell! \", cell);\n }\n return cell.value;\n}\nfunction setValue(storage, value) {\n if (!(storage instanceof Cell)) {\n throw new TypeError(\"setValue must be passed a tracked store created with `createStorage`.\");\n }\n storage.value = storage._lastValue = value;\n}\nfunction createCell(initialValue, isEqual = tripleEq) {\n return new Cell(initialValue, isEqual);\n}\nfunction createCache(fn) {\n assertIsFunction(fn, \"the first parameter to `createCache` must be a function\");\n return new TrackingCache(fn);\n}\n\n// src/autotrackMemoize/tracking.ts\nvar neverEq = (a, b) => false;\nfunction createTag() {\n return createCell(null, neverEq);\n}\nfunction dirtyTag(tag, value) {\n setValue(tag, value);\n}\nvar consumeCollection = node => {\n let tag = node.collectionTag;\n if (tag === null) {\n tag = node.collectionTag = createTag();\n }\n getValue(tag);\n};\nvar dirtyCollection = node => {\n const tag = node.collectionTag;\n if (tag !== null) {\n dirtyTag(tag, null);\n }\n};\n\n// src/autotrackMemoize/proxy.ts\nvar REDUX_PROXY_LABEL = Symbol();\nvar nextId = 0;\nvar proto = Object.getPrototypeOf({});\nvar ObjectTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy(this, objectProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar objectProxyHandler = {\n get(node, key) {\n function calculateResult() {\n const {\n value\n } = node;\n const childValue = Reflect.get(value, key);\n if (typeof key === \"symbol\") {\n return childValue;\n }\n if (key in proto) {\n return childValue;\n }\n if (typeof childValue === \"object\" && childValue !== null) {\n let childNode = node.children[key];\n if (childNode === void 0) {\n childNode = node.children[key] = createNode(childValue);\n }\n if (childNode.tag) {\n getValue(childNode.tag);\n }\n return childNode.proxy;\n } else {\n let tag = node.tags[key];\n if (tag === void 0) {\n tag = node.tags[key] = createTag();\n tag.value = childValue;\n }\n getValue(tag);\n return childValue;\n }\n }\n const res = calculateResult();\n return res;\n },\n ownKeys(node) {\n consumeCollection(node);\n return Reflect.ownKeys(node.value);\n },\n getOwnPropertyDescriptor(node, prop) {\n return Reflect.getOwnPropertyDescriptor(node.value, prop);\n },\n has(node, prop) {\n return Reflect.has(node.value, prop);\n }\n};\nvar ArrayTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy([this], arrayProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar arrayProxyHandler = {\n get([node], key) {\n if (key === \"length\") {\n consumeCollection(node);\n }\n return objectProxyHandler.get(node, key);\n },\n ownKeys([node]) {\n return objectProxyHandler.ownKeys(node);\n },\n getOwnPropertyDescriptor([node], prop) {\n return objectProxyHandler.getOwnPropertyDescriptor(node, prop);\n },\n has([node], prop) {\n return objectProxyHandler.has(node, prop);\n }\n};\nfunction createNode(value) {\n if (Array.isArray(value)) {\n return new ArrayTreeNode(value);\n }\n return new ObjectTreeNode(value);\n}\nfunction updateNode(node, newValue) {\n const {\n value,\n tags,\n children\n } = node;\n node.value = newValue;\n if (Array.isArray(value) && Array.isArray(newValue) && value.length !== newValue.length) {\n dirtyCollection(node);\n } else {\n if (value !== newValue) {\n let oldKeysSize = 0;\n let newKeysSize = 0;\n let anyKeysAdded = false;\n for (const _key in value) {\n oldKeysSize++;\n }\n for (const key in newValue) {\n newKeysSize++;\n if (!(key in value)) {\n anyKeysAdded = true;\n break;\n }\n }\n const isDifferent = anyKeysAdded || oldKeysSize !== newKeysSize;\n if (isDifferent) {\n dirtyCollection(node);\n }\n }\n }\n for (const key in tags) {\n const childValue = value[key];\n const newChildValue = newValue[key];\n if (childValue !== newChildValue) {\n dirtyCollection(node);\n dirtyTag(tags[key], newChildValue);\n }\n if (typeof newChildValue === \"object\" && newChildValue !== null) {\n delete tags[key];\n }\n }\n for (const key in children) {\n const childNode = children[key];\n const newChildValue = newValue[key];\n const childValue = childNode.value;\n if (childValue === newChildValue) {\n continue;\n } else if (typeof newChildValue === \"object\" && newChildValue !== null) {\n updateNode(childNode, newChildValue);\n } else {\n deleteNode(childNode);\n delete children[key];\n }\n }\n}\nfunction deleteNode(node) {\n if (node.tag) {\n dirtyTag(node.tag, null);\n }\n dirtyCollection(node);\n for (const key in node.tags) {\n dirtyTag(node.tags[key], null);\n }\n for (const key in node.children) {\n deleteNode(node.children[key]);\n }\n}\n\n// src/lruMemoize.ts\nfunction createSingletonCache(equals) {\n let entry;\n return {\n get(key) {\n if (entry && equals(entry.key, key)) {\n return entry.value;\n }\n return NOT_FOUND;\n },\n put(key, value) {\n entry = {\n key,\n value\n };\n },\n getEntries() {\n return entry ? [entry] : [];\n },\n clear() {\n entry = void 0;\n }\n };\n}\nfunction createLruCache(maxSize, equals) {\n let entries = [];\n function get(key) {\n const cacheIndex = entries.findIndex(entry => equals(key, entry.key));\n if (cacheIndex > -1) {\n const entry = entries[cacheIndex];\n if (cacheIndex > 0) {\n entries.splice(cacheIndex, 1);\n entries.unshift(entry);\n }\n return entry.value;\n }\n return NOT_FOUND;\n }\n function put(key, value) {\n if (get(key) === NOT_FOUND) {\n entries.unshift({\n key,\n value\n });\n if (entries.length > maxSize) {\n entries.pop();\n }\n }\n }\n function getEntries() {\n return entries;\n }\n function clear() {\n entries = [];\n }\n return {\n get,\n put,\n getEntries,\n clear\n };\n}\nvar referenceEqualityCheck = (a, b) => a === b;\nfunction createCacheKeyComparator(equalityCheck) {\n return function areArgumentsShallowlyEqual(prev, next) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n const {\n length\n } = prev;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n return true;\n };\n}\nfunction lruMemoize(func, equalityCheckOrOptions) {\n const providedOptions = typeof equalityCheckOrOptions === \"object\" ? equalityCheckOrOptions : {\n equalityCheck: equalityCheckOrOptions\n };\n const {\n equalityCheck = referenceEqualityCheck,\n maxSize = 1,\n resultEqualityCheck\n } = providedOptions;\n const comparator = createCacheKeyComparator(equalityCheck);\n let resultsCount = 0;\n const cache = maxSize <= 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator);\n function memoized() {\n let value = cache.get(arguments);\n if (value === NOT_FOUND) {\n value = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const entries = cache.getEntries();\n const matchingEntry = entries.find(entry => resultEqualityCheck(entry.value, value));\n if (matchingEntry) {\n value = matchingEntry.value;\n resultsCount !== 0 && resultsCount--;\n }\n }\n cache.put(arguments, value);\n }\n return value;\n }\n memoized.clearCache = () => {\n cache.clear();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/autotrackMemoize/autotrackMemoize.ts\nfunction autotrackMemoize(func) {\n const node = createNode([]);\n let lastArgs = null;\n const shallowEqual = createCacheKeyComparator(referenceEqualityCheck);\n const cache = createCache(() => {\n const res = func.apply(null, node.proxy);\n return res;\n });\n function memoized() {\n if (!shallowEqual(lastArgs, arguments)) {\n updateNode(node, arguments);\n lastArgs = arguments;\n }\n return cache.value;\n }\n memoized.clearCache = () => {\n return cache.clear();\n };\n return memoized;\n}\n\n// src/weakMapMemoize.ts\nvar StrongRef = class {\n constructor(value) {\n this.value = value;\n }\n deref() {\n return this.value;\n }\n};\nvar Ref = typeof WeakRef !== \"undefined\" ? WeakRef : StrongRef;\nvar UNTERMINATED = 0;\nvar TERMINATED = 1;\nfunction createCacheNode() {\n return {\n s: UNTERMINATED,\n v: void 0,\n o: null,\n p: null\n };\n}\nfunction weakMapMemoize(func, options = {}) {\n let fnNode = createCacheNode();\n const {\n resultEqualityCheck\n } = options;\n let lastResult;\n let resultsCount = 0;\n function memoized() {\n let cacheNode = fnNode;\n const {\n length\n } = arguments;\n for (let i = 0, l = length; i < l; i++) {\n const arg = arguments[i];\n if (typeof arg === \"function\" || typeof arg === \"object\" && arg !== null) {\n let objectCache = cacheNode.o;\n if (objectCache === null) {\n cacheNode.o = objectCache = /* @__PURE__ */new WeakMap();\n }\n const objectNode = objectCache.get(arg);\n if (objectNode === void 0) {\n cacheNode = createCacheNode();\n objectCache.set(arg, cacheNode);\n } else {\n cacheNode = objectNode;\n }\n } else {\n let primitiveCache = cacheNode.p;\n if (primitiveCache === null) {\n cacheNode.p = primitiveCache = /* @__PURE__ */new Map();\n }\n const primitiveNode = primitiveCache.get(arg);\n if (primitiveNode === void 0) {\n cacheNode = createCacheNode();\n primitiveCache.set(arg, cacheNode);\n } else {\n cacheNode = primitiveNode;\n }\n }\n }\n const terminatedNode = cacheNode;\n let result;\n if (cacheNode.s === TERMINATED) {\n result = cacheNode.v;\n } else {\n result = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const lastResultValue = lastResult?.deref?.() ?? lastResult;\n if (lastResultValue != null && resultEqualityCheck(lastResultValue, result)) {\n result = lastResultValue;\n resultsCount !== 0 && resultsCount--;\n }\n const needsWeakRef = typeof result === \"object\" && result !== null || typeof result === \"function\";\n lastResult = needsWeakRef ? new Ref(result) : result;\n }\n }\n terminatedNode.s = TERMINATED;\n terminatedNode.v = result;\n return result;\n }\n memoized.clearCache = () => {\n fnNode = createCacheNode();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/createSelectorCreator.ts\nfunction createSelectorCreator(memoizeOrOptions, ...memoizeOptionsFromArgs) {\n const createSelectorCreatorOptions = typeof memoizeOrOptions === \"function\" ? {\n memoize: memoizeOrOptions,\n memoizeOptions: memoizeOptionsFromArgs\n } : memoizeOrOptions;\n const createSelector2 = (...createSelectorArgs) => {\n let recomputations = 0;\n let dependencyRecomputations = 0;\n let lastResult;\n let directlyPassedOptions = {};\n let resultFunc = createSelectorArgs.pop();\n if (typeof resultFunc === \"object\") {\n directlyPassedOptions = resultFunc;\n resultFunc = createSelectorArgs.pop();\n }\n assertIsFunction(resultFunc, `createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`);\n const combinedOptions = {\n ...createSelectorCreatorOptions,\n ...directlyPassedOptions\n };\n const {\n memoize,\n memoizeOptions = [],\n argsMemoize = weakMapMemoize,\n argsMemoizeOptions = [],\n devModeChecks = {}\n } = combinedOptions;\n const finalMemoizeOptions = ensureIsArray(memoizeOptions);\n const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions);\n const dependencies = getDependencies(createSelectorArgs);\n const memoizedResultFunc = memoize(function recomputationWrapper() {\n recomputations++;\n return resultFunc.apply(null, arguments);\n }, ...finalMemoizeOptions);\n let firstRun = true;\n const selector = argsMemoize(function dependenciesChecker() {\n dependencyRecomputations++;\n const inputSelectorResults = collectInputSelectorResults(dependencies, arguments);\n lastResult = memoizedResultFunc.apply(null, inputSelectorResults);\n if (process.env.NODE_ENV !== \"production\") {\n const {\n identityFunctionCheck,\n inputStabilityCheck\n } = getDevModeChecksExecutionInfo(firstRun, devModeChecks);\n if (identityFunctionCheck.shouldRun) {\n identityFunctionCheck.run(resultFunc, inputSelectorResults, lastResult);\n }\n if (inputStabilityCheck.shouldRun) {\n const inputSelectorResultsCopy = collectInputSelectorResults(dependencies, arguments);\n inputStabilityCheck.run({\n inputSelectorResults,\n inputSelectorResultsCopy\n }, {\n memoize,\n memoizeOptions: finalMemoizeOptions\n }, arguments);\n }\n if (firstRun) firstRun = false;\n }\n return lastResult;\n }, ...finalArgsMemoizeOptions);\n return Object.assign(selector, {\n resultFunc,\n memoizedResultFunc,\n dependencies,\n dependencyRecomputations: () => dependencyRecomputations,\n resetDependencyRecomputations: () => {\n dependencyRecomputations = 0;\n },\n lastResult: () => lastResult,\n recomputations: () => recomputations,\n resetRecomputations: () => {\n recomputations = 0;\n },\n memoize,\n argsMemoize\n });\n };\n Object.assign(createSelector2, {\n withTypes: () => createSelector2\n });\n return createSelector2;\n}\nvar createSelector = /* @__PURE__ */createSelectorCreator(weakMapMemoize);\n\n// src/createStructuredSelector.ts\nvar createStructuredSelector = Object.assign((inputSelectorsObject, selectorCreator = createSelector) => {\n assertIsObject(inputSelectorsObject, `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof inputSelectorsObject}`);\n const inputSelectorKeys = Object.keys(inputSelectorsObject);\n const dependencies = inputSelectorKeys.map(key => inputSelectorsObject[key]);\n const structuredSelector = selectorCreator(dependencies, (...inputSelectorResults) => {\n return inputSelectorResults.reduce((composition, value, index) => {\n composition[inputSelectorKeys[index]] = value;\n return composition;\n }, {});\n });\n return structuredSelector;\n}, {\n withTypes: () => createStructuredSelector\n});\nexport { createSelector, createSelectorCreator, createStructuredSelector, lruMemoize, referenceEqualityCheck, setGlobalDevModeChecks, autotrackMemoize as unstable_autotrackMemoize, weakMapMemoize };\n","/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n return typeof subject === 'undefined' || subject === null;\n}\nfunction isObject(subject) {\n return typeof subject === 'object' && subject !== null;\n}\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;else if (isNothing(sequence)) return [];\n return [sequence];\n}\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n if (source) {\n sourceKeys = Object.keys(source);\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction repeat(string, count) {\n var result = '',\n cycle;\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n return result;\n}\nfunction isNegativeZero(number) {\n return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;\n}\nvar isNothing_1 = isNothing;\nvar isObject_1 = isObject;\nvar toArray_1 = toArray;\nvar repeat_1 = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1 = extend;\nvar common = {\n isNothing: isNothing_1,\n isObject: isObject_1,\n toArray: toArray_1,\n repeat: repeat_1,\n isNegativeZero: isNegativeZero_1,\n extend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\nfunction formatError(exception, compact) {\n var where = '',\n message = exception.reason || '(unknown reason)';\n if (!exception.mark) return message;\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n return message + ' ' + where;\n}\nfunction YAMLException$1(reason, mark) {\n // Super constructor\n Error.call(this);\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = new Error().stack || '';\n }\n}\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\nYAMLException$1.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n if (!mark.buffer) return null;\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [0];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n while (match = re.exec(mark.buffer)) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n var result = '',\n i,\n line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength);\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + ' | ' + line.str + '\\n' + result;\n }\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + ' | ' + line.str + '\\n';\n }\n return result.replace(/\\n$/, '');\n}\nvar snippet = makeSnippet;\nvar TYPE_CONSTRUCTOR_OPTIONS = ['kind', 'multi', 'resolve', 'construct', 'instanceOf', 'predicate', 'represent', 'representName', 'defaultStyle', 'styleAliases'];\nvar YAML_NODE_KINDS = ['scalar', 'sequence', 'mapping'];\nfunction compileStyleAliases(map) {\n var result = {};\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n return result;\n}\nfunction Type$1(tag, options) {\n options = options || {};\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () {\n return true;\n };\n this.construct = options['construct'] || function (data) {\n return data;\n };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\nfunction compileList(schema, name) {\n var result = [];\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {\n newIndex = previousIndex;\n }\n });\n result[newIndex] = currentType;\n });\n return result;\n}\nfunction compileMap(/* lists... */\n) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n },\n index,\n length;\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\nfunction Schema$1(definition) {\n return this.extend(definition);\n}\nSchema$1.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n if (definition instanceof type) {\n // Schema.extend(type)\n explicit.push(definition);\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n } else {\n throw new exception('Schema.extend argument should be a Type, [ Type ], ' + 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n implicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n if (type$1.multi) {\n throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n explicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n var result = Object.create(Schema$1.prototype);\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n return result;\n};\nvar schema = Schema$1;\nvar str = new type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) {\n return data !== null ? data : '';\n }\n});\nvar seq = new type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) {\n return data !== null ? data : [];\n }\n});\nvar map = new type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) {\n return data !== null ? data : {};\n }\n});\nvar failsafe = new schema({\n explicit: [str, seq, map]\n});\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n var max = data.length;\n return max === 1 && data === '~' || max === 4 && (data === 'null' || data === 'Null' || data === 'NULL');\n}\nfunction constructYamlNull() {\n return null;\n}\nfunction isNull(object) {\n return object === null;\n}\nvar _null = new type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () {\n return '~';\n },\n lowercase: function () {\n return 'null';\n },\n uppercase: function () {\n return 'NULL';\n },\n camelcase: function () {\n return 'Null';\n },\n empty: function () {\n return '';\n }\n },\n defaultStyle: 'lowercase'\n});\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n var max = data.length;\n return max === 4 && (data === 'true' || data === 'True' || data === 'TRUE') || max === 5 && (data === 'false' || data === 'False' || data === 'FALSE');\n}\nfunction constructYamlBoolean(data) {\n return data === 'true' || data === 'True' || data === 'TRUE';\n}\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\nvar bool = new type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) {\n return object ? 'true' : 'false';\n },\n uppercase: function (object) {\n return object ? 'TRUE' : 'FALSE';\n },\n camelcase: function (object) {\n return object ? 'True' : 'False';\n }\n },\n defaultStyle: 'lowercase'\n});\nfunction isHexCode(c) {\n return 0x30 /* 0 */ <= c && c <= 0x39 /* 9 */ || 0x41 /* A */ <= c && c <= 0x46 /* F */ || 0x61 /* a */ <= c && c <= 0x66 /* f */;\n}\nfunction isOctCode(c) {\n return 0x30 /* 0 */ <= c && c <= 0x37 /* 7 */;\n}\nfunction isDecCode(c) {\n return 0x30 /* 0 */ <= c && c <= 0x39 /* 9 */;\n}\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n if (!max) return false;\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n if (ch === 'x') {\n // base 16\n index++;\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n if (ch === 'o') {\n // base 8\n index++;\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n return true;\n}\nfunction constructYamlInteger(data) {\n var value = data,\n sign = 1,\n ch;\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n ch = value[0];\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n if (value === '0') return 0;\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n return sign * parseInt(value, 10);\n}\nfunction isInteger(object) {\n return Object.prototype.toString.call(object) === '[object Number]' && object % 1 === 0 && !common.isNegativeZero(object);\n}\nvar int = new type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) {\n return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1);\n },\n octal: function (obj) {\n return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1);\n },\n decimal: function (obj) {\n return obj.toString(10);\n },\n /* eslint-disable max-len */\n hexadecimal: function (obj) {\n return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1);\n }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [2, 'bin'],\n octal: [8, 'oct'],\n decimal: [10, 'dec'],\n hexadecimal: [16, 'hex']\n }\n});\nvar YAML_FLOAT_PATTERN = new RegExp(\n// 2.5e4, 2.5 and integers\n'^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n// .2e4, .2\n// special case, seems not from spec\n'|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n// .inf\n'|[-+]?\\\\.(?:inf|Inf|INF)' +\n// .nan\n'|\\\\.(?:nan|NaN|NAN))$');\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n return true;\n}\nfunction constructYamlFloat(data) {\n var value, sign;\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n if (value === '.inf') {\n return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\nfunction representYamlFloat(object, style) {\n var res;\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase':\n return '.nan';\n case 'uppercase':\n return '.NAN';\n case 'camelcase':\n return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase':\n return '.inf';\n case 'uppercase':\n return '.INF';\n case 'camelcase':\n return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase':\n return '-.inf';\n case 'uppercase':\n return '-.INF';\n case 'camelcase':\n return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\nfunction isFloat(object) {\n return Object.prototype.toString.call(object) === '[object Number]' && (object % 1 !== 0 || common.isNegativeZero(object));\n}\nvar float = new type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\nvar json = failsafe.extend({\n implicit: [_null, bool, int, float]\n});\nvar core = json;\nvar YAML_DATE_REGEXP = new RegExp('^([0-9][0-9][0-9][0-9])' +\n// [1] year\n'-([0-9][0-9])' +\n// [2] month\n'-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp('^([0-9][0-9][0-9][0-9])' +\n// [1] year\n'-([0-9][0-9]?)' +\n// [2] month\n'-([0-9][0-9]?)' +\n// [3] day\n'(?:[Tt]|[ \\\\t]+)' +\n// ...\n'([0-9][0-9]?)' +\n// [4] hour\n':([0-9][0-9])' +\n// [5] minute\n':([0-9][0-9])' +\n// [6] second\n'(?:\\\\.([0-9]*))?' +\n// [7] fraction\n'(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' +\n// [8] tz [9] tz_sign [10] tz_hour\n'(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\nfunction constructYamlTimestamp(data) {\n var match,\n year,\n month,\n day,\n hour,\n minute,\n second,\n fraction = 0,\n delta = null,\n tz_hour,\n tz_minute,\n date;\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +match[1];\n month = +match[2] - 1; // JS month starts with 0\n day = +match[3];\n if (!match[4]) {\n // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +match[4];\n minute = +match[5];\n second = +match[6];\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) {\n // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +match[10];\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n if (delta) date.setTime(date.getTime() - delta);\n return date;\n}\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\nvar merge = new type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n var code,\n idx,\n bitlen = 0,\n max = data.length,\n map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return bitlen % 8 === 0;\n}\nfunction constructYamlBinary(data) {\n var idx,\n tailbits,\n input = data.replace(/[\\r\\n=]/g, ''),\n // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if (idx % 4 === 0 && idx) {\n result.push(bits >> 16 & 0xFF);\n result.push(bits >> 8 & 0xFF);\n result.push(bits & 0xFF);\n }\n bits = bits << 6 | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = max % 4 * 6;\n if (tailbits === 0) {\n result.push(bits >> 16 & 0xFF);\n result.push(bits >> 8 & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push(bits >> 10 & 0xFF);\n result.push(bits >> 2 & 0xFF);\n } else if (tailbits === 12) {\n result.push(bits >> 4 & 0xFF);\n }\n return new Uint8Array(result);\n}\nfunction representYamlBinary(object /*, style*/) {\n var result = '',\n bits = 0,\n idx,\n tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if (idx % 3 === 0 && idx) {\n result += map[bits >> 18 & 0x3F];\n result += map[bits >> 12 & 0x3F];\n result += map[bits >> 6 & 0x3F];\n result += map[bits & 0x3F];\n }\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n if (tail === 0) {\n result += map[bits >> 18 & 0x3F];\n result += map[bits >> 12 & 0x3F];\n result += map[bits >> 6 & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[bits >> 10 & 0x3F];\n result += map[bits >> 4 & 0x3F];\n result += map[bits << 2 & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[bits >> 2 & 0x3F];\n result += map[bits << 4 & 0x3F];\n result += map[64];\n result += map[64];\n }\n return result;\n}\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\nvar binary = new type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2 = Object.prototype.toString;\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n var objectKeys = [],\n index,\n length,\n pair,\n pairKey,\n pairHasKey,\n object = data;\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n if (_toString$2.call(pair) !== '[object Object]') return false;\n for (pairKey in pair) {\n if (_hasOwnProperty$3.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;else return false;\n }\n }\n if (!pairHasKey) return false;\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);else return false;\n }\n return true;\n}\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\nvar omap = new type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\nvar _toString$1 = Object.prototype.toString;\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n var index,\n length,\n pair,\n keys,\n result,\n object = data;\n result = new Array(object.length);\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n if (_toString$1.call(pair) !== '[object Object]') return false;\n keys = Object.keys(pair);\n if (keys.length !== 1) return false;\n result[index] = [keys[0], pair[keys[0]]];\n }\n return true;\n}\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n var index,\n length,\n pair,\n keys,\n result,\n object = data;\n result = new Array(object.length);\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n keys = Object.keys(pair);\n result[index] = [keys[0], pair[keys[0]]];\n }\n return result;\n}\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n var key,\n object = data;\n for (key in object) {\n if (_hasOwnProperty$2.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n return true;\n}\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\nvar set = new type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\nvar _default = core.extend({\n implicit: [timestamp, merge],\n explicit: [binary, omap, pairs, set]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\nfunction _class(obj) {\n return Object.prototype.toString.call(obj);\n}\nfunction is_EOL(c) {\n return c === 0x0A /* LF */ || c === 0x0D /* CR */;\n}\nfunction is_WHITE_SPACE(c) {\n return c === 0x09 /* Tab */ || c === 0x20 /* Space */;\n}\nfunction is_WS_OR_EOL(c) {\n return c === 0x09 /* Tab */ || c === 0x20 /* Space */ || c === 0x0A /* LF */ || c === 0x0D /* CR */;\n}\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C /* , */ || c === 0x5B /* [ */ || c === 0x5D /* ] */ || c === 0x7B /* { */ || c === 0x7D /* } */;\n}\nfunction fromHexCode(c) {\n var lc;\n if (0x30 /* 0 */ <= c && c <= 0x39 /* 9 */) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n if (0x61 /* a */ <= lc && lc <= 0x66 /* f */) {\n return lc - 0x61 + 10;\n }\n return -1;\n}\nfunction escapedHexLen(c) {\n if (c === 0x78 /* x */) {\n return 2;\n }\n if (c === 0x75 /* u */) {\n return 4;\n }\n if (c === 0x55 /* U */) {\n return 8;\n }\n return 0;\n}\nfunction fromDecimalCode(c) {\n if (0x30 /* 0 */ <= c && c <= 0x39 /* 9 */) {\n return c - 0x30;\n }\n return -1;\n}\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return c === 0x30 /* 0 */ ? '\\x00' : c === 0x61 /* a */ ? '\\x07' : c === 0x62 /* b */ ? '\\x08' : c === 0x74 /* t */ ? '\\x09' : c === 0x09 /* Tab */ ? '\\x09' : c === 0x6E /* n */ ? '\\x0A' : c === 0x76 /* v */ ? '\\x0B' : c === 0x66 /* f */ ? '\\x0C' : c === 0x72 /* r */ ? '\\x0D' : c === 0x65 /* e */ ? '\\x1B' : c === 0x20 /* Space */ ? ' ' : c === 0x22 /* \" */ ? '\\x22' : c === 0x2F /* / */ ? '/' : c === 0x5C /* \\ */ ? '\\x5C' : c === 0x4E /* N */ ? '\\x85' : c === 0x5F /* _ */ ? '\\xA0' : c === 0x4C /* L */ ? '\\u2028' : c === 0x50 /* P */ ? '\\u2029' : '';\n}\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode((c - 0x010000 >> 10) + 0xD800, (c - 0x010000 & 0x03FF) + 0xDC00);\n}\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\nfunction State$1(input, options) {\n this.input = input;\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || _default;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n}\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1),\n // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n mark.snippet = snippet(mark);\n return new exception(message, mark);\n}\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\nvar directiveHandlers = {\n YAML: function handleYamlDirective(state, name, args) {\n var match, major, minor;\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n state.version = args[0];\n state.checkLineBreaks = minor < 2;\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n TAG: function handleTagDirective(state, name, args) {\n var handle, prefix;\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n handle = args[0];\n prefix = args[1];\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n state.tagMap[handle] = prefix;\n }\n};\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n if (start < end) {\n _result = state.input.slice(start, end);\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 || 0x20 <= _character && _character <= 0x10FFFF)) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n state.result += _result;\n }\n}\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n sourceKeys = Object.keys(source);\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n if (!_hasOwnProperty$1.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n keyNode = String(keyNode);\n if (_result === null) {\n _result = {};\n }\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n // used for this specific key only because Object.defineProperty is slow\n if (keyNode === '__proto__') {\n Object.defineProperty(_result, keyNode, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: valueNode\n });\n } else {\n _result[keyNode] = valueNode;\n }\n delete overridableKeys[keyNode];\n }\n return _result;\n}\nfunction readLineBreak(state) {\n var ch;\n ch = state.input.charCodeAt(state.position);\n if (ch === 0x0A /* LF */) {\n state.position++;\n } else if (ch === 0x0D /* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A /* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09 /* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n if (allowComments && ch === 0x23 /* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A /* LF */ && ch !== 0x0D /* CR */ && ch !== 0);\n }\n if (is_EOL(ch)) {\n readLineBreak(state);\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n while (ch === 0x20 /* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n return lineBreaks;\n}\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D /* - */ || ch === 0x2E /* . */) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {\n _position += 3;\n ch = state.input.charCodeAt(_position);\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n return false;\n}\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n ch = state.input.charCodeAt(state.position);\n if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 0x23 /* # */ || ch === 0x26 /* & */ || ch === 0x2A /* * */ || ch === 0x21 /* ! */ || ch === 0x7C /* | */ || ch === 0x3E /* > */ || ch === 0x27 /* ' */ || ch === 0x22 /* \" */ || ch === 0x25 /* % */ || ch === 0x40 /* @ */ || ch === 0x60 /* ` */) {\n return false;\n }\n if (ch === 0x3F /* ? */ || ch === 0x2D /* - */) {\n following = state.input.charCodeAt(state.position + 1);\n if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n while (ch !== 0) {\n if (ch === 0x3A /* : */) {\n following = state.input.charCodeAt(state.position + 1);\n if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n } else if (ch === 0x23 /* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n captureSegment(state, captureStart, captureEnd, false);\n if (state.result) {\n return true;\n }\n state.kind = _kind;\n state.result = _result;\n return false;\n}\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch, captureStart, captureEnd;\n ch = state.input.charCodeAt(state.position);\n if (ch !== 0x27 /* ' */) {\n return false;\n }\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27 /* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n if (ch === 0x27 /* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart, captureEnd, hexLength, hexResult, tmp, ch;\n ch = state.input.charCodeAt(state.position);\n if (ch !== 0x22 /* \" */) {\n return false;\n }\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22 /* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n } else if (ch === 0x5C /* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n state.result += charFromCodepoint(hexResult);\n state.position++;\n } else {\n throwError(state, 'unknown escape sequence');\n }\n captureStart = captureEnd = state.position;\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n ch = state.input.charCodeAt(state.position);\n if (ch === 0x5B /* [ */) {\n terminator = 0x5D; /* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B /* { */) {\n terminator = 0x7D; /* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n ch = state.input.charCodeAt(++state.position);\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n ch = state.input.charCodeAt(state.position);\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C /* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n if (ch === 0x3F /* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n ch = state.input.charCodeAt(state.position);\n if ((isExplicitPair || state.line === _line) && ch === 0x3A /* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n skipSeparationSpace(state, true, nodeIndent);\n ch = state.input.charCodeAt(state.position);\n if (ch === 0x2C /* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n ch = state.input.charCodeAt(state.position);\n if (ch === 0x7C /* | */) {\n folding = false;\n } else if (ch === 0x3E /* > */) {\n folding = true;\n } else {\n return false;\n }\n state.kind = 'scalar';\n state.result = '';\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n if (ch === 0x2B /* + */ || ch === 0x2D /* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = ch === 0x2B /* + */ ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n } else {\n break;\n }\n }\n if (is_WHITE_SPACE(ch)) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (is_WHITE_SPACE(ch));\n if (ch === 0x23 /* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (!is_EOL(ch) && ch !== 0);\n }\n }\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n ch = state.input.charCodeAt(state.position);\n while ((!detectedIndent || state.lineIndent < textIndent) && ch === 0x20 /* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) {\n // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) {\n // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n while (!is_EOL(ch) && ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n }\n captureSegment(state, captureStart, state.position, false);\n }\n return true;\n}\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n ch = state.input.charCodeAt(state.position);\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n if (ch !== 0x2D /* - */) {\n break;\n }\n following = state.input.charCodeAt(state.position + 1);\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n detected = true;\n state.position++;\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n ch = state.input.charCodeAt(state.position);\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F /* ? */ || ch === 0x3A /* : */) && is_WS_OR_EOL(following)) {\n if (ch === 0x3F /* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n if (ch === 0x3A /* : */) {\n ch = state.input.charCodeAt(++state.position);\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n return detected;\n}\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n ch = state.input.charCodeAt(state.position);\n if (ch !== 0x21 /* ! */) return false;\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n ch = state.input.charCodeAt(++state.position);\n if (ch === 0x3C /* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n } else if (ch === 0x21 /* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n } else {\n tagHandle = '!';\n }\n _position = state.position;\n if (isVerbatim) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0 && ch !== 0x3E /* > */);\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n if (ch === 0x21 /* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n ch = state.input.charCodeAt(++state.position);\n }\n tagName = state.input.slice(_position, state.position);\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n if (isVerbatim) {\n state.tag = tagName;\n } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n return true;\n}\nfunction readAnchorProperty(state) {\n var _position, ch;\n ch = state.input.charCodeAt(state.position);\n if (ch !== 0x26 /* & */) return false;\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\nfunction readAlias(state) {\n var _position, alias, ch;\n ch = state.input.charCodeAt(state.position);\n if (ch !== 0x2A /* * */) return false;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n alias = state.input.slice(_position, state.position);\n if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1,\n // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n blockIndent = state.position - state.lineStart;\n if (indentStatus === 1) {\n if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n } else if (readAlias(state)) {\n hasContent = true;\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n if (type.resolve(state.result)) {\n // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n if (!type.resolve(state.result, state.tag)) {\n // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n if (state.lineIndent > 0 || ch !== 0x25 /* % */) {\n break;\n }\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n if (ch === 0x23 /* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0 && !is_EOL(ch));\n break;\n }\n if (is_EOL(ch)) break;\n _position = state.position;\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n if (ch !== 0) readLineBreak(state);\n if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n skipSeparationSpace(state, true, -1);\n if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 0x2D /* - */ && state.input.charCodeAt(state.position + 1) === 0x2D /* - */ && state.input.charCodeAt(state.position + 2) === 0x2D /* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n state.documents.push(state.result);\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n if (state.input.charCodeAt(state.position) === 0x2E /* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n if (state.position < state.length - 1) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n if (input.length !== 0) {\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A /* LF */ && input.charCodeAt(input.length - 1) !== 0x0D /* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n var state = new State$1(input, options);\n var nullpos = input.indexOf('\\0');\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n while (state.input.charCodeAt(state.position) === 0x20 /* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n while (state.position < state.length - 1) {\n readDocument(state);\n }\n return state.documents;\n}\nfunction loadAll$1(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n var documents = loadDocuments(input, options);\n if (typeof iterator !== 'function') {\n return documents;\n }\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\nfunction load$1(input, options) {\n var documents = loadDocuments(input, options);\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new exception('expected a single document in the stream, but found more');\n}\nvar loadAll_1 = loadAll$1;\nvar load_1 = load$1;\nvar loader = {\n loadAll: loadAll_1,\n load: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\nvar DEPRECATED_BOOLEANS_SYNTAX = ['y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'];\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n if (map === null) return {};\n result = {};\n keys = Object.keys(map);\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n result[tag] = style;\n }\n return result;\n}\nfunction encodeHex(character) {\n var string, handle, length;\n string = character.toString(16).toUpperCase();\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n }\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\nfunction State(options) {\n this.schema = options['schema'] || _default;\n this.indent = Math.max(1, options['indent'] || 2);\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = common.isNothing(options['flowLevel']) ? -1 : options['flowLevel'];\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n this.tag = null;\n this.result = '';\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n if (line.length && line !== '\\n') result += ind;\n result += line;\n }\n return result;\n}\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n if (type.resolve(str)) {\n return true;\n }\n }\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return 0x00020 <= c && c <= 0x00007E || 0x000A1 <= c && c <= 0x00D7FF && c !== 0x2028 && c !== 0x2029 || 0x0E000 <= c && c <= 0x00FFFD && c !== CHAR_BOM || 0x10000 <= c && c <= 0x10FFFF;\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c) && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out\n// c = flow-in ⇒ ns-plain-safe-in\n// c = block-key ⇒ ns-plain-safe-out\n// c = flow-key ⇒ ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )\n// | ( /* An ns-char preceding */ “#” )\n// | ( “:” /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ?\n // c = flow-in\n cIsNsCharOrWhitespace : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET\n\n // ns-plain-char\n ) && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP // change to true on '[^ ]#'\n || prev === CHAR_COLON && cIsNsChar; // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos),\n second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== ' ';\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== ' ';\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"' + string + '\"' : \"'\" + string + \"'\";\n }\n }\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || state.flowLevel > -1 && level >= state.flowLevel;\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string) + '\"';\n default:\n throw new exception('impossible error: invalid scalar style');\n }\n }();\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : clip ? '' : '-';\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }();\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while (match = lineRe.exec(string)) {\n var prefix = match[1],\n line = match[2];\n moreIndented = line[0] === ' ';\n result += prefix + (!prevMoreIndented && !moreIndented && line !== '' ? '\\n' : '') + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0,\n end,\n curr = 0,\n next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while (match = breakRe.exec(line)) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = curr > start ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n return result;\n}\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) || typeof value === 'undefined' && writeNode(state, level, null, false, false)) {\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === 'undefined' && writeNode(state, level + 1, null, true, true, false, true)) {\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n _result += state.dump;\n }\n }\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n if (state.condenseFlow) pairBuffer += '\"';\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n if (state.dump.length > 1024) pairBuffer += '? ';\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new exception('sortKeys must be a boolean or a function');\n }\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n explicitPair = state.tag !== null && state.tag !== '?' || state.dump && state.dump.length > 1024;\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n pairBuffer += state.dump;\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === 'object' && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n state.dump = _result;\n }\n return true;\n }\n }\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n if (block) {\n block = state.flowLevel < 0 || state.flowLevel > level;\n }\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n if (state.tag !== null && state.tag !== '?' || duplicate || state.indent !== 2 && level > 0) {\n compact = false;\n }\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && Object.keys(state.dump).length !== 0) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && state.dump.length !== 0) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new exception('unacceptable kind of an object to dump ' + type);\n }\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”\n // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”\n // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”\n // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(state.tag[0] === '!' ? state.tag.slice(1) : state.tag).replace(/!/g, '%21');\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n return true;\n}\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n inspectNode(object, objects, duplicatesIndexes);\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList, index, length;\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\nfunction dump$1(input, options) {\n options = options || {};\n var state = new State(options);\n if (!state.noRefs) getDuplicateReferences(input, state);\n var value = input;\n if (state.replacer) {\n value = state.replacer.call({\n '': value\n }, '', value);\n }\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n return '';\n}\nvar dump_1 = dump$1;\nvar dumper = {\n dump: dump_1\n};\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\nvar Type = type;\nvar Schema = schema;\nvar FAILSAFE_SCHEMA = failsafe;\nvar JSON_SCHEMA = json;\nvar CORE_SCHEMA = core;\nvar DEFAULT_SCHEMA = _default;\nvar load = loader.load;\nvar loadAll = loader.loadAll;\nvar dump = dumper.dump;\nvar YAMLException = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n binary: binary,\n float: float,\n map: map,\n null: _null,\n pairs: pairs,\n set: set,\n timestamp: timestamp,\n bool: bool,\n int: int,\n merge: merge,\n omap: omap,\n seq: seq,\n str: str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad = renamed('safeLoad', 'load');\nvar safeLoadAll = renamed('safeLoadAll', 'loadAll');\nvar safeDump = renamed('safeDump', 'dump');\nvar jsYaml = {\n Type: Type,\n Schema: Schema,\n FAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n JSON_SCHEMA: JSON_SCHEMA,\n CORE_SCHEMA: CORE_SCHEMA,\n DEFAULT_SCHEMA: DEFAULT_SCHEMA,\n load: load,\n loadAll: loadAll,\n dump: dump,\n YAMLException: YAMLException,\n types: types,\n safeLoad: safeLoad,\n safeLoadAll: safeLoadAll,\n safeDump: safeDump\n};\nexport default jsYaml;\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };","import _Object$assign from \"core-js-pure/features/object/assign.js\";\nimport _bindInstanceProperty from \"core-js-pure/features/instance/bind.js\";\nfunction _extends() {\n var _context;\n return _extends = _Object$assign ? _bindInstanceProperty(_context = _Object$assign).call(_context) : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","import React from 'react';\nimport { is } from 'immutable';\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n return target;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assertThisInitialized(self);\n}\nvar NOT_SET = {};\nfunction isMapLike(collection) {\n return collection !== null && _typeof(collection) === 'object' && typeof collection.get === 'function' && typeof collection.has === 'function';\n}\nfunction isInvalid(collection) {\n return collection === null || collection === undefined;\n}\nfunction get(collection, key, notSetValue) {\n if (isInvalid(collection)) {\n return notSetValue;\n }\n if (isMapLike(collection)) {\n return collection.has(key) ? collection.get(key) : notSetValue;\n }\n return hasOwnProperty.call(collection, key) ? collection[key] : notSetValue;\n}\nfunction getIn(collection, keyPath, notSetValue) {\n var i = 0;\n while (i !== keyPath.length) {\n collection = get(collection, keyPath[i++], NOT_SET);\n if (collection === NOT_SET) {\n return notSetValue;\n }\n }\n return collection;\n}\nfunction check(config) {\n var prev = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var next = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var checkItem = createChecker(prev, next);\n var checklist = config || Object.keys(_objectSpread2({}, next, {}, prev));\n return checklist.every(checkItem);\n}\nfunction createChecker(prev, next) {\n return function (name) {\n if (typeof name === 'string') {\n return is(next[name], prev[name]);\n } else if (Array.isArray(name)) {\n return is(getIn(next, name), getIn(prev, name));\n }\n throw new TypeError('Invalid key: expected Array or string: ' + name);\n };\n}\nvar ImmutablePureComponent = /*#__PURE__*/\nfunction (_React$Component) {\n _inherits(ImmutablePureComponent, _React$Component);\n function ImmutablePureComponent() {\n _classCallCheck(this, ImmutablePureComponent);\n return _possibleConstructorReturn(this, _getPrototypeOf(ImmutablePureComponent).apply(this, arguments));\n }\n _createClass(ImmutablePureComponent, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n var nextState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return !check(this.updateOnProps, this.props, nextProps, 'updateOnProps') || !check(this.updateOnStates, this.state, nextState, 'updateOnStates');\n }\n }]);\n return ImmutablePureComponent;\n}(React.Component);\nfunction immutableMemo(Component, updateOnProps) {\n return React.memo(Component, function (prev, next) {\n return check(updateOnProps, prev, next, 'immutableMemo');\n });\n}\nexport default ImmutablePureComponent;\nexport { ImmutablePureComponent, immutableMemo };","import { PatchError, _deepClone, isInteger, unescapePathComponent, hasUndefined } from './helpers.mjs';\nexport var JsonPatchError = PatchError;\nexport var deepClone = _deepClone;\n/* We use a Javascript hash to store each\n function. Each hash entry (property) uses\n the operation identifiers specified in rfc6902.\n In this way, we can map each patch operation\n to its dedicated function in efficient way.\n */\n/* The operations applicable to an object */\nvar objOps = {\n add: function (obj, key, document) {\n obj[key] = this.value;\n return {\n newDocument: document\n };\n },\n remove: function (obj, key, document) {\n var removed = obj[key];\n delete obj[key];\n return {\n newDocument: document,\n removed: removed\n };\n },\n replace: function (obj, key, document) {\n var removed = obj[key];\n obj[key] = this.value;\n return {\n newDocument: document,\n removed: removed\n };\n },\n move: function (obj, key, document) {\n /* in case move target overwrites an existing value,\n return the removed value, this can be taxing performance-wise,\n and is potentially unneeded */\n var removed = getValueByPointer(document, this.path);\n if (removed) {\n removed = _deepClone(removed);\n }\n var originalValue = applyOperation(document, {\n op: \"remove\",\n path: this.from\n }).removed;\n applyOperation(document, {\n op: \"add\",\n path: this.path,\n value: originalValue\n });\n return {\n newDocument: document,\n removed: removed\n };\n },\n copy: function (obj, key, document) {\n var valueToCopy = getValueByPointer(document, this.from);\n // enforce copy by value so further operations don't affect source (see issue #177)\n applyOperation(document, {\n op: \"add\",\n path: this.path,\n value: _deepClone(valueToCopy)\n });\n return {\n newDocument: document\n };\n },\n test: function (obj, key, document) {\n return {\n newDocument: document,\n test: _areEquals(obj[key], this.value)\n };\n },\n _get: function (obj, key, document) {\n this.value = obj[key];\n return {\n newDocument: document\n };\n }\n};\n/* The operations applicable to an array. Many are the same as for the object */\nvar arrOps = {\n add: function (arr, i, document) {\n if (isInteger(i)) {\n arr.splice(i, 0, this.value);\n } else {\n // array props\n arr[i] = this.value;\n }\n // this may be needed when using '-' in an array\n return {\n newDocument: document,\n index: i\n };\n },\n remove: function (arr, i, document) {\n var removedList = arr.splice(i, 1);\n return {\n newDocument: document,\n removed: removedList[0]\n };\n },\n replace: function (arr, i, document) {\n var removed = arr[i];\n arr[i] = this.value;\n return {\n newDocument: document,\n removed: removed\n };\n },\n move: objOps.move,\n copy: objOps.copy,\n test: objOps.test,\n _get: objOps._get\n};\n/**\n * Retrieves a value from a JSON document by a JSON pointer.\n * Returns the value.\n *\n * @param document The document to get the value from\n * @param pointer an escaped JSON pointer\n * @return The retrieved value\n */\nexport function getValueByPointer(document, pointer) {\n if (pointer == '') {\n return document;\n }\n var getOriginalDestination = {\n op: \"_get\",\n path: pointer\n };\n applyOperation(document, getOriginalDestination);\n return getOriginalDestination.value;\n}\n/**\n * Apply a single JSON Patch Operation on a JSON document.\n * Returns the {newDocument, result} of the operation.\n * It modifies the `document` and `operation` objects - it gets the values by reference.\n * If you would like to avoid touching your values, clone them:\n * `jsonpatch.applyOperation(document, jsonpatch._deepClone(operation))`.\n *\n * @param document The document to patch\n * @param operation The operation to apply\n * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n * @param mutateDocument Whether to mutate the original document or clone it before applying\n * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n * @return `{newDocument, result}` after the operation\n */\nexport function applyOperation(document, operation, validateOperation, mutateDocument, banPrototypeModifications, index) {\n if (validateOperation === void 0) {\n validateOperation = false;\n }\n if (mutateDocument === void 0) {\n mutateDocument = true;\n }\n if (banPrototypeModifications === void 0) {\n banPrototypeModifications = true;\n }\n if (index === void 0) {\n index = 0;\n }\n if (validateOperation) {\n if (typeof validateOperation == 'function') {\n validateOperation(operation, 0, document, operation.path);\n } else {\n validator(operation, 0);\n }\n }\n /* ROOT OPERATIONS */\n if (operation.path === \"\") {\n var returnValue = {\n newDocument: document\n };\n if (operation.op === 'add') {\n returnValue.newDocument = operation.value;\n return returnValue;\n } else if (operation.op === 'replace') {\n returnValue.newDocument = operation.value;\n returnValue.removed = document; //document we removed\n return returnValue;\n } else if (operation.op === 'move' || operation.op === 'copy') {\n // it's a move or copy to root\n returnValue.newDocument = getValueByPointer(document, operation.from); // get the value by json-pointer in `from` field\n if (operation.op === 'move') {\n // report removed item\n returnValue.removed = document;\n }\n return returnValue;\n } else if (operation.op === 'test') {\n returnValue.test = _areEquals(document, operation.value);\n if (returnValue.test === false) {\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n returnValue.newDocument = document;\n return returnValue;\n } else if (operation.op === 'remove') {\n // a remove on root\n returnValue.removed = document;\n returnValue.newDocument = null;\n return returnValue;\n } else if (operation.op === '_get') {\n operation.value = document;\n return returnValue;\n } else {\n /* bad operation */\n if (validateOperation) {\n throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, document);\n } else {\n return returnValue;\n }\n }\n } /* END ROOT OPERATIONS */else {\n if (!mutateDocument) {\n document = _deepClone(document);\n }\n var path = operation.path || \"\";\n var keys = path.split('/');\n var obj = document;\n var t = 1; //skip empty element - http://jsperf.com/to-shift-or-not-to-shift\n var len = keys.length;\n var existingPathFragment = undefined;\n var key = void 0;\n var validateFunction = void 0;\n if (typeof validateOperation == 'function') {\n validateFunction = validateOperation;\n } else {\n validateFunction = validator;\n }\n while (true) {\n key = keys[t];\n if (key && key.indexOf('~') != -1) {\n key = unescapePathComponent(key);\n }\n if (banPrototypeModifications && (key == '__proto__' || key == 'prototype' && t > 0 && keys[t - 1] == 'constructor')) {\n throw new TypeError('JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');\n }\n if (validateOperation) {\n if (existingPathFragment === undefined) {\n if (obj[key] === undefined) {\n existingPathFragment = keys.slice(0, t).join('/');\n } else if (t == len - 1) {\n existingPathFragment = operation.path;\n }\n if (existingPathFragment !== undefined) {\n validateFunction(operation, 0, document, existingPathFragment);\n }\n }\n }\n t++;\n if (Array.isArray(obj)) {\n if (key === '-') {\n key = obj.length;\n } else {\n if (validateOperation && !isInteger(key)) {\n throw new JsonPatchError(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\", \"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\", index, operation, document);\n } // only parse key when it's an integer for `arr.prop` to work\n else if (isInteger(key)) {\n key = ~~key;\n }\n }\n if (t >= len) {\n if (validateOperation && operation.op === \"add\" && key > obj.length) {\n throw new JsonPatchError(\"The specified index MUST NOT be greater than the number of elements in the array\", \"OPERATION_VALUE_OUT_OF_BOUNDS\", index, operation, document);\n }\n var returnValue = arrOps[operation.op].call(operation, obj, key, document); // Apply patch\n if (returnValue.test === false) {\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n return returnValue;\n }\n } else {\n if (t >= len) {\n var returnValue = objOps[operation.op].call(operation, obj, key, document); // Apply patch\n if (returnValue.test === false) {\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n return returnValue;\n }\n }\n obj = obj[key];\n // If we have more keys in the path, but the next value isn't a non-null object,\n // throw an OPERATION_PATH_UNRESOLVABLE error instead of iterating again.\n if (validateOperation && t < len && (!obj || typeof obj !== \"object\")) {\n throw new JsonPatchError('Cannot perform operation at the desired path', 'OPERATION_PATH_UNRESOLVABLE', index, operation, document);\n }\n }\n }\n}\n/**\n * Apply a full JSON Patch array on a JSON document.\n * Returns the {newDocument, result} of the patch.\n * It modifies the `document` object and `patch` - it gets the values by reference.\n * If you would like to avoid touching your values, clone them:\n * `jsonpatch.applyPatch(document, jsonpatch._deepClone(patch))`.\n *\n * @param document The document to patch\n * @param patch The patch to apply\n * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n * @param mutateDocument Whether to mutate the original document or clone it before applying\n * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n * @return An array of `{newDocument, result}` after the patch\n */\nexport function applyPatch(document, patch, validateOperation, mutateDocument, banPrototypeModifications) {\n if (mutateDocument === void 0) {\n mutateDocument = true;\n }\n if (banPrototypeModifications === void 0) {\n banPrototypeModifications = true;\n }\n if (validateOperation) {\n if (!Array.isArray(patch)) {\n throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');\n }\n }\n if (!mutateDocument) {\n document = _deepClone(document);\n }\n var results = new Array(patch.length);\n for (var i = 0, length_1 = patch.length; i < length_1; i++) {\n // we don't need to pass mutateDocument argument because if it was true, we already deep cloned the object, we'll just pass `true`\n results[i] = applyOperation(document, patch[i], validateOperation, true, banPrototypeModifications, i);\n document = results[i].newDocument; // in case root was replaced\n }\n results.newDocument = document;\n return results;\n}\n/**\n * Apply a single JSON Patch Operation on a JSON document.\n * Returns the updated document.\n * Suitable as a reducer.\n *\n * @param document The document to patch\n * @param operation The operation to apply\n * @return The updated document\n */\nexport function applyReducer(document, operation, index) {\n var operationResult = applyOperation(document, operation);\n if (operationResult.test === false) {\n // failed test\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n return operationResult.newDocument;\n}\n/**\n * Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.\n * @param {object} operation - operation object (patch)\n * @param {number} index - index of operation in the sequence\n * @param {object} [document] - object where the operation is supposed to be applied\n * @param {string} [existingPathFragment] - comes along with `document`\n */\nexport function validator(operation, index, document, existingPathFragment) {\n if (typeof operation !== 'object' || operation === null || Array.isArray(operation)) {\n throw new JsonPatchError('Operation is not an object', 'OPERATION_NOT_AN_OBJECT', index, operation, document);\n } else if (!objOps[operation.op]) {\n throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, document);\n } else if (typeof operation.path !== 'string') {\n throw new JsonPatchError('Operation `path` property is not a string', 'OPERATION_PATH_INVALID', index, operation, document);\n } else if (operation.path.indexOf('/') !== 0 && operation.path.length > 0) {\n // paths that aren't empty string should start with \"/\"\n throw new JsonPatchError('Operation `path` property must start with \"/\"', 'OPERATION_PATH_INVALID', index, operation, document);\n } else if ((operation.op === 'move' || operation.op === 'copy') && typeof operation.from !== 'string') {\n throw new JsonPatchError('Operation `from` property is not present (applicable in `move` and `copy` operations)', 'OPERATION_FROM_REQUIRED', index, operation, document);\n } else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && operation.value === undefined) {\n throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_REQUIRED', index, operation, document);\n } else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && hasUndefined(operation.value)) {\n throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED', index, operation, document);\n } else if (document) {\n if (operation.op == \"add\") {\n var pathLen = operation.path.split(\"/\").length;\n var existingPathLen = existingPathFragment.split(\"/\").length;\n if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {\n throw new JsonPatchError('Cannot perform an `add` operation at the desired path', 'OPERATION_PATH_CANNOT_ADD', index, operation, document);\n }\n } else if (operation.op === 'replace' || operation.op === 'remove' || operation.op === '_get') {\n if (operation.path !== existingPathFragment) {\n throw new JsonPatchError('Cannot perform the operation at a path that does not exist', 'OPERATION_PATH_UNRESOLVABLE', index, operation, document);\n }\n } else if (operation.op === 'move' || operation.op === 'copy') {\n var existingValue = {\n op: \"_get\",\n path: operation.from,\n value: undefined\n };\n var error = validate([existingValue], document);\n if (error && error.name === 'OPERATION_PATH_UNRESOLVABLE') {\n throw new JsonPatchError('Cannot perform the operation from a path that does not exist', 'OPERATION_FROM_UNRESOLVABLE', index, operation, document);\n }\n }\n }\n}\n/**\n * Validates a sequence of operations. If `document` parameter is provided, the sequence is additionally validated against the object document.\n * If error is encountered, returns a JsonPatchError object\n * @param sequence\n * @param document\n * @returns {JsonPatchError|undefined}\n */\nexport function validate(sequence, document, externalValidator) {\n try {\n if (!Array.isArray(sequence)) {\n throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');\n }\n if (document) {\n //clone document and sequence so that we can safely try applying operations\n applyPatch(_deepClone(document), _deepClone(sequence), externalValidator || true);\n } else {\n externalValidator = externalValidator || validator;\n for (var i = 0; i < sequence.length; i++) {\n externalValidator(sequence[i], i, document, undefined);\n }\n }\n } catch (e) {\n if (e instanceof JsonPatchError) {\n return e;\n } else {\n throw e;\n }\n }\n}\n// based on https://github.com/epoberezkin/fast-deep-equal\n// MIT License\n// Copyright (c) 2017 Evgeny Poberezkin\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nexport function _areEquals(a, b) {\n if (a === b) return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a),\n arrB = Array.isArray(b),\n i,\n length,\n key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;) if (!_areEquals(a[i], b[i])) return false;\n return true;\n }\n if (arrA != arrB) return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n for (i = length; i-- !== 0;) if (!b.hasOwnProperty(keys[i])) return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key])) return false;\n }\n return true;\n }\n return a !== a && b !== b;\n}\n;","/*!\n * https://github.com/Starcounter-Jack/JSON-Patch\n * (c) 2017-2022 Joachim Wester\n * MIT licensed\n */\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nexport function hasOwnProperty(obj, key) {\n return _hasOwnProperty.call(obj, key);\n}\nexport function _objectKeys(obj) {\n if (Array.isArray(obj)) {\n var keys_1 = new Array(obj.length);\n for (var k = 0; k < keys_1.length; k++) {\n keys_1[k] = \"\" + k;\n }\n return keys_1;\n }\n if (Object.keys) {\n return Object.keys(obj);\n }\n var keys = [];\n for (var i in obj) {\n if (hasOwnProperty(obj, i)) {\n keys.push(i);\n }\n }\n return keys;\n}\n;\n/**\n* Deeply clone the object.\n* https://jsperf.com/deep-copy-vs-json-stringify-json-parse/25 (recursiveDeepCopy)\n* @param {any} obj value to clone\n* @return {any} cloned obj\n*/\nexport function _deepClone(obj) {\n switch (typeof obj) {\n case \"object\":\n return JSON.parse(JSON.stringify(obj));\n //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case \"undefined\":\n return null;\n //this is how JSON.stringify behaves for array items\n default:\n return obj;\n //no need to clone primitives\n }\n}\n//3x faster than cached /^\\d+$/.test(str)\nexport function isInteger(str) {\n var i = 0;\n var len = str.length;\n var charCode;\n while (i < len) {\n charCode = str.charCodeAt(i);\n if (charCode >= 48 && charCode <= 57) {\n i++;\n continue;\n }\n return false;\n }\n return true;\n}\n/**\n* Escapes a json pointer path\n* @param path The raw pointer\n* @return the Escaped path\n*/\nexport function escapePathComponent(path) {\n if (path.indexOf('/') === -1 && path.indexOf('~') === -1) return path;\n return path.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n/**\n * Unescapes a json pointer path\n * @param path The escaped pointer\n * @return The unescaped path\n */\nexport function unescapePathComponent(path) {\n return path.replace(/~1/g, '/').replace(/~0/g, '~');\n}\nexport function _getPathRecursive(root, obj) {\n var found;\n for (var key in root) {\n if (hasOwnProperty(root, key)) {\n if (root[key] === obj) {\n return escapePathComponent(key) + '/';\n } else if (typeof root[key] === 'object') {\n found = _getPathRecursive(root[key], obj);\n if (found != '') {\n return escapePathComponent(key) + '/' + found;\n }\n }\n }\n }\n return '';\n}\nexport function getPath(root, obj) {\n if (root === obj) {\n return '/';\n }\n var path = _getPathRecursive(root, obj);\n if (path === '') {\n throw new Error(\"Object not found in root\");\n }\n return \"/\" + path;\n}\n/**\n* Recursively checks whether an object has any undefined values inside.\n*/\nexport function hasUndefined(obj) {\n if (obj === undefined) {\n return true;\n }\n if (obj) {\n if (Array.isArray(obj)) {\n for (var i_1 = 0, len = obj.length; i_1 < len; i_1++) {\n if (hasUndefined(obj[i_1])) {\n return true;\n }\n }\n } else if (typeof obj === \"object\") {\n var objKeys = _objectKeys(obj);\n var objKeysLength = objKeys.length;\n for (var i = 0; i < objKeysLength; i++) {\n if (hasUndefined(obj[objKeys[i]])) {\n return true;\n }\n }\n }\n }\n return false;\n}\nfunction patchErrorMessageFormatter(message, args) {\n var messageParts = [message];\n for (var key in args) {\n var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print\n if (typeof value !== 'undefined') {\n messageParts.push(key + \": \" + value);\n }\n }\n return messageParts.join('\\n');\n}\nvar PatchError = /** @class */function (_super) {\n __extends(PatchError, _super);\n function PatchError(message, name, index, operation, tree) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, patchErrorMessageFormatter(message, {\n name: name,\n index: index,\n operation: operation,\n tree: tree\n })) || this;\n _this.name = name;\n _this.index = index;\n _this.operation = operation;\n _this.tree = tree;\n Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359\n _this.message = patchErrorMessageFormatter(message, {\n name: name,\n index: index,\n operation: operation,\n tree: tree\n });\n return _this;\n }\n return PatchError;\n}(Error);\nexport { PatchError };","/*!\n * https://github.com/Starcounter-Jack/JSON-Patch\n * (c) 2017-2021 Joachim Wester\n * MIT license\n */\nimport { _deepClone, _objectKeys, escapePathComponent, hasOwnProperty } from './helpers.mjs';\nimport { applyPatch } from './core.mjs';\nvar beforeDict = new WeakMap();\nvar Mirror = /** @class */function () {\n function Mirror(obj) {\n this.observers = new Map();\n this.obj = obj;\n }\n return Mirror;\n}();\nvar ObserverInfo = /** @class */function () {\n function ObserverInfo(callback, observer) {\n this.callback = callback;\n this.observer = observer;\n }\n return ObserverInfo;\n}();\nfunction getMirror(obj) {\n return beforeDict.get(obj);\n}\nfunction getObserverFromMirror(mirror, callback) {\n return mirror.observers.get(callback);\n}\nfunction removeObserverFromMirror(mirror, observer) {\n mirror.observers.delete(observer.callback);\n}\n/**\n * Detach an observer from an object\n */\nexport function unobserve(root, observer) {\n observer.unobserve();\n}\n/**\n * Observes changes made to an object, which can then be retrieved using generate\n */\nexport function observe(obj, callback) {\n var patches = [];\n var observer;\n var mirror = getMirror(obj);\n if (!mirror) {\n mirror = new Mirror(obj);\n beforeDict.set(obj, mirror);\n } else {\n var observerInfo = getObserverFromMirror(mirror, callback);\n observer = observerInfo && observerInfo.observer;\n }\n if (observer) {\n return observer;\n }\n observer = {};\n mirror.value = _deepClone(obj);\n if (callback) {\n observer.callback = callback;\n observer.next = null;\n var dirtyCheck = function () {\n generate(observer);\n };\n var fastCheck = function () {\n clearTimeout(observer.next);\n observer.next = setTimeout(dirtyCheck);\n };\n if (typeof window !== 'undefined') {\n //not Node\n window.addEventListener('mouseup', fastCheck);\n window.addEventListener('keyup', fastCheck);\n window.addEventListener('mousedown', fastCheck);\n window.addEventListener('keydown', fastCheck);\n window.addEventListener('change', fastCheck);\n }\n }\n observer.patches = patches;\n observer.object = obj;\n observer.unobserve = function () {\n generate(observer);\n clearTimeout(observer.next);\n removeObserverFromMirror(mirror, observer);\n if (typeof window !== 'undefined') {\n window.removeEventListener('mouseup', fastCheck);\n window.removeEventListener('keyup', fastCheck);\n window.removeEventListener('mousedown', fastCheck);\n window.removeEventListener('keydown', fastCheck);\n window.removeEventListener('change', fastCheck);\n }\n };\n mirror.observers.set(callback, new ObserverInfo(callback, observer));\n return observer;\n}\n/**\n * Generate an array of patches from an observer\n */\nexport function generate(observer, invertible) {\n if (invertible === void 0) {\n invertible = false;\n }\n var mirror = beforeDict.get(observer.object);\n _generate(mirror.value, observer.object, observer.patches, \"\", invertible);\n if (observer.patches.length) {\n applyPatch(mirror.value, observer.patches);\n }\n var temp = observer.patches;\n if (temp.length > 0) {\n observer.patches = [];\n if (observer.callback) {\n observer.callback(temp);\n }\n }\n return temp;\n}\n// Dirty check if obj is different from mirror, generate patches and update mirror\nfunction _generate(mirror, obj, patches, path, invertible) {\n if (obj === mirror) {\n return;\n }\n if (typeof obj.toJSON === \"function\") {\n obj = obj.toJSON();\n }\n var newKeys = _objectKeys(obj);\n var oldKeys = _objectKeys(mirror);\n var changed = false;\n var deleted = false;\n //if ever \"move\" operation is implemented here, make sure this test runs OK: \"should not generate the same patch twice (move)\"\n for (var t = oldKeys.length - 1; t >= 0; t--) {\n var key = oldKeys[t];\n var oldVal = mirror[key];\n if (hasOwnProperty(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) {\n var newVal = obj[key];\n if (typeof oldVal == \"object\" && oldVal != null && typeof newVal == \"object\" && newVal != null && Array.isArray(oldVal) === Array.isArray(newVal)) {\n _generate(oldVal, newVal, patches, path + \"/\" + escapePathComponent(key), invertible);\n } else {\n if (oldVal !== newVal) {\n changed = true;\n if (invertible) {\n patches.push({\n op: \"test\",\n path: path + \"/\" + escapePathComponent(key),\n value: _deepClone(oldVal)\n });\n }\n patches.push({\n op: \"replace\",\n path: path + \"/\" + escapePathComponent(key),\n value: _deepClone(newVal)\n });\n }\n }\n } else if (Array.isArray(mirror) === Array.isArray(obj)) {\n if (invertible) {\n patches.push({\n op: \"test\",\n path: path + \"/\" + escapePathComponent(key),\n value: _deepClone(oldVal)\n });\n }\n patches.push({\n op: \"remove\",\n path: path + \"/\" + escapePathComponent(key)\n });\n deleted = true; // property has been deleted\n } else {\n if (invertible) {\n patches.push({\n op: \"test\",\n path: path,\n value: mirror\n });\n }\n patches.push({\n op: \"replace\",\n path: path,\n value: obj\n });\n changed = true;\n }\n }\n if (!deleted && newKeys.length == oldKeys.length) {\n return;\n }\n for (var t = 0; t < newKeys.length; t++) {\n var key = newKeys[t];\n if (!hasOwnProperty(mirror, key) && obj[key] !== undefined) {\n patches.push({\n op: \"add\",\n path: path + \"/\" + escapePathComponent(key),\n value: _deepClone(obj[key])\n });\n }\n }\n}\n/**\n * Create an array of patches from the differences in two objects\n */\nexport function compare(tree1, tree2, invertible) {\n if (invertible === void 0) {\n invertible = false;\n }\n var patches = [];\n _generate(tree1, tree2, patches, '', invertible);\n return patches;\n}","export * from './module/core.mjs';\nexport * from './module/duplex.mjs';\nexport { PatchError as JsonPatchError, _deepClone as deepClone, escapePathComponent, unescapePathComponent } from './module/helpers.mjs';\n\n/**\n * Default export for backwards compat\n */\n\nimport * as core from './module/core.mjs';\nimport * as duplex from './module/duplex.mjs';\nimport { PatchError as JsonPatchError, _deepClone as deepClone, escapePathComponent, unescapePathComponent } from './module/helpers.mjs';\nexport default Object.assign({}, core, duplex, {\n JsonPatchError,\n deepClone,\n escapePathComponent,\n unescapePathComponent\n});","import * as jsonPatch from 'fast-json-patch';\nimport deepmerge from 'deepmerge';\nexport default {\n add,\n replace,\n remove,\n merge,\n mergeDeep,\n context,\n getIn,\n applyPatch,\n parentPathMatch,\n flatten,\n fullyNormalizeArray,\n normalizeArray,\n isPromise,\n forEachNew,\n forEachNewPrimitive,\n isJsonPatch,\n isContextPatch,\n isPatch,\n isMutation,\n isAdditiveMutation,\n isGenerator,\n isFunction,\n isObject,\n isError\n};\nfunction applyPatch(obj, patch, opts) {\n opts = opts || {};\n patch = {\n ...patch,\n path: patch.path && normalizeJSONPath(patch.path)\n };\n if (patch.op === 'merge') {\n const newValue = getInByJsonPath(obj, patch.path);\n Object.assign(newValue, patch.value);\n jsonPatch.applyPatch(obj, [replace(patch.path, newValue)]);\n } else if (patch.op === 'mergeDeep') {\n const currentValue = getInByJsonPath(obj, patch.path);\n const newValue = deepmerge(currentValue, patch.value);\n obj = jsonPatch.applyPatch(obj, [replace(patch.path, newValue)]).newDocument;\n } else if (patch.op === 'add' && patch.path === '' && isObject(patch.value)) {\n // { op: 'add', path: '', value: { a: 1, b: 2 }}\n // has no effect: json patch refuses to do anything.\n // so let's break that patch down into a set of patches,\n // one for each key in the intended root value.\n\n const patches = Object.keys(patch.value).reduce((arr, key) => {\n arr.push({\n op: 'add',\n path: `/${normalizeJSONPath(key)}`,\n value: patch.value[key]\n });\n return arr;\n }, []);\n jsonPatch.applyPatch(obj, patches);\n } else if (patch.op === 'replace' && patch.path === '') {\n let {\n value\n } = patch;\n if (opts.allowMetaPatches && patch.meta && isAdditiveMutation(patch) && (Array.isArray(patch.value) || isObject(patch.value))) {\n value = {\n ...value,\n ...patch.meta\n };\n }\n obj = value;\n } else {\n jsonPatch.applyPatch(obj, [patch]);\n\n // Attach metadata to the resulting value.\n if (opts.allowMetaPatches && patch.meta && isAdditiveMutation(patch) && (Array.isArray(patch.value) || isObject(patch.value))) {\n const currentValue = getInByJsonPath(obj, patch.path);\n const newValue = {\n ...currentValue,\n ...patch.meta\n };\n jsonPatch.applyPatch(obj, [replace(patch.path, newValue)]);\n }\n }\n return obj;\n}\nfunction normalizeJSONPath(path) {\n if (Array.isArray(path)) {\n if (path.length < 1) {\n return '';\n }\n return `/${path.map(item =>\n // eslint-disable-line prefer-template\n (item + '').replace(/~/g, '~0').replace(/\\//g, '~1') // eslint-disable-line prefer-template\n ).join('/')}`;\n }\n return path;\n}\n\n// =========================\n// JSON-Patch Wrappers\n// =========================\n\nfunction add(path, value) {\n return {\n op: 'add',\n path,\n value\n };\n}\n\n// function _get(path) {\n// return { op: '_get', path };\n// }\n\nfunction replace(path, value, meta) {\n return {\n op: 'replace',\n path,\n value,\n meta\n };\n}\nfunction remove(path) {\n return {\n op: 'remove',\n path\n };\n}\n\n// Custom wrappers\nfunction merge(path, value) {\n return {\n type: 'mutation',\n op: 'merge',\n path,\n value\n };\n}\n\n// Custom wrappers\nfunction mergeDeep(path, value) {\n return {\n type: 'mutation',\n op: 'mergeDeep',\n path,\n value\n };\n}\nfunction context(path, value) {\n return {\n type: 'context',\n path,\n value\n };\n}\n\n// =========================\n// Iterators\n// =========================\n\nfunction forEachNew(mutations, fn) {\n try {\n return forEachNewPatch(mutations, forEach, fn);\n } catch (e) {\n return e;\n }\n}\nfunction forEachNewPrimitive(mutations, fn) {\n try {\n return forEachNewPatch(mutations, forEachPrimitive, fn);\n } catch (e) {\n return e;\n }\n}\nfunction forEachNewPatch(mutations, fn, callback) {\n const res = mutations.filter(isAdditiveMutation).map(mutation => fn(mutation.value, callback, mutation.path)) || [];\n const flat = flatten(res);\n const clean = cleanArray(flat);\n return clean;\n}\nfunction forEachPrimitive(obj, fn, basePath) {\n basePath = basePath || [];\n if (Array.isArray(obj)) {\n return obj.map((val, key) => forEachPrimitive(val, fn, basePath.concat(key)));\n }\n if (isObject(obj)) {\n return Object.keys(obj).map(key => forEachPrimitive(obj[key], fn, basePath.concat(key)));\n }\n return fn(obj, basePath[basePath.length - 1], basePath);\n}\nfunction forEach(obj, fn, basePath) {\n basePath = basePath || [];\n let results = [];\n if (basePath.length > 0) {\n const newResults = fn(obj, basePath[basePath.length - 1], basePath);\n if (newResults) {\n results = results.concat(newResults);\n }\n }\n if (Array.isArray(obj)) {\n const arrayResults = obj.map((val, key) => forEach(val, fn, basePath.concat(key)));\n if (arrayResults) {\n results = results.concat(arrayResults);\n }\n } else if (isObject(obj)) {\n const moreResults = Object.keys(obj).map(key => forEach(obj[key], fn, basePath.concat(key)));\n if (moreResults) {\n results = results.concat(moreResults);\n }\n }\n results = flatten(results);\n return results;\n}\n\n// =========================\n// Paths\n// =========================\n\nfunction parentPathMatch(path, arr) {\n if (!Array.isArray(arr)) {\n return false;\n }\n for (let i = 0, len = arr.length; i < len; i += 1) {\n if (arr[i] !== path[i]) {\n return false;\n }\n }\n return true;\n}\nfunction getIn(obj, path) {\n return path.reduce((val, token) => {\n if (typeof token !== 'undefined' && val) {\n return val[token];\n }\n return val;\n }, obj);\n}\n\n// =========================\n// Array\n// =========================\n\nfunction fullyNormalizeArray(arr) {\n return cleanArray(flatten(normalizeArray(arr)));\n}\nfunction normalizeArray(arr) {\n return Array.isArray(arr) ? arr : [arr];\n}\nfunction flatten(arr) {\n return [].concat(...arr.map(val => Array.isArray(val) ? flatten(val) : val));\n}\nfunction cleanArray(arr) {\n return arr.filter(elm => typeof elm !== 'undefined');\n}\n\n// =========================\n// Is-Thing.\n// =========================\n\nfunction isObject(val) {\n return val && typeof val === 'object';\n}\nfunction isPromise(val) {\n return isObject(val) && isFunction(val.then);\n}\nfunction isFunction(val) {\n return val && typeof val === 'function';\n}\nfunction isError(patch) {\n return patch instanceof Error;\n}\nfunction isJsonPatch(patch) {\n if (isPatch(patch)) {\n const {\n op\n } = patch;\n return op === 'add' || op === 'remove' || op === 'replace';\n }\n return false;\n}\nfunction isGenerator(thing) {\n return Object.prototype.toString.call(thing) === '[object GeneratorFunction]';\n}\nfunction isMutation(patch) {\n return isJsonPatch(patch) || isPatch(patch) && patch.type === 'mutation';\n}\nfunction isAdditiveMutation(patch) {\n return isMutation(patch) && (patch.op === 'add' || patch.op === 'replace' || patch.op === 'merge' || patch.op === 'mergeDeep');\n}\nfunction isContextPatch(patch) {\n return isPatch(patch) && patch.type === 'context';\n}\nfunction isPatch(patch) {\n return patch && typeof patch === 'object';\n}\nfunction getInByJsonPath(obj, jsonPath) {\n try {\n return jsonPatch.getValueByPointer(obj, jsonPath);\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n return {};\n }\n}","import _AggregateError from \"@babel/runtime-corejs3/core-js/aggregate-error\";\n/**\n * @public\n */\nclass ApiDOMAggregateError extends _AggregateError {\n constructor(errors, message, options) {\n super(errors, message, options);\n this.name = this.constructor.name;\n if (typeof message === 'string') {\n this.message = message;\n }\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = new Error(message).stack;\n }\n\n /**\n * This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.\n * Node.js >= 16.9.0 supports error causes natively.\n */\n if (options != null && typeof options === 'object' && Object.hasOwn(options, 'cause') && !('cause' in this)) {\n const {\n cause\n } = options;\n this.cause = cause;\n if (cause instanceof Error && 'stack' in cause) {\n this.stack = `${this.stack}\\nCAUSE: ${cause.stack}`;\n }\n }\n }\n}\nexport default ApiDOMAggregateError;","import ApiDOMAggregateError from \"./ApiDOMAggregateError.mjs\";\n/**\n * @public\n */\nclass ApiDOMError extends Error {\n static [Symbol.hasInstance](instance) {\n // we want to ApiDOMAggregateError to act as if ApiDOMError was its superclass\n return super[Symbol.hasInstance](instance) || Function.prototype[Symbol.hasInstance].call(ApiDOMAggregateError, instance);\n }\n constructor(message, options) {\n super(message, options);\n this.name = this.constructor.name;\n if (typeof message === 'string') {\n this.message = message;\n }\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = new Error(message).stack;\n }\n\n /**\n * This needs to stay here until our minimum supported version of Node.js is >= 16.9.0.\n * Node.js is >= 16.9.0 supports error causes natively.\n */\n if (options != null && typeof options === 'object' && Object.hasOwn(options, 'cause') && !('cause' in this)) {\n const {\n cause\n } = options;\n this.cause = cause;\n if (cause instanceof Error && 'stack' in cause) {\n this.stack = `${this.stack}\\nCAUSE: ${cause.stack}`;\n }\n }\n }\n}\nexport default ApiDOMError;","import ApiDOMError from \"./ApiDOMError.mjs\";\n/**\n * @public\n */\nclass ApiDOMStructuredError extends ApiDOMError {\n constructor(message, structuredOptions) {\n super(message, structuredOptions);\n if (structuredOptions != null && typeof structuredOptions === 'object') {\n const {\n cause,\n ...causelessOptions\n } = structuredOptions;\n Object.assign(this, causelessOptions);\n }\n }\n}\nexport default ApiDOMStructuredError;","import ApiDOMError from \"./ApiDOMError.mjs\";\n/**\n * @public\n */\nclass UnsupportedOperationError extends ApiDOMError {}\nexport default UnsupportedOperationError;","import UnsupportedOperationError from \"./UnsupportedOperationError.mjs\";\n/**\n * @public\n */\nclass NotImplementedError extends UnsupportedOperationError {}\nexport default NotImplementedError;","/**\n * A function that always returns `false`. Any passed in parameters are ignored.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig * -> Boolean\n * @param {*}\n * @return {Boolean}\n * @see R.T\n * @example\n *\n * R.F(); //=> false\n */\nvar F = function () {\n return false;\n};\nexport default F;","/**\n * A function that always returns `true`. Any passed in parameters are ignored.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig * -> Boolean\n * @param {*}\n * @return {Boolean}\n * @see R.F\n * @example\n *\n * R.T(); //=> true\n */\nvar T = function () {\n return true;\n};\nexport default T;","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nexport default function _concat(set1, set2) {\n set1 = set1 || [];\n set2 = set2 || [];\n var idx;\n var len1 = set1.length;\n var len2 = set2.length;\n var result = [];\n idx = 0;\n while (idx < len1) {\n result[result.length] = set1[idx];\n idx += 1;\n }\n idx = 0;\n while (idx < len2) {\n result[result.length] = set2[idx];\n idx += 1;\n }\n return result;\n}","export default function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}","import _arity from \"./_arity.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curryN(length, received, fn) {\n return function () {\n var combined = [];\n var argsIdx = 0;\n var left = length;\n var combinedIdx = 0;\n var hasPlaceholder = false;\n while (combinedIdx < received.length || argsIdx < arguments.length) {\n var result;\n if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {\n result = received[combinedIdx];\n } else {\n result = arguments[argsIdx];\n argsIdx += 1;\n }\n combined[combinedIdx] = result;\n if (!_isPlaceholder(result)) {\n left -= 1;\n } else {\n hasPlaceholder = true;\n }\n combinedIdx += 1;\n }\n return !hasPlaceholder && left <= 0 ? fn.apply(this, combined) : _arity(Math.max(0, left), _curryN(length, combined, fn));\n };\n}","import _arity from \"./internal/_arity.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _curryN from \"./internal/_curryN.js\";\n\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n * const sumArgs = (...args) => R.sum(args);\n *\n * const curriedAddFourNumbers = R.curryN(4, sumArgs);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n */\nvar curryN = /*#__PURE__*/_curry2(function curryN(length, fn) {\n if (length === 1) {\n return _curry1(fn);\n }\n return _arity(length, _curryN(length, [], fn));\n});\nexport default curryN;","import _curry1 from \"./_curry1.js\";\nimport _curry2 from \"./_curry2.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","export default function _isTransformer(obj) {\n return obj != null && typeof obj['@@transducer/step'] === 'function';\n}","import _isArray from \"./_isArray.js\";\nimport _isTransformer from \"./_isTransformer.js\";\n\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer created by [transducerCreator] to return a new transformer\n * (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} transducerCreator transducer factory if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\nexport default function _dispatchable(methodNames, transducerCreator, fn) {\n return function () {\n if (arguments.length === 0) {\n return fn();\n }\n var obj = arguments[arguments.length - 1];\n if (!_isArray(obj)) {\n var idx = 0;\n while (idx < methodNames.length) {\n if (typeof obj[methodNames[idx]] === 'function') {\n return obj[methodNames[idx]].apply(obj, Array.prototype.slice.call(arguments, 0, -1));\n }\n idx += 1;\n }\n if (_isTransformer(obj)) {\n var transducer = transducerCreator.apply(null, Array.prototype.slice.call(arguments, 0, -1));\n return transducer(obj);\n }\n }\n return fn.apply(this, arguments);\n };\n}","export default function _reduced(x) {\n return x && x['@@transducer/reduced'] ? x : {\n '@@transducer/value': x,\n '@@transducer/reduced': true\n };\n}","export default {\n init: function () {\n return this.xf['@@transducer/init']();\n },\n result: function (result) {\n return this.xf['@@transducer/result'](result);\n }\n};","import _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\nvar XAll = /*#__PURE__*/function () {\n function XAll(f, xf) {\n this.xf = xf;\n this.f = f;\n this.all = true;\n }\n XAll.prototype['@@transducer/init'] = _xfBase.init;\n XAll.prototype['@@transducer/result'] = function (result) {\n if (this.all) {\n result = this.xf['@@transducer/step'](result, true);\n }\n return this.xf['@@transducer/result'](result);\n };\n XAll.prototype['@@transducer/step'] = function (result, input) {\n if (!this.f(input)) {\n this.all = false;\n result = _reduced(this.xf['@@transducer/step'](result, false));\n }\n return result;\n };\n return XAll;\n}();\nexport default function _xall(f) {\n return function (xf) {\n return new XAll(f, xf);\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xall from \"./internal/_xall.js\";\n\n/**\n * Returns `true` if all elements of the list match the predicate, `false` if\n * there are any that don't.\n *\n * Dispatches to the `all` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is satisfied by every element, `false`\n * otherwise.\n * @see R.any, R.none, R.transduce\n * @example\n *\n * const equals3 = R.equals(3);\n * R.all(equals3)([3, 3, 3, 3]); //=> true\n * R.all(equals3)([3, 3, 1, 3]); //=> false\n */\nvar all = /*#__PURE__*/_curry2(/*#__PURE__*/_dispatchable(['all'], _xall, function all(fn, list) {\n var idx = 0;\n while (idx < list.length) {\n if (!fn(list[idx])) {\n return false;\n }\n idx += 1;\n }\n return true;\n}));\nexport default all;","export default function _arrayFromIterator(iter) {\n var list = [];\n var next;\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n return list;\n}","export default function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n idx += 1;\n }\n return false;\n}","export default function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","import _has from \"./_has.js\";\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\nexport default _isArguments;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\nimport _isArguments from \"./internal/_isArguments.js\";\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values, R.toPairs\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n});\nexport default keys;","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig * -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(async () => {}); //=> \"AsyncFunction\"\n * R.type(undefined); //=> \"Undefined\"\n * R.type(BigInt(123)); //=> \"BigInt\"\n */\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nexport default type;","import _arrayFromIterator from \"./_arrayFromIterator.js\";\nimport _includesWith from \"./_includesWith.js\";\nimport _functionName from \"./_functionName.js\";\nimport _has from \"./_has.js\";\nimport _objectIs from \"./_objectIs.js\";\nimport keys from \"../keys.js\";\nimport type from \"../type.js\";\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparison of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n var b = _arrayFromIterator(bIterator);\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n }\n\n // if *a* array contains any element that is not included in *b*\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\nexport default function _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n var typeA = type(a);\n if (typeA !== type(b)) {\n return false;\n }\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n break;\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n break;\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n break;\n case 'Error':\n return a.name === b.name && a.message === b.message;\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n break;\n }\n var idx = stackA.length - 1;\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n idx -= 1;\n }\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n var keysA = keys(a);\n if (keysA.length !== keys(b).length) {\n return false;\n }\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n idx = keysA.length - 1;\n while (idx >= 0) {\n var key = keysA[idx];\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n idx -= 1;\n }\n return true;\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _equals from \"./internal/_equals.js\";\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\nvar equals = /*#__PURE__*/_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\nexport default equals;","import equals from \"../equals.js\";\nexport default function _indexOf(list, a, idx) {\n var inf, item;\n // Array.prototype.indexOf doesn't exist below IE9\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n while (idx < list.length) {\n item = list[idx];\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n }\n // non-zero numbers can utilise Set\n return list.indexOf(a, idx);\n\n // all these types can utilise Set\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n }\n }\n // anything else not covered above, defer to R.equals\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n}","import _indexOf from \"./_indexOf.js\";\nexport default function _includes(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}","export default function _map(fn, functor) {\n var idx = 0;\n var len = functor.length;\n var result = Array(len);\n while (idx < len) {\n result[idx] = fn(functor[idx]);\n idx += 1;\n }\n return result;\n}","export default function _quote(s) {\n var escaped = s.replace(/\\\\/g, '\\\\\\\\').replace(/[\\b]/g, '\\\\b') // \\b matches word boundary; [\\b] matches backspace\n .replace(/\\f/g, '\\\\f').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/\\t/g, '\\\\t').replace(/\\v/g, '\\\\v').replace(/\\0/g, '\\\\0');\n return '\"' + escaped.replace(/\"/g, '\\\\\"') + '\"';\n}","/**\n * Polyfill from .\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\nexport default _toISOString;","export default function _complement(f) {\n return function () {\n return !f.apply(this, arguments);\n };\n}","export default function _arrayReduce(reducer, acc, list) {\n var index = 0;\n var length = list.length;\n while (index < length) {\n acc = reducer(acc, list[index]);\n index += 1;\n }\n return acc;\n}","export default function _filter(fn, list) {\n var idx = 0;\n var len = list.length;\n var result = [];\n while (idx < len) {\n if (fn(list[idx])) {\n result[result.length] = list[idx];\n }\n idx += 1;\n }\n return result;\n}","export default function _isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}","import _xfBase from \"./_xfBase.js\";\nvar XFilter = /*#__PURE__*/function () {\n function XFilter(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n XFilter.prototype['@@transducer/init'] = _xfBase.init;\n XFilter.prototype['@@transducer/result'] = _xfBase.result;\n XFilter.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;\n };\n return XFilter;\n}();\nexport default function _xfilter(f) {\n return function (xf) {\n return new XFilter(f, xf);\n };\n}","import _arrayReduce from \"./internal/_arrayReduce.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _filter from \"./internal/_filter.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _xfilter from \"./internal/_xfilter.js\";\nimport keys from \"./keys.js\";\n\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @category Object\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n * const isEven = n => n % 2 === 0;\n *\n * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\nvar filter = /*#__PURE__*/_curry2(/*#__PURE__*/_dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filterable) {\n return _isObject(filterable) ? _arrayReduce(function (acc, key) {\n if (pred(filterable[key])) {\n acc[key] = filterable[key];\n }\n return acc;\n }, {}, keys(filterable)) :\n // else\n _filter(pred, filterable);\n}));\nexport default filter;","import _complement from \"./internal/_complement.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport filter from \"./filter.js\";\n\n/**\n * The complement of [`filter`](#filter).\n *\n * Acts as a transducer if a transformer is given in list position. Filterable\n * objects include plain objects or any object that has a filter method such\n * as `Array`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array}\n * @see R.filter, R.transduce, R.addIndex\n * @example\n *\n * const isOdd = (n) => n % 2 !== 0;\n *\n * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\nvar reject = /*#__PURE__*/_curry2(function reject(pred, filterable) {\n return filter(_complement(pred), filterable);\n});\nexport default reject;","import _includes from \"./_includes.js\";\nimport _map from \"./_map.js\";\nimport _quote from \"./_quote.js\";\nimport _toISOString from \"./_toISOString.js\";\nimport keys from \"../keys.js\";\nimport reject from \"../reject.js\";\nexport default function _toString(x, seen) {\n var recur = function recur(y) {\n var xs = seen.concat([x]);\n return _includes(y, xs) ? '' : _toString(y, xs);\n };\n\n // mapPairs :: (Object, [String]) -> [String]\n var mapPairs = function (obj, keys) {\n return _map(function (k) {\n return _quote(k) + ': ' + recur(obj[k]);\n }, keys.slice().sort());\n };\n switch (Object.prototype.toString.call(x)) {\n case '[object Arguments]':\n return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';\n case '[object Array]':\n return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) {\n return /^\\d+$/.test(k);\n }, keys(x)))).join(', ') + ']';\n case '[object Boolean]':\n return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();\n case '[object Date]':\n return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';\n case '[object Map]':\n return 'new Map(' + recur(Array.from(x)) + ')';\n case '[object Null]':\n return 'null';\n case '[object Number]':\n return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);\n case '[object Set]':\n return 'new Set(' + recur(Array.from(x).sort()) + ')';\n case '[object String]':\n return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);\n case '[object Undefined]':\n return 'undefined';\n default:\n if (typeof x.toString === 'function') {\n var repr = x.toString();\n if (repr !== '[object Object]') {\n return repr;\n }\n }\n return '{' + mapPairs(x, keys(x)).join(', ') + '}';\n }\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _toString from \"./internal/_toString.js\";\n\n/**\n * Returns the string representation of the given value. `eval`'ing the output\n * should result in a value equivalent to the input value. Many of the built-in\n * `toString` methods do not satisfy this requirement.\n *\n * If the given value is an `[object Object]` with a `toString` method other\n * than `Object.prototype.toString`, this method is invoked with no arguments\n * to produce the return value. This means user-defined constructor functions\n * can provide a suitable `toString` method. For example:\n *\n * function Point(x, y) {\n * this.x = x;\n * this.y = y;\n * }\n *\n * Point.prototype.toString = function() {\n * return 'new Point(' + this.x + ', ' + this.y + ')';\n * };\n *\n * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)'\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category String\n * @sig * -> String\n * @param {*} val\n * @return {String}\n * @example\n *\n * R.toString(42); //=> '42'\n * R.toString('abc'); //=> '\"abc\"'\n * R.toString([1, 2, 3]); //=> '[1, 2, 3]'\n * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{\"bar\": 2, \"baz\": 3, \"foo\": 1}'\n * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date(\"2001-02-03T04:05:06.000Z\")'\n */\nvar toString = /*#__PURE__*/_curry1(function toString(val) {\n return _toString(val, []);\n});\nexport default toString;","import _curry2 from \"./internal/_curry2.js\";\nimport toString from \"./toString.js\";\n\n/**\n * Returns the larger of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.maxBy, R.min\n * @example\n *\n * R.max(789, 123); //=> 789\n * R.max('a', 'b'); //=> 'b'\n */\nvar max = /*#__PURE__*/_curry2(function max(a, b) {\n if (a === b) {\n return b;\n }\n function safeMax(x, y) {\n if (x > y !== y > x) {\n return y > x ? y : x;\n }\n return undefined;\n }\n var maxByValue = safeMax(a, b);\n if (maxByValue !== undefined) {\n return maxByValue;\n }\n var maxByType = safeMax(typeof a, typeof b);\n if (maxByType !== undefined) {\n return maxByType === typeof a ? a : b;\n }\n var stringA = toString(a);\n var maxByStringValue = safeMax(stringA, toString(b));\n if (maxByStringValue !== undefined) {\n return maxByStringValue === stringA ? a : b;\n }\n return b;\n});\nexport default max;","import _xfBase from \"./_xfBase.js\";\nvar XMap = /*#__PURE__*/function () {\n function XMap(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n XMap.prototype['@@transducer/init'] = _xfBase.init;\n XMap.prototype['@@transducer/result'] = _xfBase.result;\n XMap.prototype['@@transducer/step'] = function (result, input) {\n return this.xf['@@transducer/step'](result, this.f(input));\n };\n return XMap;\n}();\nvar _xmap = function _xmap(f) {\n return function (xf) {\n return new XMap(f, xf);\n };\n};\nexport default _xmap;","import _arrayReduce from \"./internal/_arrayReduce.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _map from \"./internal/_map.js\";\nimport _xmap from \"./internal/_xmap.js\";\nimport curryN from \"./curryN.js\";\nimport keys from \"./keys.js\";\n\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex, R.pluck, R.project\n * @example\n *\n * const double = x => x * 2;\n *\n * R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\nvar map = /*#__PURE__*/_curry2(/*#__PURE__*/_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {\n switch (Object.prototype.toString.call(functor)) {\n case '[object Function]':\n return curryN(functor.length, function () {\n return fn.call(this, functor.apply(this, arguments));\n });\n case '[object Object]':\n return _arrayReduce(function (acc, key) {\n acc[key] = fn(functor[key]);\n return acc;\n }, {}, keys(functor));\n default:\n return _map(fn, functor);\n }\n}));\nexport default map;","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _isString from \"./_isString.js\";\nexport default function _nth(offset, list) {\n var idx = offset < 0 ? list.length + offset : offset;\n return _isString(list) ? list.charAt(idx) : list[idx];\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport _nth from \"./internal/_nth.js\";\n\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig Idx -> {s: a} -> a | Undefined\n * @param {String|Number} p The property name or array index\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path, R.props, R.pluck, R.project, R.nth\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n * R.prop(0, [100]); //=> 100\n * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4\n */\n\nvar prop = /*#__PURE__*/_curry2(function prop(p, obj) {\n if (obj == null) {\n return;\n }\n return _isInteger(p) ? _nth(p, obj) : obj[p];\n});\nexport default prop;","import _curry2 from \"./internal/_curry2.js\";\nimport map from \"./map.js\";\nimport prop from \"./prop.js\";\n\n/**\n * Returns a new list by plucking the same named property off all objects in\n * the list supplied.\n *\n * `pluck` will work on\n * any [functor](https://github.com/fantasyland/fantasy-land#functor) in\n * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => k -> f {k: v} -> f v\n * @param {Number|String} key The key name to pluck off of each object.\n * @param {Array} f The array or functor to consider.\n * @return {Array} The list of values for the given key.\n * @see R.project, R.prop, R.props\n * @example\n *\n * var getAges = R.pluck('age');\n * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27]\n *\n * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3]\n * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5}\n * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5]\n * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5]\n */\nvar pluck = /*#__PURE__*/_curry2(function pluck(p, list) {\n return map(prop(p), list);\n});\nexport default pluck;","import _curry1 from \"./_curry1.js\";\nimport _isArray from \"./_isArray.js\";\nimport _isString from \"./_isString.js\";\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n * _isArrayLike({nodeType: 1, length: 1}) // => false\n */\nvar _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n if (!x) {\n return false;\n }\n if (typeof x !== 'object') {\n return false;\n }\n if (_isString(x)) {\n return false;\n }\n if (x.length === 0) {\n return true;\n }\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n return false;\n});\nexport default _isArrayLike;","import _isArrayLike from \"./_isArrayLike.js\";\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\nexport default function _createReduce(arrayReduce, methodReduce, iterableReduce) {\n return function _reduce(xf, acc, list) {\n if (_isArrayLike(list)) {\n return arrayReduce(xf, acc, list);\n }\n if (list == null) {\n return acc;\n }\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return methodReduce(xf, acc, list, 'fantasy-land/reduce');\n }\n if (list[symIterator] != null) {\n return iterableReduce(xf, acc, list[symIterator]());\n }\n if (typeof list.next === 'function') {\n return iterableReduce(xf, acc, list);\n }\n if (typeof list.reduce === 'function') {\n return methodReduce(xf, acc, list, 'reduce');\n }\n throw new TypeError('reduce: list must be array or iterable');\n };\n}","export default function _xArrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n idx += 1;\n }\n return xf['@@transducer/result'](acc);\n}","import _arity from \"./internal/_arity.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * const log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\nvar bind = /*#__PURE__*/_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\nexport default bind;","import _createReduce from \"./_createReduce.js\";\nimport _xArrayReduce from \"./_xArrayReduce.js\";\nimport bind from \"../bind.js\";\nfunction _xIterableReduce(xf, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n step = iter.next();\n }\n return xf['@@transducer/result'](acc);\n}\nfunction _xMethodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\nvar _xReduce = /*#__PURE__*/_createReduce(_xArrayReduce, _xMethodReduce, _xIterableReduce);\nexport default _xReduce;","var XWrap = /*#__PURE__*/function () {\n function XWrap(fn) {\n this.f = fn;\n }\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n return XWrap;\n}();\nexport default function _xwrap(fn) {\n return new XWrap(fn);\n}","import _curry3 from \"./internal/_curry3.js\";\nimport _xReduce from \"./internal/_xReduce.js\";\nimport _xwrap from \"./internal/_xwrap.js\";\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Be cautious of mutating and returning the accumulator. If you reuse it across\n * invocations, it will continue to accumulate onto the same value. The general\n * recommendation is to always return a new value. If you can't do so for\n * performance reasons, then be sure to reinitialize the accumulator on each\n * invocation.\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\nvar reduce = /*#__PURE__*/_curry3(function (xf, acc, list) {\n return _xReduce(typeof xf === 'function' ? _xwrap(xf) : xf, acc, list);\n});\nexport default reduce;","import _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\nimport max from \"./max.js\";\nimport pluck from \"./pluck.js\";\nimport reduce from \"./reduce.js\";\n\n/**\n * Takes a list of predicates and returns a predicate that returns true for a\n * given list of arguments if every one of the provided predicates is satisfied\n * by those arguments.\n *\n * The function returned is a curried function whose arity matches that of the\n * highest-arity predicate.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Logic\n * @sig [(*... -> Boolean)] -> (*... -> Boolean)\n * @param {Array} predicates An array of predicates to check\n * @return {Function} The combined predicate\n * @see R.anyPass, R.both\n * @example\n *\n * const isQueen = R.propEq('Q', 'rank');\n * const isSpade = R.propEq('♠︎', 'suit');\n * const isQueenOfSpades = R.allPass([isQueen, isSpade]);\n *\n * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false\n * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true\n */\nvar allPass = /*#__PURE__*/_curry1(function allPass(preds) {\n return curryN(reduce(max, 0, pluck('length', preds)), function () {\n var idx = 0;\n var len = preds.length;\n while (idx < len) {\n if (!preds[idx].apply(this, arguments)) {\n return false;\n }\n idx += 1;\n }\n return true;\n });\n});\nexport default allPass;","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Returns a function that always returns the given value. Note that for\n * non-primitives the value returned is a reference to the original value.\n *\n * This function is known as `const`, `constant`, or `K` (for K combinator) in\n * other languages and libraries.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> (* -> a)\n * @param {*} val The value to wrap in a function\n * @return {Function} A Function :: * -> val.\n * @example\n *\n * const t = R.always('Tee');\n * t(); //=> 'Tee'\n */\nvar always = /*#__PURE__*/_curry1(function always(val) {\n return function () {\n return val;\n };\n});\nexport default always;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns the first argument if it is falsy, otherwise the second argument.\n * Acts as the boolean `and` statement if both inputs are `Boolean`s.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> b -> a | b\n * @param {Any} a\n * @param {Any} b\n * @return {Any}\n * @see R.both, R.or\n * @example\n *\n * R.and(true, true); //=> true\n * R.and(true, false); //=> false\n * R.and(false, true); //=> false\n * R.and(false, false); //=> false\n */\nvar and = /*#__PURE__*/_curry2(function and(a, b) {\n return a && b;\n});\nexport default and;","import _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\nimport max from \"./max.js\";\nimport pluck from \"./pluck.js\";\nimport reduce from \"./reduce.js\";\n\n/**\n * Takes a list of predicates and returns a predicate that returns true for a\n * given list of arguments if at least one of the provided predicates is\n * satisfied by those arguments.\n *\n * The function returned is a curried function whose arity matches that of the\n * highest-arity predicate.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Logic\n * @sig [(*... -> Boolean)] -> (*... -> Boolean)\n * @param {Array} predicates An array of predicates to check\n * @return {Function} The combined predicate\n * @see R.allPass, R.either\n * @example\n *\n * const isClub = R.propEq('♣', 'suit');\n * const isSpade = R.propEq('♠', 'suit');\n * const isBlackCard = R.anyPass([isClub, isSpade]);\n *\n * isBlackCard({rank: '10', suit: '♣'}); //=> true\n * isBlackCard({rank: 'Q', suit: '♠'}); //=> true\n * isBlackCard({rank: 'Q', suit: '♦'}); //=> false\n */\nvar anyPass = /*#__PURE__*/_curry1(function anyPass(preds) {\n return curryN(reduce(max, 0, pluck('length', preds)), function () {\n var idx = 0;\n var len = preds.length;\n while (idx < len) {\n if (preds[idx].apply(this, arguments)) {\n return true;\n }\n idx += 1;\n }\n return false;\n });\n});\nexport default anyPass;","import _arrayReduce from \"./_arrayReduce.js\";\nimport _createReduce from \"./_createReduce.js\";\nfunction _iterableReduce(reducer, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = reducer(acc, step.value);\n step = iter.next();\n }\n return acc;\n}\nfunction _methodReduce(reducer, acc, obj, methodName) {\n return obj[methodName](reducer, acc);\n}\nvar _reduce = /*#__PURE__*/_createReduce(_arrayReduce, _methodReduce, _iterableReduce);\nexport default _reduce;","import _concat from \"./internal/_concat.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport map from \"./map.js\";\n\n/**\n * ap applies a list of functions to a list of values.\n *\n * Dispatches to the `ap` method of the first argument, if present. Also\n * treats curried functions as applicatives.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig [a -> b] -> [a] -> [b]\n * @sig Apply f => f (a -> b) -> f a -> f b\n * @sig (r -> a -> b) -> (r -> a) -> (r -> b)\n * @param {*} applyF\n * @param {*} applyX\n * @return {*}\n * @example\n *\n * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6]\n * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> [\"tasty pizza\", \"tasty salad\", \"PIZZA\", \"SALAD\"]\n *\n * // R.ap can also be used as S combinator\n * // when only two functions are passed\n * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA'\n * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)]\n */\nvar ap = /*#__PURE__*/_curry2(function ap(applyF, applyX) {\n return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) {\n return applyF(x)(applyX(x));\n } : _reduce(function (acc, f) {\n return _concat(acc, map(f, applyX));\n }, [], applyF);\n});\nexport default ap;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Applies function `fn` to the argument list `args`. This is useful for\n * creating a fixed-arity function from a variadic function. `fn` should be a\n * bound function if context is significant.\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig (*... -> a) -> [*] -> a\n * @param {Function} fn The function which will be called with `args`\n * @param {Array} args The arguments to call `fn` with\n * @return {*} result The result, equivalent to `fn(...args)`\n * @see R.call, R.unapply\n * @example\n *\n * const nums = [1, 2, 3, -99, 42, 6, 7];\n * R.apply(Math.max, nums); //=> 42\n * @symb R.apply(f, [a, b, c]) = f(a, b, c)\n */\nvar apply = /*#__PURE__*/_curry2(function apply(fn, args) {\n return fn.apply(this, args);\n});\nexport default apply;","import _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\n\n/**\n * Returns a curried equivalent of the provided function. The curried function\n * has two unusual capabilities. First, its arguments needn't be provided one\n * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * Please note that default parameters don't count towards a [function arity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length)\n * and therefore `curry` won't work well with those.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (* -> a) -> (* -> a)\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curryN, R.partial\n * @example\n *\n * const addFourNumbers = (a, b, c, d) => a + b + c + d;\n * const curriedAddFourNumbers = R.curry(addFourNumbers);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n *\n * // R.curry not working well with default parameters\n * const h = R.curry((a, b, c = 2) => a + b + c);\n * h(1)(2)(7); //=> Error! (`3` is not a function!)\n */\nvar curry = /*#__PURE__*/_curry1(function curry(fn) {\n return curryN(fn.length, fn);\n});\nexport default curry;","import _isArray from \"./_isArray.js\";\nimport _isInteger from \"./_isInteger.js\";\n\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @private\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object|Array} obj The object to clone\n * @return {Object|Array} A new object equivalent to the original except for the changed property.\n */\nexport default function _assoc(prop, val, obj) {\n if (_isInteger(prop) && _isArray(obj)) {\n var arr = [].concat(obj);\n arr[prop] = val;\n return arr;\n }\n var result = {};\n for (var p in obj) {\n result[p] = obj[p];\n }\n result[prop] = val;\n return result;\n}","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\nvar isNil = /*#__PURE__*/_curry1(function isNil(x) {\n return x == null;\n});\nexport default isNil;","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport _assoc from \"./internal/_assoc.js\";\nimport isNil from \"./isNil.js\";\n\n/**\n * Makes a shallow clone of an object, setting or overriding the nodes required\n * to create the given path, and placing the specific value at the tail end of\n * that path. Note that this copies and flattens prototype properties onto the\n * new object as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> a -> {a} -> {a}\n * @param {Array} path the path to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except along the specified path.\n * @see R.dissocPath\n * @example\n *\n * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}\n *\n * // Any missing or non-object keys in path will be overridden\n * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}\n */\nvar assocPath = /*#__PURE__*/_curry3(function assocPath(path, val, obj) {\n if (path.length === 0) {\n return val;\n }\n var idx = path[0];\n if (path.length > 1) {\n var nextObj = !isNil(obj) && _has(idx, obj) && typeof obj[idx] === 'object' ? obj[idx] : _isInteger(path[1]) ? [] : {};\n val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);\n }\n return _assoc(idx, val, obj);\n});\nexport default assocPath;","import _curry3 from \"./internal/_curry3.js\";\nimport assocPath from \"./assocPath.js\";\n\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig Idx -> a -> {k: v} -> {k: v}\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except for the changed property.\n * @see R.dissoc, R.pick\n * @example\n *\n * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}\n */\nvar assoc = /*#__PURE__*/_curry3(function assoc(prop, val, obj) {\n return assocPath([prop], val, obj);\n});\nexport default assoc;","export default function _isFunction(x) {\n var type = Object.prototype.toString.call(x);\n return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]';\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _arrayReduce from \"./internal/_arrayReduce.js\";\nimport ap from \"./ap.js\";\nimport curryN from \"./curryN.js\";\nimport map from \"./map.js\";\n\n/**\n * \"lifts\" a function to be the specified arity, so that it may \"map over\" that\n * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig Number -> (*... -> *) -> ([*]... -> [*])\n * @param {Function} fn The function to lift into higher context\n * @return {Function} The lifted function.\n * @see R.lift, R.ap\n * @example\n *\n * const madd3 = R.liftN(3, (...args) => R.sum(args));\n * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]\n */\nvar liftN = /*#__PURE__*/_curry2(function liftN(arity, fn) {\n var lifted = curryN(arity, fn);\n return curryN(arity, function () {\n return _arrayReduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1));\n });\n});\nexport default liftN;","import _curry1 from \"./internal/_curry1.js\";\nimport liftN from \"./liftN.js\";\n\n/**\n * \"lifts\" a function of arity >= 1 so that it may \"map over\" a list, Function or other\n * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig (*... -> *) -> ([*]... -> [*])\n * @param {Function} fn The function to lift into higher context\n * @return {Function} The lifted function.\n * @see R.liftN\n * @example\n *\n * const madd3 = R.lift((a, b, c) => a + b + c);\n *\n * madd3([100, 200], [30, 40], [5, 6, 7]); //=> [135, 136, 137, 145, 146, 147, 235, 236, 237, 245, 246, 247]\n *\n * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e);\n *\n * madd5([10, 20], [1], [2, 3], [4], [100, 200]); //=> [117, 217, 118, 218, 127, 227, 128, 228]\n */\nvar lift = /*#__PURE__*/_curry1(function lift(fn) {\n return liftN(fn.length, fn);\n});\nexport default lift;","import _curry2 from \"./internal/_curry2.js\";\nimport _isFunction from \"./internal/_isFunction.js\";\nimport and from \"./and.js\";\nimport lift from \"./lift.js\";\n\n/**\n * A function which calls the two provided functions and returns the `&&`\n * of the results.\n * It returns the result of the first function if it is false-y and the result\n * of the second function otherwise. Note that this is short-circuited,\n * meaning that the second function will not be invoked if the first returns a\n * false-y value.\n *\n * In addition to functions, `R.both` also accepts any fantasy-land compatible\n * applicative functor.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)\n * @param {Function} f A predicate\n * @param {Function} g Another predicate\n * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together.\n * @see R.either, R.allPass, R.and\n * @example\n *\n * const gt10 = R.gt(R.__, 10)\n * const lt20 = R.lt(R.__, 20)\n * const f = R.both(gt10, lt20);\n * f(15); //=> true\n * f(30); //=> false\n *\n * R.both(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(false)\n * R.both([false, false, 'a'], [11]); //=> [false, false, 11]\n */\nvar both = /*#__PURE__*/_curry2(function both(f, g) {\n return _isFunction(f) ? function _both() {\n return f.apply(this, arguments) && g.apply(this, arguments);\n } : lift(and)(f, g);\n});\nexport default both;","export default function _cloneRegExp(pattern) {\n return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '') + (pattern.dotAll ? 's' : ''));\n}","import _cloneRegExp from \"./_cloneRegExp.js\";\nimport type from \"../type.js\";\n\n/**\n * Copies an object.\n *\n * @private\n * @param {*} value The value to be copied\n * @param {Boolean} deep Whether or not to perform deep cloning.\n * @return {*} The copied value.\n */\nexport default function _clone(value, deep, map) {\n map || (map = new _ObjectMap());\n\n // this avoids the slower switch with a quick if decision removing some milliseconds in each run.\n if (_isPrimitive(value)) {\n return value;\n }\n var copy = function copy(copiedValue) {\n // Check for circular and same references on the object graph and return its corresponding clone.\n var cachedCopy = map.get(value);\n if (cachedCopy) {\n return cachedCopy;\n }\n map.set(value, copiedValue);\n for (var key in value) {\n if (Object.prototype.hasOwnProperty.call(value, key)) {\n copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];\n }\n }\n return copiedValue;\n };\n switch (type(value)) {\n case 'Object':\n return copy(Object.create(Object.getPrototypeOf(value)));\n case 'Array':\n return copy(Array(value.length));\n case 'Date':\n return new Date(value.valueOf());\n case 'RegExp':\n return _cloneRegExp(value);\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'BigInt64Array':\n case 'BigUint64Array':\n return value.slice();\n default:\n return value;\n }\n}\nfunction _isPrimitive(param) {\n var type = typeof param;\n return param == null || type != 'object' && type != 'function';\n}\nvar _ObjectMap = /*#__PURE__*/function () {\n function _ObjectMap() {\n this.map = {};\n this.length = 0;\n }\n _ObjectMap.prototype.set = function (key, value) {\n var hashedKey = this.hash(key);\n var bucket = this.map[hashedKey];\n if (!bucket) {\n this.map[hashedKey] = bucket = [];\n }\n bucket.push([key, value]);\n this.length += 1;\n };\n _ObjectMap.prototype.hash = function (key) {\n var hashedKey = [];\n for (var value in key) {\n hashedKey.push(Object.prototype.toString.call(key[value]));\n }\n return hashedKey.join();\n };\n _ObjectMap.prototype.get = function (key) {\n /**\n * depending on the number of objects to be cloned is faster to just iterate over the items in the map just because the hash function is so costly,\n * on my tests this number is 180, anything above that using the hash function is faster.\n */\n if (this.length <= 180) {\n for (var p in this.map) {\n var bucket = this.map[p];\n for (var i = 0; i < bucket.length; i += 1) {\n var element = bucket[i];\n if (element[0] === key) {\n return element[1];\n }\n }\n }\n return;\n }\n var hashedKey = this.hash(key);\n var bucket = this.map[hashedKey];\n if (!bucket) {\n return;\n }\n for (var i = 0; i < bucket.length; i += 1) {\n var element = bucket[i];\n if (element[0] === key) {\n return element[1];\n }\n }\n };\n return _ObjectMap;\n}();","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Makes a comparator function out of a function that reports whether the first\n * element is less than the second.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b) -> Boolean) -> ((a, b) -> Number)\n * @param {Function} pred A predicate function of arity two which will return `true` if the first argument\n * is less than the second, `false` otherwise\n * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0`\n * @example\n *\n * const byAge = R.comparator((a, b) => a.age < b.age);\n * const people = [\n * { name: 'Emma', age: 70 },\n * { name: 'Peter', age: 78 },\n * { name: 'Mikhail', age: 62 },\n * ];\n * const peopleByIncreasingAge = R.sort(byAge, people);\n * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]\n */\nvar comparator = /*#__PURE__*/_curry1(function comparator(pred) {\n return function (a, b) {\n return pred(a, b) ? -1 : pred(b, a) ? 1 : 0;\n };\n});\nexport default comparator;","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * A function that returns the `!` of its argument. It will return `true` when\n * passed false-y value, and `false` when passed a truth-y one.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig * -> Boolean\n * @param {*} a any value\n * @return {Boolean} the logical inverse of passed argument.\n * @see R.complement\n * @example\n *\n * R.not(true); //=> false\n * R.not(false); //=> true\n * R.not(0); //=> true\n * R.not(1); //=> false\n */\nvar not = /*#__PURE__*/_curry1(function not(a) {\n return !a;\n});\nexport default not;","import lift from \"./lift.js\";\nimport not from \"./not.js\";\n\n/**\n * Takes a function `f` and returns a function `g` such that if called with the same arguments\n * when `f` returns a \"truthy\" value, `g` returns `false` and when `f` returns a \"falsy\" value `g` returns `true`.\n *\n * `R.complement` may be applied to any functor\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category Logic\n * @sig (*... -> *) -> (*... -> Boolean)\n * @param {Function} f\n * @return {Function}\n * @see R.not\n * @example\n *\n * const isNotNil = R.complement(R.isNil);\n * R.isNil(null); //=> true\n * isNotNil(null); //=> false\n * R.isNil(7); //=> false\n * isNotNil(7); //=> true\n */\nvar complement = /*#__PURE__*/lift(not);\nexport default complement;","export default function _pipe(f, g) {\n return function () {\n return g.call(this, f.apply(this, arguments));\n };\n}","import _isArray from \"./_isArray.js\";\n\n/**\n * This checks whether a function has a [methodname] function. If it isn't an\n * array it will execute that function otherwise it will default to the ramda\n * implementation.\n *\n * @private\n * @param {Function} fn ramda implementation\n * @param {String} methodname property to check for a custom implementation\n * @return {Object} Whatever the return value of the method is.\n */\nexport default function _checkForMethod(methodname, fn) {\n return function () {\n var length = arguments.length;\n if (length === 0) {\n return fn();\n }\n var obj = arguments[length - 1];\n return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));\n };\n}","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Returns the elements of the given list or string (or object with a `slice`\n * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).\n *\n * Dispatches to the `slice` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @sig Number -> Number -> String -> String\n * @param {Number} fromIndex The start index (inclusive).\n * @param {Number} toIndex The end index (exclusive).\n * @param {*} list\n * @return {*}\n * @example\n *\n * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']\n * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']\n * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(0, 3, 'ramda'); //=> 'ram'\n */\nvar slice = /*#__PURE__*/_curry3(/*#__PURE__*/_checkForMethod('slice', function slice(fromIndex, toIndex, list) {\n return Array.prototype.slice.call(list, fromIndex, toIndex);\n}));\nexport default slice;","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport slice from \"./slice.js\";\n\n/**\n * Returns all but the first element of the given list or string (or object\n * with a `tail` method).\n *\n * Dispatches to the `slice` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.head, R.init, R.last\n * @example\n *\n * R.tail([1, 2, 3]); //=> [2, 3]\n * R.tail([1, 2]); //=> [2]\n * R.tail([1]); //=> []\n * R.tail([]); //=> []\n *\n * R.tail('abc'); //=> 'bc'\n * R.tail('ab'); //=> 'b'\n * R.tail('a'); //=> ''\n * R.tail(''); //=> ''\n */\nvar tail = /*#__PURE__*/_curry1(/*#__PURE__*/_checkForMethod('tail', /*#__PURE__*/slice(1, Infinity)));\nexport default tail;","import _arity from \"./internal/_arity.js\";\nimport _pipe from \"./internal/_pipe.js\";\nimport reduce from \"./reduce.js\";\nimport tail from \"./tail.js\";\n\n/**\n * Performs left-to-right function composition. The first argument may have\n * any arity; the remaining arguments must be unary.\n *\n * In some libraries this function is named `sequence`.\n *\n * **Note:** The result of pipe is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.compose\n * @example\n *\n * const f = R.pipe(Math.pow, R.negate, R.inc);\n *\n * f(3, 4); // -(3^4) + 1\n * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))\n * @symb R.pipe(f, g, h)(a)(b) = h(g(f(a)))(b)\n */\nexport default function pipe() {\n if (arguments.length === 0) {\n throw new Error('pipe requires at least one argument');\n }\n return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments)));\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _nth from \"./internal/_nth.js\";\n\n/**\n * Returns the first element of the given list or string. In some libraries\n * this function is named `first`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String | Undefined\n * @param {Array|String} list\n * @return {*}\n * @see R.tail, R.init, R.last\n * @example\n *\n * R.head(['fi', 'fo', 'fum']); //=> 'fi'\n * R.head([]); //=> undefined\n *\n * R.head('abc'); //=> 'a'\n * R.head(''); //=> undefined\n */\nvar head = /*#__PURE__*/_curry1(function (list) {\n return _nth(0, list);\n});\nexport default head;","export default function _identity(x) {\n return x;\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _identity from \"./internal/_identity.js\";\n\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * const obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\nvar identity = /*#__PURE__*/_curry1(_identity);\nexport default identity;","import _curry2 from \"./internal/_curry2.js\";\nimport _map from \"./internal/_map.js\";\nimport curryN from \"./curryN.js\";\nimport max from \"./max.js\";\nimport pluck from \"./pluck.js\";\nimport reduce from \"./reduce.js\";\n\n/**\n * Accepts a converging function and a list of branching functions and returns\n * a new function. The arity of the new function is the same as the arity of\n * the longest branching function. When invoked, this new function is applied\n * to some arguments, and each branching function is applied to those same\n * arguments. The results of each branching function are passed as arguments\n * to the converging function to produce the return value.\n *\n * @func\n * @memberOf R\n * @since v0.4.2\n * @category Function\n * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z)\n * @param {Function} after A function. `after` will be invoked with the return values of\n * `fn1` and `fn2` as its arguments.\n * @param {Array} functions A list of functions.\n * @return {Function} A new function.\n * @see R.useWith\n * @example\n *\n * const average = R.converge(R.divide, [R.sum, R.length])\n * average([1, 2, 3, 4, 5, 6, 7]) //=> 4\n *\n * const strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower])\n * strangeConcat(\"Yodel\") //=> \"YODELyodel\"\n *\n * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b))\n */\nvar converge = /*#__PURE__*/_curry2(function converge(after, fns) {\n return curryN(reduce(max, 0, pluck('length', fns)), function () {\n var args = arguments;\n var context = this;\n return after.apply(context, _map(function (fn) {\n return fn.apply(context, args);\n }, fns));\n });\n});\nexport default converge;","import _clone from \"./_clone.js\";\nimport _has from \"./_has.js\";\nimport _xfBase from \"./_xfBase.js\";\nvar XReduceBy = /*#__PURE__*/function () {\n function XReduceBy(valueFn, valueAcc, keyFn, xf) {\n this.valueFn = valueFn;\n this.valueAcc = valueAcc;\n this.keyFn = keyFn;\n this.xf = xf;\n this.inputs = {};\n }\n XReduceBy.prototype['@@transducer/init'] = _xfBase.init;\n XReduceBy.prototype['@@transducer/result'] = function (result) {\n var key;\n for (key in this.inputs) {\n if (_has(key, this.inputs)) {\n result = this.xf['@@transducer/step'](result, this.inputs[key]);\n if (result['@@transducer/reduced']) {\n result = result['@@transducer/value'];\n break;\n }\n }\n }\n this.inputs = null;\n return this.xf['@@transducer/result'](result);\n };\n XReduceBy.prototype['@@transducer/step'] = function (result, input) {\n var key = this.keyFn(input);\n this.inputs[key] = this.inputs[key] || [key, _clone(this.valueAcc, false)];\n this.inputs[key][1] = this.valueFn(this.inputs[key][1], input);\n return result;\n };\n return XReduceBy;\n}();\nexport default function _xreduceBy(valueFn, valueAcc, keyFn) {\n return function (xf) {\n return new XReduceBy(valueFn, valueAcc, keyFn, xf);\n };\n}","import _clone from \"./internal/_clone.js\";\nimport _curryN from \"./internal/_curryN.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _has from \"./internal/_has.js\";\nimport _reduced from \"./internal/_reduced.js\";\nimport _xReduce from \"./internal/_xReduce.js\";\nimport _xreduceBy from \"./internal/_xreduceBy.js\";\nimport _xwrap from \"./internal/_xwrap.js\";\n\n/**\n * Groups the elements of the list according to the result of calling\n * the String-returning function `keyFn` on each element and reduces the elements\n * of each group to a single value via the reducer function `valueFn`.\n *\n * The value function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to short circuit the iteration.\n *\n * This function is basically a more general [`groupBy`](#groupBy) function.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.20.0\n * @category List\n * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a}\n * @param {Function} valueFn The function that reduces the elements of each group to a single\n * value. Receives two values, accumulator for a particular group and the current element.\n * @param {*} acc The (initial) accumulator value for each group.\n * @param {Function} keyFn The function that maps the list's element into a key.\n * @param {Array} list The array to group.\n * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of\n * `valueFn` for elements which produced that key when passed to `keyFn`.\n * @see R.groupBy, R.reduce, R.reduced\n * @example\n *\n * const groupNames = (acc, {name}) => acc.concat(name)\n * const toGrade = ({score}) =>\n * score < 65 ? 'F' :\n * score < 70 ? 'D' :\n * score < 80 ? 'C' :\n * score < 90 ? 'B' : 'A'\n *\n * var students = [\n * {name: 'Abby', score: 83},\n * {name: 'Bart', score: 62},\n * {name: 'Curt', score: 88},\n * {name: 'Dora', score: 92},\n * ]\n *\n * reduceBy(groupNames, [], toGrade, students)\n * //=> {\"A\": [\"Dora\"], \"B\": [\"Abby\", \"Curt\"], \"F\": [\"Bart\"]}\n */\nvar reduceBy = /*#__PURE__*/_curryN(4, [], /*#__PURE__*/_dispatchable([], _xreduceBy, function reduceBy(valueFn, valueAcc, keyFn, list) {\n var xf = _xwrap(function (acc, elt) {\n var key = keyFn(elt);\n var value = valueFn(_has(key, acc) ? acc[key] : _clone(valueAcc, false), elt);\n if (value && value['@@transducer/reduced']) {\n return _reduced(acc);\n }\n acc[key] = value;\n return acc;\n });\n return _xReduce(xf, {}, list);\n}));\nexport default reduceBy;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns the second argument if it is not `null`, `undefined` or `NaN`;\n * otherwise the first argument is returned.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Logic\n * @sig a -> b -> a | b\n * @param {a} default The default value.\n * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`.\n * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value\n * @example\n *\n * const defaultTo42 = R.defaultTo(42);\n *\n * defaultTo42(null); //=> 42\n * defaultTo42(undefined); //=> 42\n * defaultTo42(false); //=> false\n * defaultTo42('Ramda'); //=> 'Ramda'\n * // parseInt('string') results in NaN\n * defaultTo42(parseInt('string')); //=> 42\n */\nvar defaultTo = /*#__PURE__*/_curry2(function defaultTo(d, v) {\n return v == null || v !== v ? d : v;\n});\nexport default defaultTo;","import _includes from \"./_includes.js\";\nvar _Set = /*#__PURE__*/function () {\n function _Set() {\n /* globals Set */\n this._nativeSet = typeof Set === 'function' ? new Set() : null;\n this._items = {};\n }\n // until we figure out why jsdoc chokes on this\n // @param item The item to add to the Set\n // @returns {boolean} true if the item did not exist prior, otherwise false\n //\n _Set.prototype.add = function (item) {\n return !hasOrAdd(item, true, this);\n };\n\n //\n // @param item The item to check for existence in the Set\n // @returns {boolean} true if the item exists in the Set, otherwise false\n //\n _Set.prototype.has = function (item) {\n return hasOrAdd(item, false, this);\n };\n\n //\n // Combines the logic for checking whether an item is a member of the set and\n // for adding a new item to the set.\n //\n // @param item The item to check or add to the Set instance.\n // @param shouldAdd If true, the item will be added to the set if it doesn't\n // already exist.\n // @param set The set instance to check or add to.\n // @return {boolean} true if the item already existed, otherwise false.\n //\n return _Set;\n}();\nfunction hasOrAdd(item, shouldAdd, set) {\n var type = typeof item;\n var prevSize, newSize;\n switch (type) {\n case 'string':\n case 'number':\n // distinguish between +0 and -0\n if (item === 0 && 1 / item === -Infinity) {\n if (set._items['-0']) {\n return true;\n } else {\n if (shouldAdd) {\n set._items['-0'] = true;\n }\n return false;\n }\n }\n // these types can all utilise the native Set\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n set._nativeSet.add(item);\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = {};\n set._items[type][item] = true;\n }\n return false;\n } else if (item in set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][item] = true;\n }\n return false;\n }\n }\n case 'boolean':\n // set._items['boolean'] holds a two element array\n // representing [ falseExists, trueExists ]\n if (type in set._items) {\n var bIdx = item ? 1 : 0;\n if (set._items[type][bIdx]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][bIdx] = true;\n }\n return false;\n }\n } else {\n if (shouldAdd) {\n set._items[type] = item ? [false, true] : [true, false];\n }\n return false;\n }\n case 'function':\n // compare functions for reference equality\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n set._nativeSet.add(item);\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n return false;\n }\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n return false;\n }\n return true;\n }\n case 'undefined':\n if (set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type] = true;\n }\n return false;\n }\n case 'object':\n if (item === null) {\n if (!set._items['null']) {\n if (shouldAdd) {\n set._items['null'] = true;\n }\n return false;\n }\n return true;\n }\n /* falls through */\n default:\n // reduce the search size of heterogeneous sets by creating buckets\n // for each type.\n type = Object.prototype.toString.call(item);\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n return false;\n }\n // scan through all previously applied items\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n return false;\n }\n return true;\n }\n}\n\n// A simple Set type that honours R.equals semantics\nexport default _Set;","import _curry2 from \"./internal/_curry2.js\";\nimport _Set from \"./internal/_Set.js\";\n\n/**\n * Finds the set (i.e. no duplicates) of all elements in the first list not\n * contained in the second list. Objects and Arrays are compared in terms of\n * value equality, not reference equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The elements in `list1` that are not in `list2`.\n * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without\n * @example\n *\n * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2]\n * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5]\n * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}]\n */\nvar difference = /*#__PURE__*/_curry2(function difference(first, second) {\n var out = [];\n var idx = 0;\n var firstLen = first.length;\n var secondLen = second.length;\n var toFilterOut = new _Set();\n for (var i = 0; i < secondLen; i += 1) {\n toFilterOut.add(second[i]);\n }\n while (idx < firstLen) {\n if (toFilterOut.add(first[idx])) {\n out[out.length] = first[idx];\n }\n idx += 1;\n }\n return out;\n});\nexport default difference;","import _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Removes the sub-list of `list` starting at index `start` and containing\n * `count` elements. _Note that this is not destructive_: it returns a copy of\n * the list with the changes.\n * No lists have been harmed in the application of this function.\n *\n * @func\n * @memberOf R\n * @since v0.2.2\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @param {Number} start The position to start removing elements\n * @param {Number} count The number of elements to remove\n * @param {Array} list The list to remove from\n * @return {Array} A new Array with `count` elements from `start` removed.\n * @see R.without\n * @example\n *\n * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]\n */\nvar remove = /*#__PURE__*/_curry3(function remove(start, count, list) {\n var result = Array.prototype.slice.call(list, 0);\n result.splice(start, count);\n return result;\n});\nexport default remove;","import _isInteger from \"./_isInteger.js\";\nimport _isArray from \"./_isArray.js\";\nimport remove from \"../remove.js\";\n\n/**\n * Returns a new object that does not contain a `prop` property.\n *\n * @private\n * @param {String|Number} prop The name of the property to dissociate\n * @param {Object|Array} obj The object to clone\n * @return {Object} A new object equivalent to the original but without the specified property\n */\nexport default function _dissoc(prop, obj) {\n if (obj == null) {\n return obj;\n }\n if (_isInteger(prop) && _isArray(obj)) {\n return remove(prop, 1, obj);\n }\n var result = {};\n for (var p in obj) {\n result[p] = obj[p];\n }\n delete result[prop];\n return result;\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dissoc from \"./internal/_dissoc.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport _isArray from \"./internal/_isArray.js\";\nimport assoc from \"./assoc.js\";\n\n/**\n * Makes a shallow clone of an object. Note that this copies and flattens\n * prototype properties onto the new object as well. All non-primitive\n * properties are copied by reference.\n *\n * @private\n * @param {String|Integer} prop The prop operating\n * @param {Object|Array} obj The object to clone\n * @return {Object|Array} A new object equivalent to the original.\n */\nfunction _shallowCloneObject(prop, obj) {\n if (_isInteger(prop) && _isArray(obj)) {\n return [].concat(obj);\n }\n var result = {};\n for (var p in obj) {\n result[p] = obj[p];\n }\n return result;\n}\n\n/**\n * Makes a shallow clone of an object, omitting the property at the given path.\n * Note that this copies and flattens prototype properties onto the new object\n * as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.11.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> {k: v} -> {k: v}\n * @param {Array} path The path to the value to omit\n * @param {Object} obj The object to clone\n * @return {Object} A new object without the property at path\n * @see R.assocPath\n * @example\n *\n * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}}\n */\nvar dissocPath = /*#__PURE__*/_curry2(function dissocPath(path, obj) {\n if (obj == null) {\n return obj;\n }\n switch (path.length) {\n case 0:\n return obj;\n case 1:\n return _dissoc(path[0], obj);\n default:\n var head = path[0];\n var tail = Array.prototype.slice.call(path, 1);\n if (obj[head] == null) {\n return _shallowCloneObject(head, obj);\n } else {\n return assoc(head, dissocPath(tail, obj[head]), obj);\n }\n }\n});\nexport default dissocPath;","import _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\nvar XTake = /*#__PURE__*/function () {\n function XTake(n, xf) {\n this.xf = xf;\n this.n = n;\n this.i = 0;\n }\n XTake.prototype['@@transducer/init'] = _xfBase.init;\n XTake.prototype['@@transducer/result'] = _xfBase.result;\n XTake.prototype['@@transducer/step'] = function (result, input) {\n this.i += 1;\n var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input);\n return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret;\n };\n return XTake;\n}();\nexport default function _xtake(n) {\n return function (xf) {\n return new XTake(n, xf);\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xtake from \"./internal/_xtake.js\";\nimport slice from \"./slice.js\";\n\n/**\n * Returns the first `n` elements of the given list, string, or\n * transducer/transformer (or object with a `take` method).\n *\n * Dispatches to the `take` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n\n * @param {*} list\n * @return {*}\n * @see R.drop\n * @example\n *\n * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo']\n * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']\n * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n * R.take(3, 'ramda'); //=> 'ram'\n *\n * const personnel = [\n * 'Dave Brubeck',\n * 'Paul Desmond',\n * 'Eugene Wright',\n * 'Joe Morello',\n * 'Gerry Mulligan',\n * 'Bob Bates',\n * 'Joe Dodge',\n * 'Ron Crotty'\n * ];\n *\n * const takeFive = R.take(5);\n * takeFive(personnel);\n * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan']\n * @symb R.take(-1, [a, b]) = [a, b]\n * @symb R.take(0, [a, b]) = []\n * @symb R.take(1, [a, b]) = [a]\n * @symb R.take(2, [a, b]) = [a, b]\n */\nvar take = /*#__PURE__*/_curry2(/*#__PURE__*/_dispatchable(['take'], _xtake, function take(n, xs) {\n return slice(0, n < 0 ? Infinity : n, xs);\n}));\nexport default take;","import slice from \"../slice.js\";\nexport default function dropLastWhile(pred, xs) {\n var idx = xs.length - 1;\n while (idx >= 0 && pred(xs[idx])) {\n idx -= 1;\n }\n return slice(0, idx + 1, xs);\n}","import _xfBase from \"./_xfBase.js\";\nimport _xReduce from \"./_xReduce.js\";\nvar XDropLastWhile = /*#__PURE__*/function () {\n function XDropLastWhile(fn, xf) {\n this.f = fn;\n this.retained = [];\n this.xf = xf;\n }\n XDropLastWhile.prototype['@@transducer/init'] = _xfBase.init;\n XDropLastWhile.prototype['@@transducer/result'] = function (result) {\n this.retained = null;\n return this.xf['@@transducer/result'](result);\n };\n XDropLastWhile.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.retain(result, input) : this.flush(result, input);\n };\n XDropLastWhile.prototype.flush = function (result, input) {\n result = _xReduce(this.xf, result, this.retained);\n this.retained = [];\n return this.xf['@@transducer/step'](result, input);\n };\n XDropLastWhile.prototype.retain = function (result, input) {\n this.retained.push(input);\n return result;\n };\n return XDropLastWhile;\n}();\nexport default function _xdropLastWhile(fn) {\n return function (xf) {\n return new XDropLastWhile(fn, xf);\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _dropLastWhile from \"./internal/_dropLastWhile.js\";\nimport _xdropLastWhile from \"./internal/_xdropLastWhile.js\";\n\n/**\n * Returns a new list excluding all the tailing elements of a given list which\n * satisfy the supplied predicate function. It passes each value from the right\n * to the supplied predicate function, skipping elements until the predicate\n * function returns a `falsy` value. The predicate function is applied to one argument:\n * *(value)*.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> [a]\n * @sig (a -> Boolean) -> String -> String\n * @param {Function} predicate The function to be called on each element\n * @param {Array} xs The collection to iterate over.\n * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`.\n * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile\n * @example\n *\n * const lteThree = x => x <= 3;\n *\n * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4]\n *\n * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd'\n */\nvar dropLastWhile = /*#__PURE__*/_curry2(/*#__PURE__*/_dispatchable([], _xdropLastWhile, _dropLastWhile));\nexport default dropLastWhile;","import _curry1 from \"./internal/_curry1.js\";\nimport _nth from \"./internal/_nth.js\";\n\n/**\n * Returns the last element of the given list or string.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String | Undefined\n * @param {*} list\n * @return {*}\n * @see R.init, R.head, R.tail\n * @example\n *\n * R.last(['fi', 'fo', 'fum']); //=> 'fum'\n * R.last([]); //=> undefined\n *\n * R.last('abc'); //=> 'c'\n * R.last(''); //=> undefined\n */\nvar last = /*#__PURE__*/_curry1(function (list) {\n return _nth(-1, list);\n});\nexport default last;","import _xfBase from \"./_xfBase.js\";\nvar XDropWhile = /*#__PURE__*/function () {\n function XDropWhile(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n XDropWhile.prototype['@@transducer/init'] = _xfBase.init;\n XDropWhile.prototype['@@transducer/result'] = _xfBase.result;\n XDropWhile.prototype['@@transducer/step'] = function (result, input) {\n if (this.f) {\n if (this.f(input)) {\n return result;\n }\n this.f = null;\n }\n return this.xf['@@transducer/step'](result, input);\n };\n return XDropWhile;\n}();\nexport default function _xdropWhile(f) {\n return function (xf) {\n return new XDropWhile(f, xf);\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xdropWhile from \"./internal/_xdropWhile.js\";\nimport slice from \"./slice.js\";\n\n/**\n * Returns a new list excluding the leading elements of a given list which\n * satisfy the supplied predicate function. It passes each value to the supplied\n * predicate function, skipping elements while the predicate function returns\n * `true`. The predicate function is applied to one argument: *(value)*.\n *\n * Dispatches to the `dropWhile` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> [a]\n * @sig (a -> Boolean) -> String -> String\n * @param {Function} fn The function called per iteration.\n * @param {Array} xs The collection to iterate over.\n * @return {Array} A new array.\n * @see R.takeWhile, R.transduce, R.addIndex\n * @example\n *\n * const lteTwo = x => x <= 2;\n *\n * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1]\n *\n * R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da'\n */\nvar dropWhile = /*#__PURE__*/_curry2(/*#__PURE__*/_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, xs) {\n var idx = 0;\n var len = xs.length;\n while (idx < len && pred(xs[idx])) {\n idx += 1;\n }\n return slice(idx, Infinity, xs);\n}));\nexport default dropWhile;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns the first argument if it is truthy, otherwise the second argument.\n * Acts as the boolean `or` statement if both inputs are `Boolean`s.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> b -> a | b\n * @param {Any} a\n * @param {Any} b\n * @return {Any}\n * @see R.either, R.and\n * @example\n *\n * R.or(true, true); //=> true\n * R.or(true, false); //=> true\n * R.or(false, true); //=> true\n * R.or(false, false); //=> false\n */\nvar or = /*#__PURE__*/_curry2(function or(a, b) {\n return a || b;\n});\nexport default or;","import _curry2 from \"./internal/_curry2.js\";\nimport _isFunction from \"./internal/_isFunction.js\";\nimport lift from \"./lift.js\";\nimport or from \"./or.js\";\n\n/**\n * A function wrapping calls to the two functions in an `||` operation,\n * returning the result of the first function if it is truth-y and the result\n * of the second function otherwise. Note that this is short-circuited,\n * meaning that the second function will not be invoked if the first returns a\n * truth-y value.\n *\n * In addition to functions, `R.either` also accepts any fantasy-land compatible\n * applicative functor.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean)\n * @param {Function} f a predicate\n * @param {Function} g another predicate\n * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together.\n * @see R.both, R.anyPass, R.or\n * @example\n *\n * const gt10 = x => x > 10;\n * const even = x => x % 2 === 0;\n * const f = R.either(gt10, even);\n * f(101); //=> true\n * f(8); //=> true\n *\n * R.either(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(55)\n * R.either([false, false, 'a'], [11]) // => [11, 11, \"a\"]\n */\nvar either = /*#__PURE__*/_curry2(function either(f, g) {\n return _isFunction(f) ? function _either() {\n return f.apply(this, arguments) || g.apply(this, arguments);\n } : lift(or)(f, g);\n});\nexport default either;","/**\n * Tests whether or not an object is a typed array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is a typed array, `false` otherwise.\n * @example\n *\n * _isTypedArray(new Uint8Array([])); //=> true\n * _isTypedArray(new Float32Array([])); //=> true\n * _isTypedArray([]); //=> false\n * _isTypedArray(null); //=> false\n * _isTypedArray({}); //=> false\n */\nexport default function _isTypedArray(val) {\n var type = Object.prototype.toString.call(val);\n return type === '[object Uint8ClampedArray]' || type === '[object Int8Array]' || type === '[object Uint8Array]' || type === '[object Int16Array]' || type === '[object Uint16Array]' || type === '[object Int32Array]' || type === '[object Uint32Array]' || type === '[object Float32Array]' || type === '[object Float64Array]' || type === '[object BigInt64Array]' || type === '[object BigUint64Array]';\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _isArguments from \"./internal/_isArguments.js\";\nimport _isArray from \"./internal/_isArray.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _isString from \"./internal/_isString.js\";\nimport _isTypedArray from \"./internal/_isTypedArray.js\";\n\n/**\n * Returns the empty value of its argument's type. Ramda defines the empty\n * value of Array (`[]`), Object (`{}`), String (`''`),\n * TypedArray (`Uint8Array []`, `Float32Array []`, etc), and Arguments. Other\n * types are supported if they define `.empty`,\n * `.prototype.empty` or implement the\n * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).\n *\n * Dispatches to the `empty` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig a -> a\n * @param {*} x\n * @return {*}\n * @example\n *\n * R.empty(Just(42)); //=> Nothing()\n * R.empty([1, 2, 3]); //=> []\n * R.empty('unicorns'); //=> ''\n * R.empty({x: 1, y: 2}); //=> {}\n * R.empty(Uint8Array.from('123')); //=> Uint8Array []\n */\nvar empty = /*#__PURE__*/_curry1(function empty(x) {\n return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () {\n return arguments;\n }() : _isTypedArray(x) ? x.constructor.from('') : void 0 // else\n ;\n});\nexport default empty;","import _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\n\n/**\n * Returns a new function much like the supplied one, except that the first two\n * arguments' order is reversed.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z)\n * @param {Function} fn The function to invoke with its first two parameters reversed.\n * @return {*} The result of invoking `fn` with its first two parameters' order reversed.\n * @example\n *\n * const mergeThree = (a, b, c) => [].concat(a, b, c);\n *\n * mergeThree(1, 2, 3); //=> [1, 2, 3]\n *\n * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]\n * @symb R.flip(f)(a, b, c) = f(b, a, c)\n */\nvar flip = /*#__PURE__*/_curry1(function flip(fn) {\n return curryN(fn.length, function (a, b) {\n var args = Array.prototype.slice.call(arguments, 0);\n args[0] = b;\n args[1] = a;\n return fn.apply(this, args);\n });\n});\nexport default flip;","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport reduceBy from \"./reduceBy.js\";\n\n/**\n * Splits a list into sub-lists stored in an object, based on the result of\n * calling a key-returning function on each element, and grouping the\n * results according to values returned.\n *\n * Dispatches to the `groupBy` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @typedefn Idx = String | Int | Symbol\n * @sig Idx a => (b -> a) -> [b] -> {a: [b]}\n * @param {Function} fn Function :: a -> Idx\n * @param {Array} list The array to group\n * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements\n * that produced that key when passed to `fn`.\n * @see R.reduceBy, R.transduce, R.indexBy, R.collectBy\n * @example\n *\n * const byGrade = R.groupBy(function(student) {\n * const score = student.score;\n * return score < 65 ? 'F' :\n * score < 70 ? 'D' :\n * score < 80 ? 'C' :\n * score < 90 ? 'B' : 'A';\n * });\n * const students = [{name: 'Abby', score: 84},\n * {name: 'Eddy', score: 58},\n * // ...\n * {name: 'Jack', score: 69}];\n * byGrade(students);\n * // {\n * // 'A': [{name: 'Dianne', score: 99}],\n * // 'B': [{name: 'Abby', score: 84}]\n * // // ...,\n * // 'F': [{name: 'Eddy', score: 58}]\n * // }\n */\nvar groupBy = /*#__PURE__*/_curry2(/*#__PURE__*/_checkForMethod('groupBy', /*#__PURE__*/reduceBy(function (acc, item) {\n acc.push(item);\n return acc;\n}, [])));\nexport default groupBy;","import _curry2 from \"./internal/_curry2.js\";\nimport _has from \"./internal/_has.js\";\nimport isNil from \"./isNil.js\";\n\n/**\n * Returns whether or not a path exists in an object. Only the object's\n * own properties are checked.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> {a} -> Boolean\n * @param {Array} path The path to use.\n * @param {Object} obj The object to check the path in.\n * @return {Boolean} Whether the path exists.\n * @see R.has\n * @example\n *\n * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true\n * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true\n * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false\n * R.hasPath(['a', 'b'], {}); // => false\n */\nvar hasPath = /*#__PURE__*/_curry2(function hasPath(_path, obj) {\n if (_path.length === 0 || isNil(obj)) {\n return false;\n }\n var val = obj;\n var idx = 0;\n while (idx < _path.length) {\n if (!isNil(val) && _has(_path[idx], val)) {\n val = val[_path[idx]];\n idx += 1;\n } else {\n return false;\n }\n }\n return true;\n});\nexport default hasPath;","import _curry2 from \"./internal/_curry2.js\";\nimport hasPath from \"./hasPath.js\";\n\n/**\n * Returns whether or not an object has an own property with the specified name\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Object\n * @sig s -> {s: x} -> Boolean\n * @param {String} prop The name of the property to check for.\n * @param {Object} obj The object to query.\n * @return {Boolean} Whether the property exists.\n * @example\n *\n * const hasName = R.has('name');\n * hasName({name: 'alice'}); //=> true\n * hasName({name: 'bob'}); //=> true\n * hasName({}); //=> false\n *\n * const point = {x: 0, y: 0};\n * const pointHas = R.has(R.__, point);\n * pointHas('x'); //=> true\n * pointHas('y'); //=> true\n * pointHas('z'); //=> false\n */\nvar has = /*#__PURE__*/_curry2(function has(prop, obj) {\n return hasPath([prop], obj);\n});\nexport default has;","import _objectIs from \"./internal/_objectIs.js\";\n\n/**\n * Returns true if its arguments are identical, false otherwise. Values are\n * identical if they reference the same memory. `NaN` is identical to `NaN`;\n * `0` and `-0` are not identical.\n *\n * Note this is merely a curried version of ES6 `Object.is`.\n *\n * `identical` does not support the `__` placeholder.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> a -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * const o = {};\n * R.identical(o, o); //=> true\n * R.identical(1, 1); //=> true\n * R.identical(1, '1'); //=> false\n * R.identical([], []); //=> false\n * R.identical(0, -0); //=> false\n * R.identical(NaN, NaN); //=> true\n */\nvar identical = function (a, b) {\n switch (arguments.length) {\n case 0:\n return identical;\n case 1:\n return function () {\n return function unaryIdentical(_b) {\n switch (arguments.length) {\n case 0:\n return unaryIdentical;\n default:\n return _objectIs(a, _b);\n }\n };\n }();\n default:\n return _objectIs(a, b);\n }\n};\n\n// In order to support Cross-origin Window objects as arguments to identical,\n// it cannot be implemented as _curry2(_objectIs).\n// The reason is that _curry2 checks if a function argument is the placeholder __\n// by accessing a paritcular property. However, across URL origins access\n// to most properties of Window is forbidden.\nexport default identical;","import _curry3 from \"./internal/_curry3.js\";\nimport curryN from \"./curryN.js\";\n\n/**\n * Creates a function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n *\n * Note that `ifElse` takes its arity from the longest of the three functions passed to it.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *)\n * @param {Function} condition A predicate function\n * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value.\n * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value.\n * @return {Function} A new function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n * @see R.unless, R.when, R.cond\n * @example\n *\n * const incCount = R.ifElse(\n * R.has('count'),\n * R.over(R.lensProp('count'), R.inc),\n * R.assoc('count', 1)\n * );\n * incCount({ count: 1 }); //=> { count: 2 }\n * incCount({}); //=> { count: 1 }\n */\nvar ifElse = /*#__PURE__*/_curry3(function ifElse(condition, onTrue, onFalse) {\n return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() {\n return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments);\n });\n});\nexport default ifElse;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n * Also works with strings.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n * R.includes(3, [1, 2, 3]); //=> true\n * R.includes(4, [1, 2, 3]); //=> false\n * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n * R.includes([42], [[42]]); //=> true\n * R.includes('ba', 'banana'); //=>true\n */\nvar includes = /*#__PURE__*/_curry2(_includes);\nexport default includes;","import slice from \"./slice.js\";\n\n/**\n * Returns all but the last element of the given list or string.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.last, R.head, R.tail\n * @example\n *\n * R.init([1, 2, 3]); //=> [1, 2]\n * R.init([1, 2]); //=> [1]\n * R.init([1]); //=> []\n * R.init([]); //=> []\n *\n * R.init('abc'); //=> 'ab'\n * R.init('ab'); //=> 'a'\n * R.init('a'); //=> ''\n * R.init(''); //=> ''\n */\nvar init = /*#__PURE__*/slice(0, -1);\nexport default init;","import _curry2 from \"./internal/_curry2.js\";\nimport _isFunction from \"./internal/_isFunction.js\";\nimport curryN from \"./curryN.js\";\nimport toString from \"./toString.js\";\n\n/**\n * Given an `arity` (Number) and a `name` (String) the `invoker` function\n * returns a curried function that takes `arity` arguments and a `context`\n * object. It will \"invoke\" the `name`'d function (a method) on the `context`\n * object.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *)\n * @param {Number} arity Number of arguments the returned function should take\n * before the target object.\n * @param {String} method Name of any of the target object's methods to call.\n * @return {Function} A new curried function.\n * @see R.construct\n * @example\n * // A function with no arguments\n * const asJson = invoker(0, \"json\")\n * // Just like calling .then((response) => response.json())\n * fetch(\"http://example.com/index.json\").then(asJson)\n *\n * // A function with one argument\n * const sliceFrom = invoker(1, 'slice');\n * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm'\n *\n * // A function with two arguments\n * const sliceFrom6 = invoker(2, 'slice')(6);\n * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh'\n *\n * // NOTE: You can't simply pass some of the arguments to the initial invoker function.\n * const firstCreditCardSection = invoker(2, \"slice\", 0, 4)\n * firstCreditCardSection(\"4242 4242 4242 4242\") // => Function<...>\n *\n * // Since invoker returns a curried function, you may partially apply it to create the function you need.\n * const firstCreditCardSection = invoker(2, \"slice\")(0, 4)\n * firstCreditCardSection(\"4242 4242 4242 4242\") // => \"4242\"\n *\n * @symb R.invoker(0, 'method')(o) = o['method']()\n * @symb R.invoker(1, 'method')(a, o) = o['method'](a)\n * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b)\n */\nvar invoker = /*#__PURE__*/_curry2(function invoker(arity, method) {\n return curryN(arity + 1, function () {\n var target = arguments[arity];\n if (target != null && _isFunction(target[method])) {\n return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity));\n }\n throw new TypeError(toString(target) + ' does not have a method named \"' + method + '\"');\n });\n});\nexport default invoker;","import _curry1 from \"./internal/_curry1.js\";\nimport empty from \"./empty.js\";\nimport equals from \"./equals.js\";\n\n/**\n * Returns `true` if the given value is its type's empty value; `false`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> Boolean\n * @param {*} x\n * @return {Boolean}\n * @see R.empty, R.isNotEmpty\n * @example\n *\n * R.isEmpty([1, 2, 3]); //=> false\n * R.isEmpty([]); //=> true\n * R.isEmpty(''); //=> true\n * R.isEmpty(null); //=> false\n * R.isEmpty({}); //=> true\n * R.isEmpty({length: 0}); //=> false\n * R.isEmpty(Uint8Array.from('')); //=> true\n */\nvar isEmpty = /*#__PURE__*/_curry1(function isEmpty(x) {\n return x != null && equals(x, empty(x));\n});\nexport default isEmpty;","import _curry1 from \"./internal/_curry1.js\";\nimport isEmpty from \"./isEmpty.js\";\n\n/**\n * Returns `false` if the given value is its type's empty value; `true`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.29.2\n * @category Logic\n * @sig a -> Boolean\n * @param {*} x\n * @return {Boolean}\n * @see R.empty, R.isEmpty\n * @example\n *\n * R.isNotEmpty([1, 2, 3]); //=> true\n * R.isNotEmpty([]); //=> false\n * R.isNotEmpty(''); //=> false\n * R.isNotEmpty(null); //=> true\n * R.isNotEmpty({}); //=> false\n * R.isNotEmpty({length: 0}); //=> true\n * R.isNotEmpty(Uint8Array.from('')); //=> false\n */\nvar isNotEmpty = /*#__PURE__*/_curry1(function isNotEmpty(x) {\n return !isEmpty(x);\n});\nexport default isNotEmpty;","import invoker from \"./invoker.js\";\n\n/**\n * Returns a string made by inserting the `separator` between each element and\n * concatenating all the elements into a single string.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig String -> [a] -> String\n * @param {Number|String} separator The string used to separate the elements.\n * @param {Array} xs The elements to join into a string.\n * @return {String} str The string made by concatenating `xs` with `separator`.\n * @see R.split\n * @example\n *\n * const spacer = R.join(' ');\n * spacer(['a', 2, 3.4]); //=> 'a 2 3.4'\n * R.join('|', [1, 2, 3]); //=> '1|2|3'\n */\nvar join = /*#__PURE__*/invoker(1, 'join');\nexport default join;","export default function _isNumber(x) {\n return Object.prototype.toString.call(x) === '[object Number]';\n}","import _curry2 from \"./internal/_curry2.js\";\nimport map from \"./map.js\";\n\n/**\n * Returns a lens for the given getter and setter functions. The getter \"gets\"\n * the value of the focus; the setter \"sets\" the value of the focus. The setter\n * should not mutate the data structure.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig (s -> a) -> ((a, s) -> s) -> Lens s a\n * @param {Function} getter\n * @param {Function} setter\n * @return {Lens}\n * @see R.view, R.set, R.over, R.lensIndex, R.lensProp\n * @example\n *\n * const xLens = R.lens(R.prop('x'), R.assoc('x'));\n *\n * R.view(xLens, {x: 1, y: 2}); //=> 1\n * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}\n * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2}\n */\nvar lens = /*#__PURE__*/_curry2(function lens(getter, setter) {\n return function (toFunctorFn) {\n return function (target) {\n return map(function (focus) {\n return setter(focus, target);\n }, toFunctorFn(getter(target)));\n };\n };\n});\nexport default lens;","import _isInteger from \"./_isInteger.js\";\nimport _nth from \"./_nth.js\";\nexport default function _path(pathAr, obj) {\n var val = obj;\n for (var i = 0; i < pathAr.length; i += 1) {\n if (val == null) {\n return undefined;\n }\n var p = pathAr[i];\n if (_isInteger(p)) {\n val = _nth(p, val);\n } else {\n val = val[p];\n }\n }\n return val;\n}","import _arrayReduce from \"./internal/_arrayReduce.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport keys from \"./keys.js\";\n\n/**\n * An Object-specific version of [`map`](#map). The function is applied to three\n * arguments: *(value, key, obj)*. If only the value is significant, use\n * [`map`](#map) instead.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Object\n * @sig ((*, String, Object) -> *) -> Object -> Object\n * @param {Function} fn\n * @param {Object} obj\n * @return {Object}\n * @see R.map\n * @example\n *\n * const xyz = { x: 1, y: 2, z: 3 };\n * const prependKeyAndDouble = (num, key, obj) => key + (num * 2);\n *\n * R.mapObjIndexed(prependKeyAndDouble, xyz); //=> { x: 'x2', y: 'y4', z: 'z6' }\n */\nvar mapObjIndexed = /*#__PURE__*/_curry2(function mapObjIndexed(fn, obj) {\n return _arrayReduce(function (acc, key) {\n acc[key] = fn(obj[key], key, obj);\n return acc;\n }, {}, keys(obj));\n});\nexport default mapObjIndexed;","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\n\n/**\n * Creates a new object with the own properties of the two provided objects. If\n * a key exists in both objects, the provided function is applied to the key\n * and the values associated with the key in each object, with the result being\n * used as the value associated with the key in the returned object.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepWithKey, R.merge, R.mergeWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeWithKey(concatValues,\n * { a: true, thing: 'foo', values: [10, 20] },\n * { b: true, thing: 'bar', values: [15, 35] });\n * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] }\n * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 }\n */\nvar mergeWithKey = /*#__PURE__*/_curry3(function mergeWithKey(fn, l, r) {\n var result = {};\n var k;\n l = l || {};\n r = r || {};\n for (k in l) {\n if (_has(k, l)) {\n result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k];\n }\n }\n for (k in r) {\n if (_has(k, r) && !_has(k, result)) {\n result[k] = r[k];\n }\n }\n return result;\n});\nexport default mergeWithKey;","import _curry3 from \"./internal/_curry3.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport mergeWithKey from \"./mergeWithKey.js\";\n\n/**\n * Creates a new object with the own properties of the two provided objects.\n * If a key exists in both objects:\n * - and both associated values are also objects then the values will be\n * recursively merged.\n * - otherwise the provided function is applied to the key and associated values\n * using the resulting value as the new value associated with the key.\n * If a key only exists in one object, the value will be associated with the key\n * of the resulting object.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.mergeWithKey, R.mergeDeepWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeDeepWithKey(concatValues,\n * { a: true, c: { thing: 'foo', values: [10, 20] }},\n * { b: true, c: { thing: 'bar', values: [15, 35] }});\n * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }}\n */\nvar mergeDeepWithKey = /*#__PURE__*/_curry3(function mergeDeepWithKey(fn, lObj, rObj) {\n return mergeWithKey(function (k, lVal, rVal) {\n if (_isObject(lVal) && _isObject(rVal)) {\n return mergeDeepWithKey(fn, lVal, rVal);\n } else {\n return fn(k, lVal, rVal);\n }\n }, lObj, rObj);\n});\nexport default mergeDeepWithKey;","import _curry2 from \"./internal/_curry2.js\";\nimport mergeDeepWithKey from \"./mergeDeepWithKey.js\";\n\n/**\n * Creates a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects:\n * - and both values are objects, the two values will be recursively merged\n * - otherwise the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig {a} -> {a} -> {a}\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey\n * @example\n *\n * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},\n * { age: 40, contact: { email: 'baa@example.com' }});\n * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }}\n */\nvar mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) {\n return mergeDeepWithKey(function (k, lVal, rVal) {\n return rVal;\n }, lObj, rObj);\n});\nexport default mergeDeepRight;","import _complement from \"./internal/_complement.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport all from \"./all.js\";\n\n/**\n * Returns `true` if no elements of the list match the predicate, `false`\n * otherwise.\n *\n * Dispatches to the `all` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise.\n * @see R.all, R.any\n * @example\n *\n * const isEven = n => n % 2 === 0;\n * const isOdd = n => n % 2 !== 0;\n *\n * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true\n * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false\n */\nvar none = /*#__PURE__*/_curry2(function none(fn, input) {\n return all(_complement(fn), input);\n});\nexport default none;","import _curry3 from \"./internal/_curry3.js\";\n\n// `Identity` is a functor that holds a single value, where `map` simply\n// transforms the held value with the provided function.\nvar Identity = function (x) {\n return {\n value: x,\n map: function (f) {\n return Identity(f(x));\n }\n };\n};\n\n/**\n * Returns the result of \"setting\" the portion of the given data structure\n * focused by the given lens to the result of applying the given function to\n * the focused value.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Lens s a -> (a -> a) -> s -> s\n * @param {Lens} lens\n * @param {*} v\n * @param {*} x\n * @return {*}\n * @see R.view, R.set, R.lens, R.lensIndex, R.lensProp, R.lensPath\n * @example\n *\n * const headLens = R.lensIndex(0);\n *\n * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz']\n */\nvar over = /*#__PURE__*/_curry3(function over(lens, f, x) {\n // The value returned by the getter function is first transformed with `f`,\n // then set as the value of an `Identity`. This is then mapped over with the\n // setter function of the lens.\n return lens(function (y) {\n return Identity(f(y));\n })(x).value;\n});\nexport default over;","import _curry2 from \"./internal/_curry2.js\";\nimport _path from \"./internal/_path.js\";\n\n/**\n * Retrieves the value at a given path. The nodes of the path can be arbitrary strings or non-negative integers.\n * For anything else, the value is unspecified. Integer paths are meant to index arrays, strings are meant for objects.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> {a} -> a | Undefined\n * @sig Idx = String | NonNegativeInt\n * @param {Array} path The path to use.\n * @param {Object} obj The object or array to retrieve the nested property from.\n * @return {*} The data at `path`.\n * @see R.prop, R.nth, R.assocPath, R.dissocPath\n * @example\n *\n * R.path(['a', 'b'], {a: {b: 2}}); //=> 2\n * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined\n * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1\n * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2\n * R.path([2], {'2': 2}); //=> 2\n * R.path([-2], {'-2': 'a'}); //=> undefined\n */\n\nvar path = /*#__PURE__*/_curry2(_path);\nexport default path;","import _curry3 from \"./internal/_curry3.js\";\nimport _path from \"./internal/_path.js\";\nimport defaultTo from \"./defaultTo.js\";\n\n/**\n * If the given, non-null object has a value at the given path, returns the\n * value at that path. Otherwise returns the provided default value.\n *\n * @func\n * @memberOf R\n * @since v0.18.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig a -> [Idx] -> {a} -> a\n * @param {*} d The default value.\n * @param {Array} p The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path` of the supplied object or the default value.\n * @example\n *\n * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2\n * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> \"N/A\"\n */\nvar pathOr = /*#__PURE__*/_curry3(function pathOr(d, p, obj) {\n return defaultTo(d, _path(p, obj));\n});\nexport default pathOr;","import _curry3 from \"./internal/_curry3.js\";\nimport _path from \"./internal/_path.js\";\n\n/**\n * Returns `true` if the specified object property at given path satisfies the\n * given predicate; `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Logic\n * @typedefn Idx = String | Int | Symbol\n * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean\n * @param {Function} pred\n * @param {Array} propPath\n * @param {*} obj\n * @return {Boolean}\n * @see R.propSatisfies, R.path\n * @example\n *\n * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true\n * R.pathSatisfies(R.is(Object), [], {x: {y: 2}}); //=> true\n */\nvar pathSatisfies = /*#__PURE__*/_curry3(function pathSatisfies(pred, propPath, obj) {\n return pred(_path(propPath, obj));\n});\nexport default pathSatisfies;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns a partial copy of an object containing only the keys specified. If\n * the key does not exist, the property is ignored.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> {k: v}\n * @param {Array} names an array of String property names to copy onto a new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties from `names` on it.\n * @see R.omit, R.props\n * @example\n *\n * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}\n * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}\n */\nvar pick = /*#__PURE__*/_curry2(function pick(names, obj) {\n var result = {};\n var idx = 0;\n while (idx < names.length) {\n if (names[idx] in obj) {\n result[names[idx]] = obj[names[idx]];\n }\n idx += 1;\n }\n return result;\n});\nexport default pick;","import _curry3 from \"./internal/_curry3.js\";\nimport prop from \"./prop.js\";\nimport equals from \"./equals.js\";\n\n/**\n * Returns `true` if the specified object property is equal, in\n * [`R.equals`](#equals) terms, to the given value; `false` otherwise.\n * You can test multiple properties with [`R.whereEq`](#whereEq),\n * and test nested path property with [`R.pathEq`](#pathEq).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig a -> String -> Object -> Boolean\n * @param {*} val The value to compare the property with\n * @param {String} name the specified object property's key\n * @param {*} obj The object to check the property in\n * @return {Boolean} `true` if the value equals the specified object property,\n * `false` otherwise.\n * @see R.whereEq, R.pathEq, R.propSatisfies, R.equals\n * @example\n *\n * const abby = {name: 'Abby', age: 7, hair: 'blond'};\n * const fred = {name: 'Fred', age: 12, hair: 'brown'};\n * const rusty = {name: 'Rusty', age: 10, hair: 'brown'};\n * const alois = {name: 'Alois', age: 15, disposition: 'surly'};\n * const kids = [abby, fred, rusty, alois];\n * const hasBrownHair = R.propEq('brown', 'hair');\n * R.filter(hasBrownHair, kids); //=> [fred, rusty]\n */\nvar propEq = /*#__PURE__*/_curry3(function propEq(val, name, obj) {\n return equals(val, prop(name, obj));\n});\nexport default propEq;","import _curry3 from \"./internal/_curry3.js\";\nimport defaultTo from \"./defaultTo.js\";\nimport prop from \"./prop.js\";\n\n/**\n * Return the specified property of the given non-null object if the property\n * is present and it's value is not `null`, `undefined` or `NaN`.\n *\n * Otherwise the first argument is returned.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Object\n * @sig a -> String -> Object -> a\n * @param {*} val The default value.\n * @param {String} p The name of the property to return.\n * @param {Object} obj The object to query.\n * @return {*} The value of given property of the supplied object or the default value.\n * @example\n *\n * const alice = {\n * name: 'ALICE',\n * age: 101\n * };\n * const favorite = R.prop('favoriteLibrary');\n * const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary');\n *\n * favorite(alice); //=> undefined\n * favoriteWithDefault(alice); //=> 'Ramda'\n */\nvar propOr = /*#__PURE__*/_curry3(function propOr(val, p, obj) {\n return defaultTo(val, prop(p, obj));\n});\nexport default propOr;","import _curry3 from \"./internal/_curry3.js\";\nimport prop from \"./prop.js\";\n\n/**\n * Returns `true` if the specified object property satisfies the given\n * predicate; `false` otherwise. You can test multiple properties with\n * [`R.where`](#where).\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Logic\n * @sig (a -> Boolean) -> String -> {String: a} -> Boolean\n * @param {Function} pred\n * @param {String} name\n * @param {*} obj\n * @return {Boolean}\n * @see R.where, R.propEq, R.propIs\n * @example\n *\n * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true\n */\nvar propSatisfies = /*#__PURE__*/_curry3(function propSatisfies(pred, name, obj) {\n return pred(prop(name, obj));\n});\nexport default propSatisfies;","import _curry2 from \"./internal/_curry2.js\";\nimport _isNumber from \"./internal/_isNumber.js\";\n\n/**\n * Returns a list of numbers from `from` (inclusive) to `to` (exclusive).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> Number -> [Number]\n * @param {Number} from The first number in the list.\n * @param {Number} to One more than the last number in the list.\n * @return {Array} The list of numbers in the set `[a, b)`.\n * @example\n *\n * R.range(1, 5); //=> [1, 2, 3, 4]\n * R.range(50, 53); //=> [50, 51, 52]\n */\nvar range = /*#__PURE__*/_curry2(function range(from, to) {\n if (!(_isNumber(from) && _isNumber(to))) {\n throw new TypeError('Both arguments to range must be numbers');\n }\n var result = Array(from < to ? to - from : 0);\n var finish = from < 0 ? to + Math.abs(from) : to - from;\n var idx = 0;\n while (idx < finish) {\n result[idx] = idx + from;\n idx += 1;\n }\n return result;\n});\nexport default range;","import _curry1 from \"./internal/_curry1.js\";\nimport _reduced from \"./internal/_reduced.js\";\n\n/**\n * Returns a value wrapped to indicate that it is the final value of the reduce\n * and transduce functions. The returned value should be considered a black\n * box: the internal structure is not guaranteed to be stable.\n *\n * This optimization is available to the below functions:\n * - [`reduce`](#reduce)\n * - [`reduceWhile`](#reduceWhile)\n * - [`reduceBy`](#reduceBy)\n * - [`reduceRight`](#reduceRight)\n * - [`transduce`](#transduce)\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category List\n * @sig a -> *\n * @param {*} x The final value of the reduce.\n * @return {*} The wrapped value.\n * @see R.reduce, R.reduceWhile, R.reduceBy, R.reduceRight, R.transduce\n * @example\n *\n * R.reduce(\n * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item),\n * [],\n * [1, 2, 3, 4, 5]) // [1, 2, 3]\n */\nvar reduced = /*#__PURE__*/_curry1(_reduced);\nexport default reduced;","import _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Replace a substring or regex match in a string with a replacement.\n *\n * The first two parameters correspond to the parameters of the\n * `String.prototype.replace()` function, so the second parameter can also be a\n * function.\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category String\n * @sig RegExp|String -> String -> String -> String\n * @param {RegExp|String} pattern A regular expression or a substring to match.\n * @param {String} replacement The string to replace the matches with.\n * @param {String} str The String to do the search and replacement in.\n * @return {String} The result.\n * @example\n *\n * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo'\n * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo'\n *\n * // Use the \"g\" (global) flag to replace all occurrences:\n * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar'\n */\nvar replace = /*#__PURE__*/_curry3(function replace(regex, replacement, str) {\n return str.replace(regex, replacement);\n});\nexport default replace;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns a copy of the list, sorted according to the comparator function,\n * which should accept two values at a time and return a negative number if the\n * first value is smaller, a positive number if it's larger, and zero if they\n * are equal. Please note that this is a **copy** of the list. It does not\n * modify the original.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, a) -> Number) -> [a] -> [a]\n * @param {Function} comparator A sorting function :: a -> b -> Int\n * @param {Array} list The list to sort\n * @return {Array} a new array with its elements sorted by the comparator function.\n * @see R.ascend, R.descend\n * @example\n *\n * const diff = function(a, b) { return a - b; };\n * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7]\n */\nvar sort = /*#__PURE__*/_curry2(function sort(comparator, list) {\n return Array.prototype.slice.call(list, 0).sort(comparator);\n});\nexport default sort;","import invoker from \"./invoker.js\";\n\n/**\n * Splits a string into an array of strings based on the given\n * separator.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category String\n * @sig (String | RegExp) -> String -> [String]\n * @param {String|RegExp} sep The pattern.\n * @param {String} str The string to separate into an array.\n * @return {Array} The array of strings from `str` separated by `sep`.\n * @see R.join\n * @example\n *\n * const pathComponents = R.split('/');\n * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node']\n *\n * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd']\n */\nvar split = /*#__PURE__*/invoker(1, 'split');\nexport default split;","import _curry2 from \"./internal/_curry2.js\";\nimport equals from \"./equals.js\";\nimport take from \"./take.js\";\n\n/**\n * Checks if a list starts with the provided sublist.\n *\n * Similarly, checks if a string starts with the provided substring.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category List\n * @sig [a] -> [a] -> Boolean\n * @sig String -> String -> Boolean\n * @param {*} prefix\n * @param {*} list\n * @return {Boolean}\n * @see R.endsWith\n * @example\n *\n * R.startsWith('a', 'abc') //=> true\n * R.startsWith('b', 'abc') //=> false\n * R.startsWith(['a'], ['a', 'b', 'c']) //=> true\n * R.startsWith(['b'], ['a', 'b', 'c']) //=> false\n */\nvar startsWith = /*#__PURE__*/_curry2(function (prefix, list) {\n return equals(take(prefix.length, list), prefix);\n});\nexport default startsWith;","export default function _isRegExp(x) {\n return Object.prototype.toString.call(x) === '[object RegExp]';\n}","import _cloneRegExp from \"./internal/_cloneRegExp.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _isRegExp from \"./internal/_isRegExp.js\";\nimport toString from \"./toString.js\";\n\n/**\n * Determines whether a given string matches a given regular expression.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category String\n * @sig RegExp -> String -> Boolean\n * @param {RegExp} pattern\n * @param {String} str\n * @return {Boolean}\n * @see R.match\n * @example\n *\n * R.test(/^x/, 'xyz'); //=> true\n * R.test(/^y/, 'xyz'); //=> false\n */\nvar test = /*#__PURE__*/_curry2(function test(pattern, str) {\n if (!_isRegExp(pattern)) {\n throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern));\n }\n return _cloneRegExp(pattern).test(str);\n});\nexport default test;","import _includesWith from \"./_includesWith.js\";\nimport _xfBase from \"./_xfBase.js\";\nvar XUniqWith = /*#__PURE__*/function () {\n function XUniqWith(pred, xf) {\n this.xf = xf;\n this.pred = pred;\n this.items = [];\n }\n XUniqWith.prototype['@@transducer/init'] = _xfBase.init;\n XUniqWith.prototype['@@transducer/result'] = _xfBase.result;\n XUniqWith.prototype['@@transducer/step'] = function (result, input) {\n if (_includesWith(this.pred, input, this.items)) {\n return result;\n } else {\n this.items.push(input);\n return this.xf['@@transducer/step'](result, input);\n }\n };\n return XUniqWith;\n}();\nexport default function _xuniqWith(pred) {\n return function (xf) {\n return new XUniqWith(pred, xf);\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _includesWith from \"./internal/_includesWith.js\";\nimport _xuniqWith from \"./internal/_xuniqWith.js\";\n\n/**\n * Returns a new list containing only one copy of each element in the original\n * list, based upon the value returned by applying the supplied predicate to\n * two list elements. Prefers the first item if two items compare equal based\n * on the predicate.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category List\n * @sig ((a, a) -> Boolean) -> [a] -> [a]\n * @param {Function} pred A predicate used to test whether two items are equal.\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * const strEq = R.eqBy(String);\n * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2]\n * R.uniqWith(strEq)([{}, {}]); //=> [{}]\n * R.uniqWith(strEq)([1, '1', 1]); //=> [1]\n * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1']\n */\nvar uniqWith = /*#__PURE__*/_curry2(/*#__PURE__*/_dispatchable([], _xuniqWith, function (pred, list) {\n var idx = 0;\n var len = list.length;\n var result = [];\n var item;\n while (idx < len) {\n item = list[idx];\n if (!_includesWith(pred, item, result)) {\n result[result.length] = item;\n }\n idx += 1;\n }\n return result;\n}));\nexport default uniqWith;","import _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Tests the final argument by passing it to the given predicate function. If\n * the predicate is satisfied, the function will return the result of calling\n * the `whenTrueFn` function with the same argument. If the predicate is not\n * satisfied, the argument is returned as is.\n *\n * @func\n * @memberOf R\n * @since v0.18.0\n * @category Logic\n * @sig (a -> Boolean) -> (a -> b) -> a -> a | b\n * @param {Function} pred A predicate function\n * @param {Function} whenTrueFn A function to invoke when the `condition`\n * evaluates to a truthy value.\n * @param {*} x An object to test with the `pred` function and\n * pass to `whenTrueFn` if necessary.\n * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`.\n * @see R.ifElse, R.unless, R.cond\n * @example\n *\n * // truncate :: String -> String\n * const truncate = R.when(\n * R.propSatisfies(R.gt(R.__, 10), 'length'),\n * R.pipe(R.take(10), R.append('…'), R.join(''))\n * );\n * truncate('12345'); //=> '12345'\n * truncate('0123456789ABC'); //=> '0123456789…'\n */\nvar when = /*#__PURE__*/_curry3(function when(pred, whenTrueFn, x) {\n return pred(x) ? whenTrueFn(x) : x;\n});\nexport default when;","import { always } from 'ramda';\n\n/**\n * A function that returns `undefined`.\n *\n * @func stubUndefined\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/1.0.0|v1.0.0}\n * @category Function\n * @sig ... -> undefined\n * @return {undefined}\n * @example\n *\n * RA.stubUndefined(); //=> undefined\n * RA.stubUndefined(1, 2, 3); //=> undefined\n */\nvar stubUndefined = always(void 0); // eslint-disable-line no-void\n\nexport default stubUndefined;","import { equals } from 'ramda';\nimport stubUndefined from './stubUndefined.js';\n\n/**\n * Checks if input value is `undefined`.\n *\n * @func isUndefined\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.0.1|v0.0.1}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotUndefined|isNotUndefined}\n * @example\n *\n * RA.isUndefined(1); //=> false\n * RA.isUndefined(undefined); //=> true\n * RA.isUndefined(null); //=> false\n */\nvar isUndefined = equals(stubUndefined());\nexport default isUndefined;","import { complement } from 'ramda';\nimport isUndefined from './isUndefined.js';\n\n/**\n * Checks if input value is complement `undefined`.\n *\n * @func isNotUndefined\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.0.1|v0.0.1}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isUndefined|isUndefined}\n * @example\n *\n * RA.isNotUndefined(1); //=> true\n * RA.isNotUndefined(undefined); //=> false\n * RA.isNotUndefined(null); //=> true\n */\nvar isNotUndefined = complement(isUndefined);\nexport default isNotUndefined;","import { equals } from 'ramda';\n\n/**\n * Checks if input value is `null`.\n *\n * @func isNull\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.1.0|v0.1.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotNull|isNotNull}\n * @example\n *\n * RA.isNull(1); //=> false\n * RA.isNull(undefined); //=> false\n * RA.isNull(null); //=> true\n */\nvar isNull = equals(null);\nexport default isNull;","import { complement } from 'ramda';\nimport isNull from './isNull.js';\n\n/**\n * Checks if input value is complement of `null`.\n *\n * @func isNotNull\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.1.0|v0.1.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNull|isNull}\n * @example\n *\n * RA.isNotNull(1); //=> true\n * RA.isNotNull(undefined); //=> true\n * RA.isNotNull(null); //=> false\n */\nvar isNotNull = complement(isNull);\nexport default isNotNull;","import { isNil, complement } from 'ramda';\n\n/**\n * Checks if input value is complement of `null` or `undefined`.\n *\n * @func isNotNil\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.3.0|v0.3.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link http://ramdajs.com/docs/#isNil|R.isNil}\n * @example\n *\n * RA.isNotNil(null); //=> false\n * RA.isNotNil(undefined); //=> false\n * RA.isNotNil(0); //=> true\n * RA.isNotNil([]); //=> true\n */\nvar isNotNil = complement(isNil);\nexport default isNotNil;","import { type, identical, pipe, curryN } from 'ramda';\n\n/**\n * Checks if input value is `Generator Function`.\n *\n * @func isGeneratorFunction\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isFunction|isFunction}, {@link RA.isAsyncFunction|isAsyncFunction}, {@link RA.isNotGeneratorFunction|isNotGeneratorFunction}\n * @example\n *\n * RA.isGeneratorFunction(function* test() { }); //=> true\n * RA.isGeneratorFunction(null); //=> false\n * RA.isGeneratorFunction(function test() { }); //=> false\n * RA.isGeneratorFunction(() => {}); //=> false\n */\nvar isGeneratorFunction = curryN(1, pipe(type, identical('GeneratorFunction')));\nexport default isGeneratorFunction;","import { pipe, type, identical, curryN } from 'ramda';\n\n/**\n * Checks if input value is `Async Function`.\n *\n * @func isAsyncFunction\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isFunction|isFunction}, {@link RA.isNotAsyncFunction|isNotAsyncFunction}, {@link RA.isGeneratorFunction|isGeneratorFunction}\n * @example\n *\n * RA.isAsyncFunction(async function test() { }); //=> true\n * RA.isAsyncFunction(null); //=> false\n * RA.isAsyncFunction(function test() { }); //=> false\n * RA.isAsyncFunction(() => {}); //=> false\n */\nvar isAsyncFunction = curryN(1, pipe(type, identical('AsyncFunction')));\nexport default isAsyncFunction;","import { anyPass, type, pipe, identical } from 'ramda';\nimport isGeneratorFunction from './isGeneratorFunction.js';\nimport isAsyncFunction from './isAsyncFunction.js';\n\n/**\n * Checks if input value is `Function`.\n *\n * @func isFunction\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotFunction|isNotFunction}, {@link RA.isAsyncFunction|isNotAsyncFunction}, {@link RA.isGeneratorFunction|isGeneratorFunction}\n * @example\n *\n * RA.isFunction(function test() { }); //=> true\n * RA.isFunction(function* test() { }); //=> true\n * RA.isFunction(async function test() { }); //=> true\n * RA.isFunction(() => {}); //=> true\n * RA.isFunction(null); //=> false\n * RA.isFunction('abc'); //=> false\n */\nvar isFunction = anyPass([pipe(type, identical('Function')), isGeneratorFunction, isAsyncFunction]);\nexport default isFunction;","import { curryN, pipe, type, identical } from 'ramda';\nimport isFunction from './isFunction.js';\n\n/**\n * Checks if input value is `Array`.\n *\n * @func isArray\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.3.0|v0.3.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotArray|isNotArray}\n * @example\n *\n * RA.isArray([]); //=> true\n * RA.isArray(null); //=> false\n * RA.isArray({}); //=> false\n */\nvar isArray = curryN(1, isFunction(Array.isArray) ? Array.isArray : pipe(type, identical('Array')));\nexport default isArray;","import { both, isEmpty } from 'ramda';\nimport isArray from './isArray.js';\n\n/**\n * Checks if input value is an empty `Array`.\n *\n * @func isEmptyArray\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotEmptyArray|isNotEmptyArray}\n * @example\n *\n * RA.isEmptyArray([]); // => true\n * RA.isEmptyArray([42]); // => false\n * RA.isEmptyArray({}); // => false\n * RA.isEmptyArray(null); // => false\n * RA.isEmptyArray(undefined); // => false\n * RA.isEmptyArray(42); // => false\n * RA.isEmptyArray('42'); // => false\n */\nvar isEmptyArray = both(isArray, isEmpty);\nexport default isEmptyArray;","import { both, isNotEmpty } from 'ramda';\nimport isArray from './isArray.js';\n\n/**\n * Checks if input value is not an empty `Array`.\n *\n * @func isNonEmptyArray\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isEmptyArray|isEmptyArray}\n * @example\n *\n * RA.isNonEmptyArray([42]); // => true\n * RA.isNonEmptyArray([]); // => false\n * RA.isNonEmptyArray({}); // => false\n * RA.isNonEmptyArray(null); // => false\n * RA.isNonEmptyArray(undefined); // => false\n * RA.isNonEmptyArray(42); // => false\n * RA.isNonEmptyArray('42'); // => false\n */\nvar isNonEmptyArray = both(isArray, isNotEmpty);\nexport default isNonEmptyArray;","import { curryN, pipe, type, identical } from 'ramda';\n\n/**\n * Checks if input value is `String`.\n *\n * @func isString\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.4.0|v0.4.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotString|isNotString}\n * @example\n *\n * RA.isString('abc'); //=> true\n * RA.isString(1); //=> false\n */\nvar isString = curryN(1, pipe(type, identical('String')));\nexport default isString;","import { equals } from 'ramda';\n\n/**\n * Checks if input value is an empty `String`.\n *\n * @func isEmptyString\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotEmptyString|isNotEmptyString}\n * @example\n *\n * RA.isEmptyString(''); // => true\n * RA.isEmptyString('42'); // => false\n * RA.isEmptyString(new String('42')); // => false\n * RA.isEmptyString(new String('')); // => false\n * RA.isEmptyString([42]); // => false\n * RA.isEmptyString({}); // => false\n * RA.isEmptyString(null); // => false\n * RA.isEmptyString(undefined); // => false\n * RA.isEmptyString(42); // => false\n */\nvar isEmptyString = equals('');\nexport default isEmptyString;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nvar isOfTypeObject = function isOfTypeObject(val) {\n return _typeof(val) === 'object';\n};\nexport default isOfTypeObject;","import { both, either, curryN } from 'ramda';\nimport isNotNull from './isNotNull.js';\nimport isFunction from './isFunction.js';\nimport isOfTypeObject from './internal/isOfTypeObject.js';\n\n/* eslint-disable max-len */\n/**\n * Checks if input value is language type of `Object`.\n *\n * @func isObj\n * @aliases isObject\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotObj|isNotObj}, {@link RA.isObjLike|isObjLike}, {@link RA.isPlainObj|isPlainObj}\n * @example\n *\n * RA.isObj({}); //=> true\n * RA.isObj([]); //=> true\n * RA.isObj(() => {}); //=> true\n * RA.isObj(null); //=> false\n * RA.isObj(undefined); //=> false\n */\n/* eslint-enable max-len */\nvar isObj = curryN(1, both(isNotNull, either(isOfTypeObject, isFunction)));\nexport default isObj;","import { complement } from 'ramda';\nimport isObj from './isObj.js';\n\n/* eslint-disable max-len */\n/**\n * Checks if input value is complement of language type of `Object`.\n *\n * @func isNotObj\n * @aliases isNotObject\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isObj|isObj}, {@link RA.isObjLike|isObjLike}, {@link RA.isPlainObj|isPlainObj}\n * @example\n *\n * RA.isNotObj({}); //=> false\n * RA.isNotObj([]); //=> false\n * RA.isNotObj(() => {}); //=> false\n * RA.isNotObj(null); //=> true\n * RA.isNotObj(undefined); //=> true\n */\n/* eslint-enable max-len */\nvar isNotObj = complement(isObj);\nexport default isNotObj;","import { allPass, isNotEmpty } from 'ramda';\nimport isString from './isString.js';\nimport isNotObj from './isNotObj.js';\n\n/**\n * Checks if input value is not an empty `String`.\n *\n * @func isNonEmptyString\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.4.0|v2.4.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isEmptyString|isEmptyString}\n * @example\n *\n * RA.isNonEmptyString('42'); // => true\n * RA.isNonEmptyString(''); // => false\n * RA.isNonEmptyString(new String('42')); // => false\n * RA.isNonEmptyString(new String('')); // => false\n * RA.isNonEmptyString([42]); // => false\n * RA.isNonEmptyString({}); // => false\n * RA.isNonEmptyString(null); // => false\n * RA.isNonEmptyString(undefined); // => false\n * RA.isNonEmptyString(42); // => false\n */\nvar isNonEmptyString = allPass([isString, isNotObj, isNotEmpty]);\nexport default isNonEmptyString;","import { complement } from 'ramda';\nimport isFunction from './isFunction.js';\n\n/* eslint-disable max-len */\n/**\n * Checks if input value is complement of `Function`.\n *\n * @func isNotFunction\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isFunction|isFunction}, {@link RA.isAsyncFunction|isNotAsyncFunction}, {@link RA.isGeneratorFunction|isGeneratorFunction}\n * @example\n *\n * RA.isNotFunction(function test() { }); //=> false\n * RA.isNotFunction(function* test() { }); //=> false\n * RA.isNotFunction(async function test() { }); //=> false\n * RA.isNotFunction(() => {}); //=> false\n * RA.isNotFunction(null); //=> true\n * RA.isNotFunction('abc'); //=> true\n */\n/* eslint-enable max-len */\nvar isNotFunction = complement(isFunction);\nexport default isNotFunction;","import { both, curryN } from 'ramda';\nimport isNotNull from './isNotNull.js';\nimport isOfTypeObject from './internal/isOfTypeObject.js';\n\n/* eslint-disable max-len */\n/**\n * Checks if value is object-like. A value is object-like if it's not null and has a typeof result of \"object\".\n *\n * @func isObjLike\n * @aliases isObjectLike\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotObjLike|isNotObjLike}, {@link RA.isObj|isObj}, {@link RA.isPlainObj|isPlainObj}\n * @example\n *\n * RA.isObjLike({}); //=> true\n * RA.isObjLike([]); //=> true\n * RA.isObjLike(() => {}); //=> false\n * RA.isObjLike(null); //=> false\n * RA.isObjLike(undefined); //=> false\n */\n/* eslint-enable max-len */\nvar isObjLike = curryN(1, both(isNotNull, isOfTypeObject));\nexport default isObjLike;","import { pipe, type, identical, both, equals, toString, pathSatisfies, curryN } from 'ramda';\nimport isNull from './isNull.js';\nimport isObjLike from './isObjLike.js';\nimport isFunction from './isFunction.js';\nvar isObject = pipe(type, identical('Object'));\nvar isObjectConstructor = pipe(toString, equals(toString(Object)));\nvar hasObjectConstructor = pathSatisfies(both(isFunction, isObjectConstructor), ['constructor']);\n\n/* eslint-disable max-len */\n/**\n * Check to see if an object is a plain object (created using `{}`, `new Object()` or `Object.create(null)`).\n *\n * @func isPlainObj\n * @aliases isPlainObject\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotPlainObj|isNotPlainObj}, {@link RA.isObjLike|isObjLike}, {@link RA.isObj|isObj}\n * @example\n *\n * class Bar {\n * constructor() {\n * this.prop = 'value';\n * }\n * }\n *\n * RA.isPlainObj(new Bar()); //=> false\n * RA.isPlainObj({ prop: 'value' }); //=> true\n * RA.isPlainObj(['a', 'b', 'c']); //=> false\n * RA.isPlainObj(Object.create(null); //=> true\n * RA.isPlainObj(new Object()); //=> true\n */\n/* eslint-enable max-len */\nvar isPlainObj = curryN(1, function (val) {\n if (!isObjLike(val) || !isObject(val)) {\n return false;\n }\n var proto = Object.getPrototypeOf(val);\n if (isNull(proto)) {\n return true;\n }\n return hasObjectConstructor(proto);\n});\nexport default isPlainObj;","import { curryN, pipe, type, identical } from 'ramda';\n\n/**\n * Checks if value is a `Number` primitive or object.\n *\n * @func isNumber\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.6.0|v0.6.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotNumber|isNotNumber}\n * @example\n *\n * RA.isNumber(5); // => true\n * RA.isNumber(Number.MAX_VALUE); // => true\n * RA.isNumber(-Infinity); // => true\n * RA.isNumber(NaN); // => true\n * RA.isNumber('5'); // => false\n */\nvar isNumber = curryN(1, pipe(type, identical('Number')));\nexport default isNumber;","import { both } from 'ramda';\nimport isNumber from '../../isNumber.js';\n\n// eslint-disable-next-line no-restricted-globals\nvar isFinitePonyfill = both(isNumber, isFinite);\nexport default isFinitePonyfill;","import { bind, curryN } from 'ramda';\nimport isFunction from './isFunction.js';\nimport ponyfill from './internal/ponyfills/Number.isFinite.js';\nexport var isFinitePonyfill = curryN(1, ponyfill);\n\n/**\n * Checks whether the passed value is a finite `Number`.\n *\n * @func isFinite\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.7.0|v0.7.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotFinite|isNotFinite}\n * @example\n *\n * RA.isFinite(Infinity); //=> false\n * RA.isFinite(NaN); //=> false\n * RA.isFinite(-Infinity); //=> false\n *\n * RA.isFinite(0); // true\n * RA.isFinite(2e64); // true\n *\n * RA.isFinite('0'); // => false\n * // would've been true with global isFinite('0')\n * RA.isFinite(null); // => false\n * // would've been true with global isFinite(null)\n */\nvar _isFinite = isFunction(Number.isFinite) ? curryN(1, bind(Number.isFinite, Number)) : isFinitePonyfill;\nexport default _isFinite;","import { both, converge, equals, identity } from 'ramda';\nimport isFinite from '../../isFinite.js';\nvar isIntegerPonyfill = both(isFinite, converge(equals, [Math.floor, identity]));\nexport default isIntegerPonyfill;","import { bind, curryN } from 'ramda';\nimport isFunction from './isFunction.js';\nimport ponyfill from './internal/ponyfills/Number.isInteger.js';\nexport var isIntegerPonyfill = curryN(1, ponyfill);\n\n/**\n * Checks whether the passed value is an `integer`.\n *\n * @func isInteger\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/0.7.0|v0.7.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotInteger|isNotInteger}\n * @example\n *\n * RA.isInteger(0); //=> true\n * RA.isInteger(1); //=> true\n * RA.isInteger(-100000); //=> true\n *\n * RA.isInteger(0.1); //=> false\n * RA.isInteger(Math.PI); //=> false\n *\n * RA.isInteger(NaN); //=> false\n * RA.isInteger(Infinity); //=> false\n * RA.isInteger(-Infinity); //=> false\n * RA.isInteger('10'); //=> false\n * RA.isInteger(true); //=> false\n * RA.isInteger(false); //=> false\n * RA.isInteger([1]); //=> false\n */\nvar isInteger = isFunction(Number.isInteger) ? curryN(1, bind(Number.isInteger, Number)) : isIntegerPonyfill;\nexport default isInteger;","import { type, identical, pipe, curryN } from 'ramda';\n\n/**\n * Checks if value is `RegExp` object.\n *\n * @func isRegExp\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.5.0|v2.5.0}\n * @category Type\n * @sig * -> Boolean\n * @param {*} val The value to test\n * @return {boolean}\n * @see {@link RA.isNotRegExp|isNotRegExp}\n * @example\n *\n * RA.isRegExp(new RegExp()); //=> true\n * RA.isRegExp(/(?:)/); //=> true\n * RA.isRegExp(1); //=> false\n */\nvar isRegExp = curryN(1, pipe(type, identical('RegExp')));\nexport default isRegExp;","function _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nimport { sort, comparator, prop, pipe, head, curryN, reduce, reduced, curry, ifElse } from 'ramda';\n\n/**\n * Can be used as a way to compose multiple invokers together to form polymorphic functions,\n * or functions that exhibit different behaviors based on their argument(s).\n * Consumes dispatching functions and keep trying to invoke each in turn, until a non-nil value is returned.\n *\n * Accepts a list of dispatching functions and returns a new function.\n * When invoked, this new function is applied to some arguments,\n * each dispatching function is applied to those same arguments until one of the\n * dispatching functions returns a non-nil value.\n *\n * @func dispatch\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.6.0|v2.6.0}\n * @category Function\n * @sig [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> x1 | x2 | ...\n * @param {!Array} functions A list of functions\n * @return {*|undefined} Returns the first not-nil value, or undefined if either an empty list is provided or none of the dispatching functions returns a non-nil value\n * @see {@link RA.isNotNil}\n * @example\n *\n * // returns first non-nil value\n * const stubNil = () => null;\n * const stubUndefined = () => undefined;\n * const addOne = v => v + 1;\n * const addTwo = v => v + 2;\n *\n * RA.dispatch([stubNil, stubUndefined, addOne, addTwo])(1); //=> 2\n *\n * // acts as a switch\n * const fnSwitch = RA.dispatch([\n * R.ifElse(RA.isString, s => `${s}-join`, RA.stubUndefined),\n * R.ifElse(RA.isNumber, n => n + 1, RA.stubUndefined),\n * R.ifElse(RA.isDate, R.T, RA.stubUndefined),\n * ]);\n * fnSwitch(1); //=> 2\n */\nimport isNotNil from './isNotNil.js';\nimport isNonEmptyArray from './isNonEmptyArray.js';\nimport stubUndefined from './stubUndefined.js';\nvar byArity = comparator(function (a, b) {\n return a.length > b.length;\n});\nvar getMaxArity = pipe(sort(byArity), head, prop('length'));\nvar iteratorFn = curry(function (args, accumulator, fn) {\n var result = fn.apply(void 0, _toConsumableArray(args));\n return isNotNil(result) ? reduced(result) : accumulator;\n});\nvar dispatchImpl = function dispatchImpl(functions) {\n var arity = getMaxArity(functions);\n return curryN(arity, function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return reduce(iteratorFn(args), undefined, functions);\n });\n};\nvar dispatch = ifElse(isNonEmptyArray, dispatchImpl, stubUndefined);\nexport default dispatch;","import { flip, includes } from 'ramda';\n\n/**\n * Returns true if the specified value is equal, in R.equals terms,\n * to at least one element of the given list or false otherwise.\n * Given list can be a string.\n *\n * Like {@link http://ramdajs.com/docs/#includes|R.includes} but with argument order reversed.\n *\n * @func included\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/3.0.0|v3.0.0}\n * @category List\n * @sig [a] -> a -> Boolean\n * @param {Array|String} list The list to consider\n * @param {*} a The item to compare against\n * @return {boolean} Returns Boolean `true` if an equivalent item is in the list or `false` otherwise\n * @see {@link http://ramdajs.com/docs/#includes|R.includes}\n * @example\n *\n * RA.included([1, 2, 3], 3); //=> true\n * RA.included([1, 2, 3], 4); //=> false\n * RA.included([{ name: 'Fred' }], { name: 'Fred' }); //=> true\n * RA.included([[42]], [42]); //=> true\n */\nvar included = flip(includes);\nexport default included;","import { curryN, path, apply, init, bind } from 'ramda';\nimport isNotFunction from './isNotFunction.js';\nimport isEmptyArray from './isEmptyArray.js';\n\n/**\n * Invokes the method at path of object with given arguments.\n *\n * @func invokeArgs\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.27.0|v2.27.0}\n * @category Object\n * @sig Array -> Array -> Object -> *\n * @param {Array.} path The path of the method to invoke\n * @param {Array} args The arguments to invoke the method with\n * @param {Object} obj The object to query\n * @return {*}\n * @example\n *\n * RA.invokeArgs(['abs'], [-1], Math); //=> 1\n * RA.invokeArgs(['path', 'to', 'non-existent', 'method'], [-1], Math); //=> undefined\n */\n\nvar invokeArgs = curryN(3, function (mpath, args, obj) {\n var method = path(mpath, obj);\n var context = path(init(mpath), obj);\n if (isNotFunction(method)) return undefined;\n if (isEmptyArray(mpath)) return undefined;\n var boundMethod = bind(method, context);\n return apply(boundMethod, args);\n});\nexport default invokeArgs;","import { when, replace } from 'ramda';\nimport isString from './isString.js';\n\n/**\n * Escapes the RegExp special characters.\n *\n * @func escapeRegExp\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.21.0|v2.21.0}\n * @category String\n * @sig String -> String\n * @param {string} val the value to escape\n * @return {string}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping|MDN Regular Expressions Escaping}\n * @example\n *\n * RA.escapeRegExp('[ramda-adjunct](https://github.com/char0n/ramda-adjunct)'); //=> '\\[ramda\\-adjunct\\]\\(https://github\\.com/char0n/ramda\\-adjunct\\)'\n */\nvar escapeRegExp = when(isString, replace(/[.*+?^${}()|[\\]\\\\-]/g, '\\\\$&'));\nexport default escapeRegExp;","import { replace } from 'ramda';\nimport isRegExp from '../../isRegExp.js';\nimport escapeRegExp from '../../escapeRegExp.js';\nvar checkArguments = function checkArguments(searchValue, replaceValue, str) {\n if (str == null || searchValue == null || replaceValue == null) {\n throw TypeError('Input values must not be `null` or `undefined`');\n }\n};\nvar checkValue = function checkValue(value, valueName) {\n if (typeof value !== 'string') {\n if (!(value instanceof String)) {\n throw TypeError(\"`\".concat(valueName, \"` must be a string\"));\n }\n }\n};\nvar checkSearchValue = function checkSearchValue(searchValue) {\n if (typeof searchValue !== 'string' && !(searchValue instanceof String) && !(searchValue instanceof RegExp)) {\n throw TypeError('`searchValue` must be a string or an regexp');\n }\n};\nvar replaceAll = function replaceAll(searchValue, replaceValue, str) {\n checkArguments(searchValue, replaceValue, str);\n checkValue(str, 'str');\n checkValue(replaceValue, 'replaceValue');\n checkSearchValue(searchValue);\n var regexp = new RegExp(isRegExp(searchValue) ? searchValue : escapeRegExp(searchValue), 'g');\n return replace(regexp, replaceValue, str);\n};\nexport default replaceAll;","import { curryN, invoker } from 'ramda';\nimport isFunction from './isFunction.js';\nimport ponyfill from './internal/ponyfills/String.replaceAll.js';\nexport var replaceAllPonyfill = curryN(3, ponyfill);\nexport var replaceAllInvoker = invoker(2, 'replaceAll');\n\n/**\n * Replaces all substring matches in a string with a replacement.\n *\n * @func replaceAll\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.17.0|v2.17.0}\n * @category String\n * @sig String -> String -> String -> String\n * @param {string} searchValue The substring or a global RegExp to match\n * @param {string} replaceValue The string to replace the matches with\n * @param {string} str The String to do the search and replacement in\n * @return {string} A new string containing all the `searchValue` replaced with the `replaceValue`\n * @throws {TypeError} When invalid arguments provided\n * @see {@link http://ramdajs.com/docs/#replace|R.replace}, {@link https://github.com/tc39/proposal-string-replaceall|TC39 proposal}\n * @example\n *\n * RA.replaceAll('ac', 'ef', 'ac ab ac ab'); //=> 'ef ab ef ab'\n * RA.replaceAll('', '_', 'xxx'); //=> '_x_x_x_'\n * RA.replaceAll(/x/g, 'v', 'xxx'); //=> 'vvv'\n * RA.replaceAll(/x/, 'v', 'xxx'); //=> TypeError\n */\nvar replaceAll = isFunction(String.prototype.replaceAll) ? replaceAllInvoker : replaceAllPonyfill;\nexport default replaceAll;","import { curry, dropLastWhile, join, pipe, split } from 'ramda';\nimport included from './included.js';\n\n/**\n * Removes specified characters from the end of a string.\n *\n * @func trimCharsEnd\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.25.0|v2.25.0}\n * @category String\n * @sig String -> String\n * @param {string} chars The characters to trim\n * @param {string} value The string to trim\n * @return {string} Returns the trimmed string.\n * @example\n *\n * RA.trimCharsEnd('_-', '-_-abc-_-'); //=> '-_-abc'\n */\n\nvar trimCharsEnd = curry(function (chars, value) {\n return pipe(split(''), dropLastWhile(included(chars)), join(''))(value);\n});\nexport default trimCharsEnd;","import { curry, dropWhile, join, pipe, split } from 'ramda';\nimport included from './included.js';\n\n/**\n * Removes specified characters from the beginning of a string.\n *\n * @func trimCharsStart\n * @memberOf RA\n * @since {@link https://char0n.github.io/ramda-adjunct/2.24.0|v2.24.0}\n * @category String\n * @sig String -> String\n * @param {string} chars The characters to trim\n * @param {string} value The string to trim\n * @return {string} Returns the trimmed string.\n * @example\n *\n * RA.trimCharsStart('_-', '-_-abc-_-'); //=> 'abc-_-'\n */\n\nvar trimCharsStart = curry(function (chars, value) {\n return pipe(split(''), dropWhile(included(chars)), join(''))(value);\n});\nexport default trimCharsStart;","import process from 'process';\nimport { pathSatisfies, propOr, pipe, test, last } from 'ramda';\nimport { isUndefined, replaceAll, isNotUndefined, trimCharsEnd } from 'ramda-adjunct';\n\n/**\n * SPDX-FileCopyrightText: Copyright (c) 2015 James Messinger\n *\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * @public\n */\n\nconst isWindows = () => pathSatisfies(test(/^win/), ['platform'], process);\n\n/**\n * Returns the protocol of the given URL, or `undefined` if it has no protocol.\n * @public\n */\nexport const getProtocol = url => {\n try {\n const parsedUrl = new URL(url);\n return trimCharsEnd(':', parsedUrl.protocol);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Returns true if given URL has protocol.\n * @public\n */\nexport const hasProtocol = pipe(getProtocol, isNotUndefined);\n\n/**\n * Returns the lower-cased file extension of the given URL,\n * or an empty string if it has no extension.\n * @public\n */\nexport const getExtension = url => {\n const lastDotPosition = url.lastIndexOf('.');\n if (lastDotPosition >= 0) {\n return url.substring(lastDotPosition).toLowerCase();\n }\n return '';\n};\n\n/**\n * Determines whether the given path is a filesystem path.\n * This includes \"file://\" URLs.\n * @public\n */\nexport const isFileSystemPath = uri => {\n // @ts-ignore\n if (process.browser) {\n /**\n * We're running in a browser, so assume that all paths are URLs.\n * This way, even relative paths will be treated as URLs rather than as filesystem paths.\n */\n return false;\n }\n const protocol = getProtocol(uri);\n return isUndefined(protocol) || protocol === 'file' || /^[a-zA-Z]$/.test(protocol);\n};\n\n/**\n * Determines whether the given URI is an HTTP(S) URL.\n * @public\n */\nexport const isHttpUrl = url => {\n const protocol = getProtocol(url);\n return protocol === 'http' || protocol === 'https';\n};\n\n/**\n * Determines whether the given URI\n * @public\n */\nexport const isURI = uri => {\n try {\n return new URL(uri) && true;\n } catch {\n return false;\n }\n};\n\n/**\n * @public\n */\n\n/**\n * Converts a URL to a local filesystem path.\n * @public\n */\nexport const toFileSystemPath = (uri, options) => {\n // RegExp patterns to URL-decode special characters for local filesystem paths\n const urlDecodePatterns = [/%23/g, '#', /%24/g, '$', /%26/g, '&', /%2C/g, ',', /%40/g, '@'];\n const keepFileProtocol = propOr(false, 'keepFileProtocol', options);\n const isWindowsPredicate = propOr(isWindows, 'isWindows', options);\n\n // Step 1: `decodeURI` will decode characters such as Cyrillic characters, spaces, etc.\n let path = decodeURI(uri);\n\n // Step 2: Manually decode characters that are not decoded by `decodeURI`.\n // This includes characters such as \"#\" and \"?\", which have special meaning in URLs,\n // but are just normal characters in a filesystem path.\n for (let i = 0; i < urlDecodePatterns.length; i += 2) {\n // @ts-ignore\n path = path.replace(urlDecodePatterns[i], urlDecodePatterns[i + 1]);\n }\n\n // Step 3: If it's a \"file://\" URL, then format it consistently\n // or convert it to a local filesystem path\n let isFileUrl = path.substring(0, 7).toLowerCase() === 'file://';\n if (isFileUrl) {\n // Strip-off the protocol, and the initial \"/\", if there is one\n path = path[7] === '/' ? path.substring(8) : path.substring(7);\n\n // insert a colon (\":\") after the drive letter on Windows\n if (isWindowsPredicate() && path[1] === '/') {\n path = `${path[0]}:${path.substring(1)}`;\n }\n if (keepFileProtocol) {\n // Return the consistently-formatted \"file://\" URL\n path = `file:///${path}`;\n } else {\n // Convert the \"file://\" URL to a local filesystem path.\n // On Windows, it will start with something like \"C:/\".\n // On Posix, it will start with \"/\"\n isFileUrl = false;\n path = isWindowsPredicate() ? path : `/${path}`;\n }\n }\n\n // Step 4: Normalize Windows paths (unless it's a \"file://\" URL)\n if (isWindowsPredicate() && !isFileUrl) {\n // Replace forward slashes with backslashes\n path = replaceAll('/', '\\\\', path);\n\n // Capitalize the drive letter\n if (path.substring(1, 3) === ':\\\\') {\n path = path[0].toUpperCase() + path.substring(1);\n }\n }\n return path;\n};\n\n/**\n * Converts a filesystem path to a properly-encoded URL.\n *\n * This is intended to handle situations where resolver is called\n * with a filesystem path that contains characters which are not allowed in URLs.\n *\n * @example\n * The following filesystem paths would be converted to the following URLs:\n *```\n * <\"!@#$%^&*+=?'>.json ==> %3C%22!@%23$%25%5E&*+=%3F\\'%3E.json\n * C:\\\\My Documents\\\\File (1).json ==> C:/My%20Documents/File%20(1).json\n * file://Project #42/file.json ==> file://Project%20%2342/file.json\n * ```\n * @public\n */\nexport const fromFileSystemPath = uri => {\n const urlEncodePatterns = [/\\?/g, '%3F', /#/g, '%23'];\n let path = uri;\n\n // Step 1: On Windows, replace backslashes with forward slashes,\n // rather than encoding them as \"%5C\"\n if (isWindows()) {\n path = path.replace(/\\\\/g, '/');\n }\n\n // Step 2: `encodeURI` will take care of MOST characters\n path = encodeURI(path);\n\n // Step 3: Manually encode characters that are not encoded by `encodeURI`.\n // This includes characters such as \"#\" and \"?\", which have special meaning in URLs,\n // but are just normal characters in a filesystem path.\n for (let i = 0; i < urlEncodePatterns.length; i += 2) {\n // @ts-ignore\n path = path.replace(urlEncodePatterns[i], urlEncodePatterns[i + 1]);\n }\n return path;\n};\n\n/**\n * Returns the hash (URL fragment), of the given path.\n * If there is no hash, then the root hash (\"#\") is returned.\n * @public\n */\nexport const getHash = uri => {\n const hashIndex = uri.indexOf('#');\n if (hashIndex !== -1) {\n return uri.substring(hashIndex);\n }\n return '#';\n};\n\n/**\n * Removes the hash (URL fragment), if any, from the given path.\n * @public\n */\nexport const stripHash = uri => {\n const hashIndex = uri.indexOf('#');\n let hashStrippedUri = uri;\n if (hashIndex >= 0) {\n hashStrippedUri = uri.substring(0, hashIndex);\n }\n return hashStrippedUri;\n};\n\n/**\n * Returns the current working directory (in Node) or the current page URL (in browsers).\n * @public\n */\nexport const cwd = () => {\n // @ts-ignore\n if (process.browser) {\n return stripHash(globalThis.location.href);\n }\n const path = process.cwd();\n const lastChar = last(path);\n if (['/', '\\\\'].includes(lastChar)) {\n return path;\n }\n return path + (isWindows() ? '\\\\' : '/');\n};\n\n/**\n * Resolves a target URI relative to a base URI in a manner similar to that of a Web browser resolving an anchor tag HREF.\n * @public\n */\nexport const resolve = (from, to) => {\n const resolvedUrl = new URL(to, new URL(from, 'resolve://'));\n if (resolvedUrl.protocol === 'resolve:') {\n // `from` is a relative URL.\n const {\n pathname,\n search,\n hash\n } = resolvedUrl;\n return pathname + search + hash;\n }\n return resolvedUrl.toString();\n};\n\n/**\n * Sanitizes/Encodes URI to it's url encoded form.\n *\n * The functional will compensate with the usecase when\n * already sanitized URI is passed to it,\n * by first unsatizing it and then performing sanitization again.\n * @public\n */\n\nexport const sanitize = uri => {\n if (isFileSystemPath(uri)) {\n return fromFileSystemPath(toFileSystemPath(uri));\n }\n try {\n return new URL(uri).toString();\n } catch {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI#encoding_for_ipv6\n return encodeURI(decodeURI(uri)).replace(/%5B/g, '[').replace(/%5D/g, ']');\n }\n};\n\n/**\n * Unsanitizes/Decodes URI to it's url encoded form.\n * This function already assumes that hash part of the URI\n * has been removed prior to transforming it to it's sanitized form.\n * @public\n */\n\nexport const unsanitize = uri => {\n if (isFileSystemPath(uri)) {\n return toFileSystemPath(uri);\n }\n return decodeURI(uri);\n};","import { type } from 'ramda';\nimport { isString } from 'ramda-adjunct';\nimport * as url from \"./util/url.mjs\";\n/**\n * This class represents a File object with url and data.\n * @public\n */\n/**\n * @public\n */\nclass File {\n uri;\n mediaType;\n data;\n parseResult;\n constructor({\n uri,\n mediaType = 'text/plain',\n data,\n parseResult\n }) {\n this.uri = uri;\n this.mediaType = mediaType;\n this.data = data;\n this.parseResult = parseResult;\n }\n get extension() {\n if (isString(this.uri)) {\n return url.getExtension(this.uri);\n }\n return '';\n }\n toString() {\n if (typeof this.data === 'string') {\n return this.data;\n }\n if (this.data instanceof ArrayBuffer || ['ArrayBuffer'].includes(type(this.data)) || ArrayBuffer.isView(this.data)) {\n const textDecoder = new TextDecoder('utf-8');\n return textDecoder.decode(this.data);\n }\n return String(this.data);\n }\n}\nexport default File;","import { isNotUndefined, isString } from 'ramda-adjunct';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass ReferenceSet {\n rootRef;\n refs;\n circular;\n constructor({\n refs = [],\n circular = false\n } = {}) {\n this.refs = [];\n this.circular = circular;\n refs.forEach(this.add.bind(this));\n }\n get size() {\n return this.refs.length;\n }\n add(reference) {\n if (!this.has(reference)) {\n this.refs.push(reference);\n this.rootRef = this.rootRef === undefined ? reference : this.rootRef;\n reference.refSet = this; // eslint-disable-line no-param-reassign\n }\n return this;\n }\n merge(anotherRefSet) {\n for (const reference of anotherRefSet.values()) {\n this.add(reference);\n }\n return this;\n }\n has(thing) {\n const uri = isString(thing) ? thing : thing.uri;\n return isNotUndefined(this.find(ref => ref.uri === uri));\n }\n find(predicate) {\n return this.refs.find(predicate);\n }\n *values() {\n yield* this.refs;\n }\n clean() {\n this.refs.forEach(ref => {\n ref.refSet = undefined; // eslint-disable-line no-param-reassign\n });\n this.rootRef = undefined;\n this.refs.length = 0;\n }\n}\nexport default ReferenceSet;","import { identity } from 'ramda';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nconst defaultOptions = {\n parse: {\n /**\n * This is media type that will be used to parse the input.\n */\n mediaType: 'text/plain',\n /**\n * Determines how different types of files will be parsed.\n *\n * You can add additional parsers of your own, replace an existing one with\n * your own implementation, or remove any resolver by removing it from the list.\n * It's recommended to keep the order of parser from most specific ones to most generic ones.\n */\n parsers: [],\n /**\n * These options are merged with parser plugin instance before the plugin is run.\n */\n parserOpts: {}\n },\n resolve: {\n /**\n * baseURI serves as a base for all relative URL found in ApiDOM references.\n */\n baseURI: '',\n /**\n * Determines how References will be resolved.\n *\n * You can add additional resolvers of your own, replace an existing one with\n * your own implementation, or remove any resolver by removing it from the list.\n */\n resolvers: [],\n /**\n * These options are merged with resolver plugin instance before the plugin is run.\n */\n resolverOpts: {},\n /**\n * Determines strategies how References are identified and processed by resolvers.\n * Strategy is determined by media type.\n *\n * You can add additional resolver strategies of your own, replace an existing one with\n * your own implementation, or remove any resolve strategy by removing it from the list.\n */\n strategies: [],\n /**\n * These options are available in resolver strategy `canResolve` and `resolve` methods.\n */\n strategyOpts: {},\n /**\n * Determines whether internal references will be resolved.\n * Internal references will simply be ignored.\n */\n internal: true,\n /**\n * Determines whether external references will be resolved.\n * If this option is disabled, then none of above resolvers will be called.\n * Instead, external references will simply be ignored.\n */\n external: true,\n /**\n * Determines the maximum depth of resolve algorithms.\n * By default, there is no limit.\n *\n * This option tracks the depth of the file tree not the depth of the dereference path.\n *\n * It can be set to any positive integer number or zero (0).\n *\n * The resolver should throw MaximumResolverDepthError if resolution depth\n * is exceeded by this option.\n */\n maxDepth: +Infinity\n },\n dereference: {\n /**\n * Determines strategies how ApiDOM is dereferenced.\n * Strategy is determined by media type or by inspecting ApiDOM to be dereferenced.\n *\n * You can add additional dereference strategies of your own, replace an existing one with\n * your own implementation, or remove any dereference strategy by removing it from the list.\n */\n strategies: [],\n /**\n * These options are available in dereference strategy `canDereference` and `dereference` methods.\n */\n strategyOpts: {},\n /**\n * This option accepts an instance of pre-computed ReferenceSet.\n * If provided it will speed up the dereferencing significantly as the external\n * resolution doesn't need to happen anymore.\n */\n refSet: null,\n /**\n * Determines the maximum depth of dereferencing.\n * By default, there is no limit.\n *\n * The maxDepth represents a number of references that needed to be followed\n * before the eventual value was reached.\n *\n * It can be set to any positive integer number or zero (0).\n *\n * The dereferencing should throw MaximumDereferenceDepthError if dereferencing depth\n * is exceeded by this option.\n */\n maxDepth: +Infinity,\n /**\n * Determines how circular references are handled.\n *\n * \"ignore\" - circular reference are allowed\n * \"replace\" - circular references are not allowed and are translated to RefElement\n * \"error\" - circular references are not allowed and will throw an error\n */\n circular: 'ignore',\n /**\n * This function is used to replace circular references when `circular` option is set to \"replace\".\n * By default, it's an identity function. It means that circular references are replaced with RefElement.\n */\n circularReplacer: identity,\n /**\n * Determines whether the dereferencing process will be immutable.\n * By default, the dereferencing process is immutable, which means that the original\n * ApiDOM passed to the dereference process is NOT modified.\n *\n * true - the dereferencing process will be immutable (deep cloning of ApiDOM is involved)\n * false - the dereferencing process will be mutable\n */\n immutable: true\n },\n bundle: {\n /**\n * Determines strategies how ApiDOM is bundled.\n * Strategy is determined by media type or by inspecting ApiDOM to be bundled.\n *\n * You can add additional bundle strategies of your own, replace an existing one with\n * your own implementation, or remove any bundle strategy by removing it from the list.\n */\n strategies: [],\n /**\n * This option accepts an instance of pre-computed ReferenceSet.\n * If provided it will speed up the bundling significantly as the external\n * resolution doesn't need to happen anymore.\n */\n refSet: null,\n /**\n * Determines the maximum depth of bundling.\n * By default, there is no limit.\n *\n * The maxDepth represents a number of references that needed to be followed\n * before the eventual value was reached.\n *\n * It can be set to any positive integer number or zero (0).\n *\n * The bundling should throw MaximumBundleDepthError if bundling depth\n * is exceeded by this option.\n */\n maxDepth: +Infinity\n }\n};\nexport default defaultOptions;","import { mergeDeepRight, lens, path, assocPath, over } from 'ramda';\nimport { isEmptyString } from 'ramda-adjunct';\nimport { cwd } from \"../util/url.mjs\";\n/**\n * Algorithm for deep merging options.\n */\n\nconst baseURILens = lens(path(['resolve', 'baseURI']), assocPath(['resolve', 'baseURI']));\nconst baseURIDefault = baseURI => isEmptyString(baseURI) ? cwd() : baseURI;\n\n/**\n * @public\n */\n// eslint-disable-next-line import/prefer-default-export\nexport const merge = (lObj, rObj) => {\n const withoutDefaults = mergeDeepRight(lObj, rObj);\n // @ts-ignore\n return over(baseURILens, baseURIDefault, withoutDefaults);\n};","import { ApiDOMError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\nclass PluginError extends ApiDOMError {\n plugin;\n constructor(message, options) {\n super(message, {\n cause: options.cause\n });\n this.plugin = options.plugin;\n }\n}\nexport default PluginError;","import { invokeArgs } from 'ramda-adjunct';\nimport PluginError from \"../errors/PluginError.mjs\";\n/**\n * Filters the given plugins, returning only the ones return `true` for the given method.\n */\nexport const filter = async (method, parameters, plugins) => {\n const pluginResults = await Promise.all(plugins.map(invokeArgs([method], parameters)));\n return plugins.filter((plugin, index) => pluginResults[index]);\n};\n\n/**\n * Runs the specified method of the given plugins, in order,\n * until one of them returns a successful result.\n * Each method can return a synchronous value or a Promise.\n * If the promise resolves successfully then the result\n * is immediately returned and no further plugins are called.\n * If the promise rejects then the next plugin is called.\n * If ALL plugins fail, then the last error is thrown.\n */\nexport const run = async (method, parameters, plugins) => {\n let lastError;\n for (const plugin of plugins) {\n try {\n const result = await plugin[method].call(plugin, ...parameters); // eslint-disable-line no-await-in-loop\n return {\n plugin,\n result\n };\n } catch (error) {\n lastError = new PluginError('Error while running plugin', {\n cause: error,\n plugin\n });\n }\n }\n return Promise.reject(lastError);\n};","import { ApiDOMError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\nclass ParseError extends ApiDOMError {}\nexport default ParseError;","import { ApiDOMError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\nclass ResolveError extends ApiDOMError {}\nexport default ResolveError;","import ResolveError from \"./ResolveError.mjs\";\n/**\n * @public\n */\nclass ResolverError extends ResolveError {}\nexport default ResolverError;","import ResolverError from \"./ResolverError.mjs\";\n/**\n * @public\n */\nclass UnmatchedResolverError extends ResolverError {}\nexport default UnmatchedResolverError;","import { isEmpty } from 'ramda';\nimport * as plugins from \"../util/plugins.mjs\";\nimport ResolveError from \"../errors/ResolveError.mjs\";\nimport UnmatchedResolverError from \"../errors/UnmatchedResolverError.mjs\";\n/**\n * Reads the given file, using the configured resolver plugins.\n */\n// eslint-disable-next-line import/prefer-default-export\nexport const readFile = async (file, options) => {\n const optsBoundResolvers = options.resolve.resolvers.map(resolver => {\n const clonedResolver = Object.create(resolver);\n return Object.assign(clonedResolver, options.resolve.resolverOpts);\n });\n const resolvers = await plugins.filter('canRead', [file, options], optsBoundResolvers);\n\n // we couldn't find any resolver for this File\n if (isEmpty(resolvers)) {\n throw new UnmatchedResolverError(file.uri);\n }\n try {\n const {\n result\n } = await plugins.run('read', [file], resolvers);\n return result;\n } catch (error) {\n throw new ResolveError(`Error while reading file \"${file.uri}\"`, {\n cause: error\n });\n }\n};","import { isEmpty } from 'ramda';\nimport * as url from \"../util/url.mjs\";\nimport File from \"../File.mjs\";\nimport * as plugins from \"../util/plugins.mjs\";\nimport ParseError from \"../errors/ParseError.mjs\";\nimport UnmatchedResolverError from \"../errors/UnmatchedResolverError.mjs\";\nimport { readFile } from \"../resolve/util.mjs\";\n/**\n * Parses the given file's contents, using the configured parser plugins.\n */\nconst parseFile = async (file, options) => {\n const optsBoundParsers = options.parse.parsers.map(parser => {\n const clonedParser = Object.create(parser);\n return Object.assign(clonedParser, options.parse.parserOpts);\n });\n const parsers = await plugins.filter('canParse', [file, options], optsBoundParsers);\n\n // we couldn't find any parser for this File\n if (isEmpty(parsers)) {\n throw new UnmatchedResolverError(file.uri);\n }\n try {\n const {\n plugin,\n result\n } = await plugins.run('parse', [file, options], parsers);\n\n // empty files handling\n if (!plugin.allowEmpty && result.isEmpty) {\n return Promise.reject(new ParseError(`Error while parsing file \"${file.uri}\". File is empty.`));\n }\n return result;\n } catch (error) {\n throw new ParseError(`Error while parsing file \"${file.uri}\"`, {\n cause: error\n });\n }\n};\n\n/**\n * Parses a file into ApiDOM.\n */\nconst parse = async (uri, options) => {\n /**\n * If the path is a filesystem path, then convert it to a URL.\n *\n * NOTE: According to the JSON Reference spec, these should already be URLs,\n * but, in practice, many people use local filesystem paths instead.\n * So we're being generous here and doing the conversion automatically.\n * This is not intended to be a 100% bulletproof solution.\n * If it doesn't work for your use-case, then use a URL instead.\n */\n const file = new File({\n uri: url.sanitize(url.stripHash(uri)),\n mediaType: options.parse.mediaType\n });\n const data = await readFile(file, options);\n return parseFile(new File({\n ...file,\n data\n }), options);\n};\nexport default parse;","import { Element, StringElement, NumberElement, NullElement, BooleanElement, ArrayElement, ObjectElement, MemberElement, LinkElement, RefElement } from 'minim';\nimport { all } from 'ramda';\nimport { included } from 'ramda-adjunct';\nimport AnnotationElement from \"../elements/Annotation.mjs\";\nimport CommentElement from \"../elements/Comment.mjs\";\nimport ParserResultElement from \"../elements/ParseResult.mjs\";\nimport SourceMapElement from \"../elements/SourceMap.mjs\";\nimport createPredicate, { isElementType as isElementTypeHelper } from \"./helpers.mjs\";\n/**\n * @public\n */\nexport const isElement = createPredicate(({\n hasBasicElementProps,\n primitiveEq\n}) => {\n return element => element instanceof Element || hasBasicElementProps(element) && primitiveEq(undefined, element);\n});\n\n/**\n * @public\n */\nexport const isStringElement = createPredicate(({\n hasBasicElementProps,\n primitiveEq\n}) => {\n return element => element instanceof StringElement || hasBasicElementProps(element) && primitiveEq('string', element);\n});\n\n/**\n * @public\n */\nexport const isNumberElement = createPredicate(({\n hasBasicElementProps,\n primitiveEq\n}) => {\n return element => element instanceof NumberElement || hasBasicElementProps(element) && primitiveEq('number', element);\n});\n\n/**\n * @public\n */\nexport const isNullElement = createPredicate(({\n hasBasicElementProps,\n primitiveEq\n}) => {\n return element => element instanceof NullElement || hasBasicElementProps(element) && primitiveEq('null', element);\n});\n\n/**\n * @public\n */\nexport const isBooleanElement = createPredicate(({\n hasBasicElementProps,\n primitiveEq\n}) => {\n return element => element instanceof BooleanElement || hasBasicElementProps(element) && primitiveEq('boolean', element);\n});\n\n/**\n * @public\n */\nexport const isObjectElement = createPredicate(({\n hasBasicElementProps,\n primitiveEq,\n hasMethod\n}) => {\n return element => element instanceof ObjectElement || hasBasicElementProps(element) && primitiveEq('object', element) && hasMethod('keys', element) && hasMethod('values', element) && hasMethod('items', element);\n});\n\n/**\n * @public\n */\nexport const isArrayElement = createPredicate(({\n hasBasicElementProps,\n primitiveEq,\n hasMethod\n}) => {\n return element => element instanceof ArrayElement && !(element instanceof ObjectElement) || hasBasicElementProps(element) && primitiveEq('array', element) && hasMethod('push', element) && hasMethod('unshift', element) && hasMethod('map', element) && hasMethod('reduce', element);\n});\n\n/**\n * @public\n */\nexport const isMemberElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof MemberElement || hasBasicElementProps(element) && isElementType('member', element) && primitiveEq(undefined, element);\n});\n\n/**\n * @public\n */\nexport const isLinkElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LinkElement || hasBasicElementProps(element) && isElementType('link', element) && primitiveEq(undefined, element);\n});\n\n/**\n * @public\n */\nexport const isRefElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof RefElement || hasBasicElementProps(element) && isElementType('ref', element) && primitiveEq(undefined, element);\n});\n\n/**\n * @public\n */\nexport const isAnnotationElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof AnnotationElement || hasBasicElementProps(element) && isElementType('annotation', element) && primitiveEq('array', element);\n});\n\n/**\n * @public\n */\nexport const isCommentElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof CommentElement || hasBasicElementProps(element) && isElementType('comment', element) && primitiveEq('string', element);\n});\n\n/**\n * @public\n */\nexport const isParseResultElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ParserResultElement || hasBasicElementProps(element) && isElementType('parseResult', element) && primitiveEq('array', element);\n});\n\n/**\n * @public\n */\nexport const isSourceMapElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof SourceMapElement || hasBasicElementProps(element) && isElementType('sourceMap', element) && primitiveEq('array', element);\n});\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nexport const isPrimitiveElement = element => {\n return isElementTypeHelper('object', element) || isElementTypeHelper('array', element) || isElementTypeHelper('boolean', element) || isElementTypeHelper('number', element) || isElementTypeHelper('string', element) || isElementTypeHelper('null', element) || isElementTypeHelper('member', element);\n};\n\n/**\n * @public\n */\nexport const hasElementSourceMap = element => {\n return isSourceMapElement(element.meta.get('sourceMap'));\n};\n\n/**\n * @public\n */\nexport const includesSymbols = (symbols, element) => {\n if (symbols.length === 0) {\n return true;\n }\n const elementSymbols = element.attributes.get('symbols');\n if (!isArrayElement(elementSymbols)) {\n return false;\n }\n return all(included(elementSymbols.toValue()), symbols);\n};\n\n/**\n * @public\n */\nexport const includesClasses = (classes, element) => {\n if (classes.length === 0) {\n return true;\n }\n return all(included(element.classes.toValue()), classes);\n};","import { StringElement } from 'minim';\n\n/**\n * @public\n */\nclass Annotation extends StringElement {\n // classes: warning | error\n\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'annotation';\n }\n get code() {\n return this.attributes.get('code');\n }\n set code(value) {\n this.attributes.set('code', value);\n }\n}\nexport default Annotation;","import { StringElement } from 'minim';\n\n/**\n * @public\n */\nclass Comment extends StringElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'comment';\n }\n}\nexport default Comment;","import { ArrayElement } from 'minim';\nimport { isUndefined } from 'ramda-adjunct';\n\n/**\n * @public\n */\nclass ParseResult extends ArrayElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'parseResult';\n }\n get api() {\n return this.children.filter(item => item.classes.contains('api')).first;\n }\n get results() {\n return this.children.filter(item => item.classes.contains('result'));\n }\n get result() {\n return this.results.first;\n }\n get annotations() {\n return this.children.filter(item => item.element === 'annotation');\n }\n get warnings() {\n return this.children.filter(item => item.element === 'annotation' && item.classes.contains('warning'));\n }\n get errors() {\n return this.children.filter(item => item.element === 'annotation' && item.classes.contains('error'));\n }\n get isEmpty() {\n return this.children.reject(item => item.element === 'annotation').isEmpty;\n }\n replaceResult(replacement) {\n const {\n result\n } = this;\n if (isUndefined(result)) {\n return false;\n }\n\n // @ts-ignore\n const searchIndex = this.content.findIndex(e => e === result);\n if (searchIndex === -1) {\n return false;\n }\n this.content[searchIndex] = replacement;\n return true;\n }\n}\nexport default ParseResult;","import { ArrayElement } from 'minim';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass SourceMap extends ArrayElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'sourceMap';\n }\n get positionStart() {\n return this.children.filter(item => item.classes.contains('position')).get(0);\n }\n get positionEnd() {\n return this.children.filter(item => item.classes.contains('position')).get(1);\n }\n set position(position) {\n if (typeof position === 'undefined') {\n return;\n }\n const start = new ArrayElement([position.start.row, position.start.column, position.start.char]);\n const end = new ArrayElement([position.end.row, position.end.column, position.end.char]);\n start.classes.push('position');\n end.classes.push('position');\n this.push(start).push(end);\n }\n}\nexport default SourceMap;","import { ArrayElement } from 'minim';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nexport const hasMethod = (name, element) => {\n return typeof element === 'object' && element !== null && name in element && typeof element[name] === 'function';\n};\n\n/**\n * @public\n */\nexport const hasBasicElementProps = element => typeof element === 'object' && element != null && '_storedElement' in element && typeof element._storedElement === 'string' &&\n// eslint-disable-line no-underscore-dangle\n'_content' in element;\n\n/**\n * @public\n */\nexport const primitiveEq = (val, element) => {\n if (typeof element === 'object' && element !== null && 'primitive' in element) {\n return typeof element.primitive === 'function' && element.primitive() === val;\n }\n return false;\n};\n\n/**\n * @public\n */\nexport const hasClass = (cls, element) => {\n return typeof element === 'object' && element !== null && 'classes' in element && (Array.isArray(element.classes) || element.classes instanceof ArrayElement) && element.classes.includes(cls);\n};\n\n/**\n * @public\n */\nexport const isElementType = (name, element) => typeof element === 'object' && element !== null && 'element' in element && element.element === name;\n\n/**\n * @public\n */\nconst createPredicate = predicateCreator => {\n return predicateCreator({\n hasMethod,\n hasBasicElementProps,\n primitiveEq,\n isElementType,\n hasClass\n });\n};\nexport default createPredicate;","import { Namespace as MinimNamespace } from 'minim';\nimport { isPlainObject } from 'ramda-adjunct';\nimport AnnotationElement from \"./elements/Annotation.mjs\";\nimport CommentElement from \"./elements/Comment.mjs\";\nimport ParseResultElement from \"./elements/ParseResult.mjs\";\nimport SourceMapElement from \"./elements/SourceMap.mjs\";\n/**\n * @public\n */\nexport class Namespace extends MinimNamespace {\n constructor() {\n super();\n this.register('annotation', AnnotationElement);\n this.register('comment', CommentElement);\n this.register('parseResult', ParseResultElement);\n this.register('sourceMap', SourceMapElement);\n }\n}\n\n/**\n * @public\n */\nconst namespace = new Namespace();\n\n/**\n * @public\n */\nexport const createNamespace = namespacePlugin => {\n const namespaceInstance = new Namespace();\n if (isPlainObject(namespacePlugin)) {\n namespaceInstance.use(namespacePlugin);\n }\n return namespaceInstance;\n};\nexport default namespace;","import * as basePredicates from \"../predicates/index.mjs\";\nimport defaultNamespaceInstance from \"../namespace.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nconst createToolbox = () => {\n const predicates = {\n ...basePredicates\n };\n return {\n predicates,\n namespace: defaultNamespaceInstance\n };\n};\nexport default createToolbox;","import { ApiDOMStructuredError } from '@swagger-api/apidom-error';\n\n/**\n * SPDX-FileCopyrightText: Copyright (c) GraphQL Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * @public\n */\nexport const getVisitFn = (visitor, type, isLeaving) => {\n // @ts-ignore\n const typeVisitor = visitor[type];\n if (typeVisitor != null) {\n if (!isLeaving && typeof typeVisitor === 'function') {\n // { Type() {} }\n return typeVisitor;\n }\n const typeSpecificVisitor = isLeaving ? typeVisitor.leave : typeVisitor.enter;\n if (typeof typeSpecificVisitor === 'function') {\n // { Type: { enter() {}, leave() {} } }\n return typeSpecificVisitor;\n }\n } else {\n const specificVisitor = isLeaving ? visitor.leave : visitor.enter;\n if (specificVisitor != null) {\n if (typeof specificVisitor === 'function') {\n // { enter() {}, leave() {} }\n return specificVisitor;\n }\n // @ts-ignore\n const specificTypeVisitor = specificVisitor[type];\n if (typeof specificTypeVisitor === 'function') {\n // { enter: { Type() {} }, leave: { Type() {} } }\n return specificTypeVisitor;\n }\n }\n }\n return null;\n};\n\n/**\n * @public\n */\nexport const BREAK = {};\n\n/**\n * @public\n */\nexport const getNodeType = node => node === null || node === void 0 ? void 0 : node.type;\n\n/**\n * @public\n */\nexport const isNode = node => typeof getNodeType(node) === 'string';\n\n/**\n * @public\n */\nexport const cloneNode = node => Object.create(Object.getPrototypeOf(node), Object.getOwnPropertyDescriptors(node));\n\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n * `exposeEdits=true` can be used to expose the edited node from the previous visitors.\n * @public\n */\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nexport const mergeAll = (visitors, {\n visitFnGetter = getVisitFn,\n nodeTypeGetter = getNodeType,\n breakSymbol = BREAK,\n deleteNodeSymbol = null,\n skipVisitingNodeSymbol = false,\n exposeEdits = false\n} = {}) => {\n const skipSymbol = Symbol('skip');\n const skipping = new Array(visitors.length).fill(skipSymbol);\n return {\n enter(node, key, parent, path, ancestors, link) {\n let currentNode = node;\n let hasChanged = false;\n const linkProxy = {\n ...link,\n replaceWith(newNode, replacer) {\n link.replaceWith(newNode, replacer);\n currentNode = newNode;\n }\n };\n for (let i = 0; i < visitors.length; i += 1) {\n if (skipping[i] === skipSymbol) {\n const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), false);\n if (typeof visitFn === 'function') {\n const result = visitFn.call(visitors[i], currentNode, key, parent, path, ancestors, linkProxy);\n\n // check if the visitor is async\n if (typeof (result === null || result === void 0 ? void 0 : result.then) === 'function') {\n throw new ApiDOMStructuredError('Async visitor not supported in sync mode', {\n visitor: visitors[i],\n visitFn\n });\n }\n if (result === skipVisitingNodeSymbol) {\n skipping[i] = currentNode;\n } else if (result === breakSymbol) {\n skipping[i] = breakSymbol;\n } else if (result === deleteNodeSymbol) {\n return result;\n } else if (result !== undefined) {\n if (exposeEdits) {\n currentNode = result;\n hasChanged = true;\n } else {\n return result;\n }\n }\n }\n }\n }\n return hasChanged ? currentNode : undefined;\n },\n leave(node, key, parent, path, ancestors, link) {\n let currentNode = node;\n const linkProxy = {\n ...link,\n replaceWith(newNode, replacer) {\n link.replaceWith(newNode, replacer);\n currentNode = newNode;\n }\n };\n for (let i = 0; i < visitors.length; i += 1) {\n if (skipping[i] === skipSymbol) {\n const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), true);\n if (typeof visitFn === 'function') {\n const result = visitFn.call(visitors[i], currentNode, key, parent, path, ancestors, linkProxy);\n\n // check if the visitor is async\n if (typeof (result === null || result === void 0 ? void 0 : result.then) === 'function') {\n throw new ApiDOMStructuredError('Async visitor not supported in sync mode', {\n visitor: visitors[i],\n visitFn\n });\n }\n if (result === breakSymbol) {\n skipping[i] = breakSymbol;\n } else if (result !== undefined && result !== skipVisitingNodeSymbol) {\n return result;\n }\n }\n } else if (skipping[i] === currentNode) {\n skipping[i] = skipSymbol;\n }\n }\n return undefined;\n }\n };\n};\nconst mergeAllAsync = (visitors, {\n visitFnGetter = getVisitFn,\n nodeTypeGetter = getNodeType,\n breakSymbol = BREAK,\n deleteNodeSymbol = null,\n skipVisitingNodeSymbol = false,\n exposeEdits = false\n} = {}) => {\n const skipSymbol = Symbol('skip');\n const skipping = new Array(visitors.length).fill(skipSymbol);\n return {\n async enter(node, key, parent, path, ancestors, link) {\n let currentNode = node;\n let hasChanged = false;\n const linkProxy = {\n ...link,\n replaceWith(newNode, replacer) {\n link.replaceWith(newNode, replacer);\n currentNode = newNode;\n }\n };\n for (let i = 0; i < visitors.length; i += 1) {\n if (skipping[i] === skipSymbol) {\n const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), false);\n if (typeof visitFn === 'function') {\n // eslint-disable-next-line no-await-in-loop\n const result = await visitFn.call(visitors[i], currentNode, key, parent, path, ancestors, linkProxy);\n if (result === skipVisitingNodeSymbol) {\n skipping[i] = currentNode;\n } else if (result === breakSymbol) {\n skipping[i] = breakSymbol;\n } else if (result === deleteNodeSymbol) {\n return result;\n } else if (result !== undefined) {\n if (exposeEdits) {\n currentNode = result;\n hasChanged = true;\n } else {\n return result;\n }\n }\n }\n }\n }\n return hasChanged ? currentNode : undefined;\n },\n async leave(node, key, parent, path, ancestors, link) {\n let currentNode = node;\n const linkProxy = {\n ...link,\n replaceWith(newNode, replacer) {\n link.replaceWith(newNode, replacer);\n currentNode = newNode;\n }\n };\n for (let i = 0; i < visitors.length; i += 1) {\n if (skipping[i] === skipSymbol) {\n const visitFn = visitFnGetter(visitors[i], nodeTypeGetter(currentNode), true);\n if (typeof visitFn === 'function') {\n // eslint-disable-next-line no-await-in-loop\n const result = await visitFn.call(visitors[i], currentNode, key, parent, path, ancestors, linkProxy);\n if (result === breakSymbol) {\n skipping[i] = breakSymbol;\n } else if (result !== undefined && result !== skipVisitingNodeSymbol) {\n return result;\n }\n }\n } else if (skipping[i] === currentNode) {\n skipping[i] = skipSymbol;\n }\n }\n return undefined;\n }\n };\n};\nmergeAll[Symbol.for('nodejs.util.promisify.custom')] = mergeAllAsync;\n\n/* eslint-disable no-continue, no-param-reassign */\n/**\n * visit() will walk through an AST using a preorder depth first traversal, calling\n * the visitor's enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * @example\n * ```\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // return\n * // undefined: no action\n * // false: skip visiting this node\n * // BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // return\n * // undefined: no action\n * // false: no action\n * // BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n *```\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to four permutations of\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node a specific kind.\n * ```\n * visit(ast, {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * })\n * ```\n * 2) Named visitors that trigger upon entering and leaving a node of\n * a specific kind.\n * ```\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the \"Kind\" node\n * }\n * leave(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n * ```\n * 3) Generic visitors that trigger upon entering and leaving any node.\n * ```\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n * ```\n * 4) Parallel visitors for entering and leaving nodes of a specific kind.\n * ```\n * visit(ast, {\n * enter: {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * },\n * leave: {\n * Kind(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n * ```\n * sig `visit :: (Node, Visitor, Options)`\n *\n * sig `Options = { keyMap: Object, state: Object }`\n *\n * @public\n */\nexport const visit = (\n// @ts-ignore\nroot,\n// @ts-ignore\nvisitor, {\n keyMap = null,\n state = {},\n breakSymbol = BREAK,\n deleteNodeSymbol = null,\n skipVisitingNodeSymbol = false,\n visitFnGetter = getVisitFn,\n nodeTypeGetter = getNodeType,\n nodePredicate = isNode,\n nodeCloneFn = cloneNode,\n detectCycles = true\n} = {}) => {\n const visitorKeys = keyMap || {};\n let stack;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let parent;\n let edits = [];\n let node = root;\n const path = [];\n // @ts-ignore\n const ancestors = [];\n do {\n index += 1;\n const isLeaving = index === keys.length;\n let key;\n const isEdited = isLeaving && edits.length !== 0;\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path.pop();\n node = parent;\n // @ts-ignore\n parent = ancestors.pop();\n if (isEdited) {\n if (inArray) {\n // @ts-ignore; creating clone\n node = node.slice();\n let editOffset = 0;\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n if (editValue === deleteNodeSymbol) {\n node.splice(arrayKey, 1);\n editOffset += 1;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n // creating clone\n node = nodeCloneFn(node);\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n index = stack.index;\n keys = stack.keys;\n // @ts-ignore\n edits = stack.edits;\n // @ts-ignore\n inArray = stack.inArray;\n // @ts-ignore\n stack = stack.prev;\n } else if (parent !== deleteNodeSymbol && parent !== undefined) {\n key = inArray ? index : keys[index];\n node = parent[key];\n if (node === deleteNodeSymbol || node === undefined) {\n continue;\n }\n path.push(key);\n }\n let result;\n if (!Array.isArray(node)) {\n var _result;\n if (!nodePredicate(node)) {\n throw new ApiDOMStructuredError(`Invalid AST Node: ${String(node)}`, {\n node\n });\n }\n\n // cycle detected; skipping over a sub-tree to avoid recursion\n if (detectCycles && ancestors.includes(node)) {\n path.pop();\n continue;\n }\n // call appropriate visitor function if available\n const visitFn = visitFnGetter(visitor, nodeTypeGetter(node), isLeaving);\n if (visitFn) {\n // assign state\n for (const [stateKey, stateValue] of Object.entries(state)) {\n visitor[stateKey] = stateValue;\n }\n const link = {\n // eslint-disable-next-line @typescript-eslint/no-loop-func\n replaceWith(newNode, replacer) {\n if (typeof replacer === 'function') {\n replacer(newNode, node, key, parent, path, ancestors);\n } else if (parent) {\n parent[key] = newNode;\n }\n if (!isLeaving) {\n node = newNode;\n }\n }\n };\n\n // retrieve result\n result = visitFn.call(visitor, node, key, parent, path, ancestors, link);\n }\n\n // check if the visitor is async\n if (typeof ((_result = result) === null || _result === void 0 ? void 0 : _result.then) === 'function') {\n throw new ApiDOMStructuredError('Async visitor not supported in sync mode', {\n visitor,\n visitFn\n });\n }\n if (result === breakSymbol) {\n break;\n }\n if (result === skipVisitingNodeSymbol) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n if (!isLeaving) {\n if (nodePredicate(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n if (!isLeaving) {\n var _visitorKeys$nodeType;\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack\n };\n inArray = Array.isArray(node);\n // @ts-ignore\n keys = inArray ? node : (_visitorKeys$nodeType = visitorKeys[nodeTypeGetter(node)]) !== null && _visitorKeys$nodeType !== void 0 ? _visitorKeys$nodeType : [];\n index = -1;\n edits = [];\n if (parent !== deleteNodeSymbol && parent !== undefined) {\n ancestors.push(parent);\n }\n parent = node;\n }\n } while (stack !== undefined);\n if (edits.length !== 0) {\n return edits[edits.length - 1][1]; // @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.at in future\n }\n return root;\n};\n\n/**\n * Asynchronous version of visit.\n */\n// @ts-ignore\nvisit[Symbol.for('nodejs.util.promisify.custom')] = async (\n// @ts-ignore\nroot,\n// @ts-ignore\nvisitor, {\n keyMap = null,\n state = {},\n breakSymbol = BREAK,\n deleteNodeSymbol = null,\n skipVisitingNodeSymbol = false,\n visitFnGetter = getVisitFn,\n nodeTypeGetter = getNodeType,\n nodePredicate = isNode,\n nodeCloneFn = cloneNode,\n detectCycles = true\n} = {}) => {\n const visitorKeys = keyMap || {};\n let stack;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let parent;\n let edits = [];\n let node = root;\n const path = [];\n // @ts-ignore\n const ancestors = [];\n do {\n index += 1;\n const isLeaving = index === keys.length;\n let key;\n const isEdited = isLeaving && edits.length !== 0;\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path.pop();\n node = parent;\n // @ts-ignore\n parent = ancestors.pop();\n if (isEdited) {\n if (inArray) {\n // @ts-ignore; creating clone\n node = node.slice();\n let editOffset = 0;\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n if (editValue === deleteNodeSymbol) {\n node.splice(arrayKey, 1);\n editOffset += 1;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n // creating clone\n node = nodeCloneFn(node);\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n index = stack.index;\n keys = stack.keys;\n // @ts-ignore\n edits = stack.edits;\n // @ts-ignore\n inArray = stack.inArray;\n // @ts-ignore\n stack = stack.prev;\n } else if (parent !== deleteNodeSymbol && parent !== undefined) {\n key = inArray ? index : keys[index];\n node = parent[key];\n if (node === deleteNodeSymbol || node === undefined) {\n continue;\n }\n path.push(key);\n }\n let result;\n if (!Array.isArray(node)) {\n if (!nodePredicate(node)) {\n throw new ApiDOMStructuredError(`Invalid AST Node: ${String(node)}`, {\n node\n });\n }\n\n // cycle detected; skipping over a sub-tree to avoid recursion\n if (detectCycles && ancestors.includes(node)) {\n path.pop();\n continue;\n }\n const visitFn = visitFnGetter(visitor, nodeTypeGetter(node), isLeaving);\n if (visitFn) {\n // assign state\n for (const [stateKey, stateValue] of Object.entries(state)) {\n visitor[stateKey] = stateValue;\n }\n const link = {\n // eslint-disable-next-line @typescript-eslint/no-loop-func\n replaceWith(newNode, replacer) {\n if (typeof replacer === 'function') {\n replacer(newNode, node, key, parent, path, ancestors);\n } else if (parent) {\n parent[key] = newNode;\n }\n if (!isLeaving) {\n node = newNode;\n }\n }\n };\n\n // retrieve result\n result = await visitFn.call(visitor, node, key, parent, path, ancestors, link); // eslint-disable-line no-await-in-loop\n }\n if (result === breakSymbol) {\n break;\n }\n if (result === skipVisitingNodeSymbol) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n if (!isLeaving) {\n if (nodePredicate(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n if (!isLeaving) {\n var _visitorKeys$nodeType2;\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack\n };\n inArray = Array.isArray(node);\n // @ts-ignore\n keys = inArray ? node : (_visitorKeys$nodeType2 = visitorKeys[nodeTypeGetter(node)]) !== null && _visitorKeys$nodeType2 !== void 0 ? _visitorKeys$nodeType2 : [];\n index = -1;\n edits = [];\n if (parent !== deleteNodeSymbol && parent !== undefined) {\n ancestors.push(parent);\n }\n parent = node;\n }\n } while (stack !== undefined);\n if (edits.length !== 0) {\n return edits[edits.length - 1][1]; // @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.at in future\n }\n return root;\n};\n\n/* eslint-enable */","import { ArraySlice, ObjectSlice, KeyValuePair } from 'minim';\nimport { isElement } from \"../predicates/index.mjs\";\nimport DeepCloneError from \"./errors/DeepCloneError.mjs\";\nimport ShallowCloneError from \"./errors/ShallowCloneError.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nexport const cloneDeep = (value, options = {}) => {\n const {\n visited = new WeakMap()\n } = options;\n const passThroughOptions = {\n ...options,\n visited\n };\n\n // detect cycle and return memoized value\n if (visited.has(value)) {\n return visited.get(value);\n }\n if (value instanceof KeyValuePair) {\n const {\n key,\n value: val\n } = value;\n const keyCopy = isElement(key) ? cloneDeep(key, passThroughOptions) : key;\n const valueCopy = isElement(val) ? cloneDeep(val, passThroughOptions) : val;\n const copy = new KeyValuePair(keyCopy, valueCopy);\n visited.set(value, copy);\n return copy;\n }\n if (value instanceof ObjectSlice) {\n const mapper = element => cloneDeep(element, passThroughOptions);\n const items = [...value].map(mapper);\n const copy = new ObjectSlice(items);\n visited.set(value, copy);\n return copy;\n }\n if (value instanceof ArraySlice) {\n const mapper = element => cloneDeep(element, passThroughOptions);\n const items = [...value].map(mapper);\n const copy = new ArraySlice(items);\n visited.set(value, copy);\n return copy;\n }\n if (isElement(value)) {\n const copy = cloneShallow(value); // eslint-disable-line @typescript-eslint/no-use-before-define\n\n visited.set(value, copy);\n if (value.content) {\n if (isElement(value.content)) {\n copy.content = cloneDeep(value.content, passThroughOptions);\n } else if (value.content instanceof KeyValuePair) {\n copy.content = cloneDeep(value.content, passThroughOptions);\n } else if (Array.isArray(value.content)) {\n const mapper = element => cloneDeep(element, passThroughOptions);\n copy.content = value.content.map(mapper);\n } else {\n copy.content = value.content;\n }\n } else {\n copy.content = value.content;\n }\n return copy;\n }\n throw new DeepCloneError(\"Value provided to cloneDeep function couldn't be cloned\", {\n value\n });\n};\ncloneDeep.safe = value => {\n try {\n return cloneDeep(value);\n } catch {\n return value;\n }\n};\nconst cloneShallowKeyValuePair = keyValuePair => {\n const {\n key,\n value\n } = keyValuePair;\n return new KeyValuePair(key, value);\n};\nconst cloneShallowArraySlice = arraySlice => {\n const items = [...arraySlice];\n return new ArraySlice(items);\n};\nconst cloneShallowObjectSlice = objectSlice => {\n const items = [...objectSlice];\n return new ObjectSlice(items);\n};\n\n/* eslint-disable no-underscore-dangle */\nconst cloneShallowElement = element => {\n // @ts-ignore\n const copy = new element.constructor();\n copy.element = element.element;\n if (element.meta.length > 0) {\n copy._meta = cloneDeep(element.meta);\n }\n if (element.attributes.length > 0) {\n copy._attributes = cloneDeep(element.attributes);\n }\n if (isElement(element.content)) {\n const content = element.content;\n copy.content = cloneShallowElement(content);\n } else if (Array.isArray(element.content)) {\n copy.content = [...element.content];\n } else if (element.content instanceof KeyValuePair) {\n copy.content = cloneShallowKeyValuePair(element.content);\n } else {\n copy.content = element.content;\n }\n return copy;\n};\n/* eslint-enable */\n\n/**\n * @public\n */\nexport const cloneShallow = value => {\n if (value instanceof KeyValuePair) {\n return cloneShallowKeyValuePair(value);\n }\n if (value instanceof ObjectSlice) {\n return cloneShallowObjectSlice(value);\n }\n if (value instanceof ArraySlice) {\n return cloneShallowArraySlice(value);\n }\n if (isElement(value)) {\n return cloneShallowElement(value);\n }\n throw new ShallowCloneError(\"Value provided to cloneShallow function couldn't be cloned\", {\n value\n });\n};\ncloneShallow.safe = value => {\n try {\n return cloneShallow(value);\n } catch {\n return value;\n }\n};","import { ApiDOMStructuredError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass CloneError extends ApiDOMStructuredError {\n value;\n constructor(message, structuredOptions) {\n super(message, structuredOptions);\n if (typeof structuredOptions !== 'undefined') {\n this.value = structuredOptions.value;\n }\n }\n}\nexport default CloneError;","import CloneError from \"./CloneError.mjs\";\n/**\n * @public\n */\nclass DeepCloneError extends CloneError {}\nexport default DeepCloneError;","import CloneError from \"./CloneError.mjs\";\n/**\n * @public\n */\nclass ShallowCloneError extends CloneError {}\nexport default ShallowCloneError;","import { F as stubFalse, pipe } from 'ramda';\nimport { isString } from 'ramda-adjunct';\nimport { visit as astVisit, BREAK, mergeAllVisitors, cloneNode as cloneNodeDefault } from '@swagger-api/apidom-ast';\nimport { isElement, isMemberElement, isArrayElement, isStringElement, isBooleanElement, isLinkElement, isRefElement, isObjectElement, isNullElement, isNumberElement } from \"../predicates/index.mjs\";\nimport { cloneShallow } from \"../clone/index.mjs\";\nexport { BREAK, mergeAllVisitors };\n\n/**\n * @public\n */\nexport const getNodeType = element => {\n /*\n * We're translating every possible higher element type to primitive minim type here.\n * We're using polymorphism to recognize any higher element type as ObjectElement or ArrayElement.\n * Using polymorphism allows us to assume any namespace.\n *\n * There is a problem with naming visitor methods described here: https://github.com/babel/babel/discussions/12874\n */\n return isObjectElement(element) ? 'ObjectElement' : isArrayElement(element) ? 'ArrayElement' : isMemberElement(element) ? 'MemberElement' : isStringElement(element) ? 'StringElement' : isBooleanElement(element) ? 'BooleanElement' : isNumberElement(element) ? 'NumberElement' : isNullElement(element) ? 'NullElement' : isLinkElement(element) ? 'LinkElement' : isRefElement(element) ? 'RefElement' : undefined;\n};\n\n/**\n * @public\n */\nexport const cloneNode = node => {\n if (isElement(node)) {\n return cloneShallow(node);\n }\n return cloneNodeDefault(node);\n};\n\n// isNode :: Node -> Boolean\nexport const isNode = pipe(getNodeType, isString);\n\n/**\n * @public\n */\nexport const keyMapDefault = {\n ObjectElement: ['content'],\n ArrayElement: ['content'],\n MemberElement: ['key', 'value'],\n StringElement: [],\n BooleanElement: [],\n NumberElement: [],\n NullElement: [],\n RefElement: [],\n LinkElement: [],\n Annotation: [],\n Comment: [],\n ParseResultElement: ['content'],\n SourceMap: ['content']\n};\nexport class PredicateVisitor {\n result;\n predicate;\n returnOnTrue;\n returnOnFalse;\n constructor({\n predicate = stubFalse,\n returnOnTrue,\n returnOnFalse\n } = {}) {\n this.result = [];\n this.predicate = predicate;\n this.returnOnTrue = returnOnTrue;\n this.returnOnFalse = returnOnFalse;\n }\n enter(element) {\n if (this.predicate(element)) {\n this.result.push(element);\n return this.returnOnTrue;\n }\n return this.returnOnFalse;\n }\n}\n\n/**\n * @public\n */\nexport const visit = (root,\n// @ts-ignore\nvisitor, {\n keyMap = keyMapDefault,\n ...rest\n} = {}) => {\n // @ts-ignore\n return astVisit(root, visitor, {\n // @ts-ignore\n keyMap,\n // @ts-ignore\n nodeTypeGetter: getNodeType,\n nodePredicate: isNode,\n nodeCloneFn: cloneNode,\n ...rest\n });\n};\n\n// @ts-ignore\nvisit[Symbol.for('nodejs.util.promisify.custom')] = async (root,\n// @ts-ignore\nvisitor, {\n keyMap = keyMapDefault,\n ...rest\n} = {}) => {\n // @ts-ignore\n return astVisit[Symbol.for('nodejs.util.promisify.custom')](root, visitor, {\n // @ts-ignore\n keyMap,\n // @ts-ignore\n nodeTypeGetter: getNodeType,\n nodePredicate: isNode,\n nodeCloneFn: cloneNode,\n ...rest\n });\n};","import { mergeDeepRight, propOr } from 'ramda';\nimport { invokeArgs } from 'ramda-adjunct';\nimport createToolbox from \"../../toolbox.mjs\";\nimport { getNodeType, mergeAllVisitors, visit } from \"../../../traversal/visitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nconst defaultDispatchPluginsOptions = {\n toolboxCreator: createToolbox,\n visitorOptions: {\n nodeTypeGetter: getNodeType,\n exposeEdits: true\n }\n};\n\n/**\n * @public\n */\nexport const dispatchPluginsSync = (element, plugins, options = {}) => {\n if (plugins.length === 0) return element;\n const mergedOptions = mergeDeepRight(defaultDispatchPluginsOptions, options);\n const {\n toolboxCreator,\n visitorOptions\n } = mergedOptions;\n const toolbox = toolboxCreator();\n const pluginsSpecs = plugins.map(plugin => plugin(toolbox));\n const mergedPluginsVisitor = mergeAllVisitors(pluginsSpecs.map(propOr({}, 'visitor')), {\n ...visitorOptions\n });\n pluginsSpecs.forEach(invokeArgs(['pre'], []));\n const newElement = visit(element, mergedPluginsVisitor, visitorOptions);\n pluginsSpecs.forEach(invokeArgs(['post'], []));\n return newElement;\n};\nexport const dispatchPluginsAsync = async (element, plugins, options = {}) => {\n if (plugins.length === 0) return element;\n const mergedOptions = mergeDeepRight(defaultDispatchPluginsOptions, options);\n const {\n toolboxCreator,\n visitorOptions\n } = mergedOptions;\n const toolbox = toolboxCreator();\n const pluginsSpecs = plugins.map(plugin => plugin(toolbox));\n const mergeAllVisitorsAsync = mergeAllVisitors[Symbol.for('nodejs.util.promisify.custom')];\n const visitAsync = visit[Symbol.for('nodejs.util.promisify.custom')];\n const mergedPluginsVisitor = mergeAllVisitorsAsync(pluginsSpecs.map(propOr({}, 'visitor')), {\n ...visitorOptions\n });\n await Promise.allSettled(pluginsSpecs.map(invokeArgs(['pre'], [])));\n const newElement = await visitAsync(element, mergedPluginsVisitor, visitorOptions);\n await Promise.allSettled(pluginsSpecs.map(invokeArgs(['post'], [])));\n return newElement;\n};\ndispatchPluginsSync[Symbol.for('nodejs.util.promisify.custom')] = dispatchPluginsAsync;","import { StringElement } from 'minim';\nimport ShortUniqueId from 'short-unique-id';\nimport ElementIdentityError from \"./errors/ElementIdentityError.mjs\";\nimport { isElement, isStringElement } from \"../predicates/index.mjs\";\n/**\n * @public\n */\nexport class IdentityManager {\n uuid;\n identityMap;\n constructor({\n length = 6\n } = {}) {\n this.uuid = new ShortUniqueId({\n length\n });\n this.identityMap = new WeakMap();\n }\n identify(element) {\n if (!isElement(element)) {\n throw new ElementIdentityError('Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.', {\n value: element\n });\n }\n\n // use already assigned identity\n if (element.meta.hasKey('id') && isStringElement(element.meta.get('id')) && !element.meta.get('id').equals('')) {\n return element.id;\n }\n\n // assign identity in immutable way\n if (this.identityMap.has(element)) {\n return this.identityMap.get(element);\n }\n\n // return element identity\n const id = new StringElement(this.generateId());\n this.identityMap.set(element, id);\n return id;\n }\n forget(element) {\n if (this.identityMap.has(element)) {\n this.identityMap.delete(element);\n return true;\n }\n return false;\n }\n generateId() {\n return this.uuid.randomUUID();\n }\n}\n\n/**\n * @public\n */\nexport const defaultIdentityManager = new IdentityManager();","import { ApiDOMStructuredError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass ElementIdentityError extends ApiDOMStructuredError {\n value;\n constructor(message, structuredOptions) {\n super(message, structuredOptions);\n if (typeof structuredOptions !== 'undefined') {\n this.value = structuredOptions.value;\n }\n }\n}\nexport default ElementIdentityError;","import { NotImplementedError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\nclass MediaTypes extends Array {\n unknownMediaType = 'application/octet-stream';\n\n // eslint-disable-next-line class-methods-use-this\n filterByFormat() {\n throw new NotImplementedError('filterByFormat method in MediaTypes class is not yet implemented.');\n }\n\n // eslint-disable-next-line class-methods-use-this\n findBy() {\n throw new NotImplementedError('findBy method in MediaTypes class is not yet implemented.');\n }\n\n // eslint-disable-next-line class-methods-use-this\n latest() {\n throw new NotImplementedError('latest method in MediaTypes class is not yet implemented.');\n }\n}\nexport default MediaTypes;","export { dispatchPluginsSync as dispatchRefractorPlugins } from \"./refractor/plugins/dispatcher/index.mjs\";\nexport { default as refractorPluginElementIdentity } from \"./refractor/plugins/element-identity.mjs\";\nexport { default as refractorPluginSemanticElementIdentity } from \"./refractor/plugins/semantic-element-identity.mjs\";\nexport { default as MediaTypes } from \"./media-types.mjs\";\nexport { Element, MemberElement, KeyValuePair, ObjectSlice, ArraySlice, refract } from 'minim';\nexport { default as namespace, Namespace, createNamespace } from \"./namespace.mjs\";\nexport { ObjectElement, ArrayElement, BooleanElement, NullElement, NumberElement, StringElement, LinkElement, RefElement, AnnotationElement, CommentElement, ParseResultElement, SourceMapElement } from \"./refractor/registration.mjs\";\nexport { isElement, isStringElement, isNumberElement, isNullElement, isBooleanElement, isArrayElement, isObjectElement, isMemberElement, isLinkElement, isRefElement, isAnnotationElement, isParseResultElement, isSourceMapElement, isPrimitiveElement, hasElementSourceMap, includesSymbols, includesClasses } from \"./predicates/index.mjs\";\nexport { default as createPredicate } from \"./predicates/helpers.mjs\";\nexport { filter, reject, find, findAtOffset, some, traverse, parents } from \"./traversal/index.mjs\";\nexport { visit, BREAK, mergeAllVisitors, getNodeType, cloneNode, keyMapDefault as keyMap } from \"./traversal/visitor.mjs\";\nexport { transclude, default as Transcluder } from \"./transcluder/index.mjs\";\nexport { dereference } from \"./util.mjs\";\nexport { cloneShallow, cloneDeep } from \"./clone/index.mjs\";\nexport { default as CloneError } from \"./clone/errors/CloneError.mjs\";\nexport { default as DeepCloneError } from \"./clone/errors/DeepCloneError.mjs\";\nexport { default as ShallowCloneError } from \"./clone/errors/ShallowCloneError.mjs\";\nexport { defaultIdentityManager, IdentityManager } from \"./identity/index.mjs\";\nexport { default as ElementIdentityError } from \"./identity/errors/ElementIdentityError.mjs\";\n/**\n * Transforms data to an Element from a particular namespace.\n */\nexport { default as from } from \"./transformers/from.mjs\";\n/**\n * Transforms the ApiDOM into JavaScript POJO.\n * This POJO would be the result of interpreting the ApiDOM\n * into JavaScript structure.\n */\nexport { default as toValue } from \"./transformers/serializers/value/index.mjs\";\n/**\n * Transforms the ApiDOM into JSON string.\n */\nexport { default as toJSON } from \"./transformers/serializers/json.mjs\";\n/**\n * Transforms the ApiDOM into YAML string.\n */\nexport { default as toYAML } from \"./transformers/serializers/yaml-1-2.mjs\";\n/**\n * Creates a refract representation of an Element.\n * https://github.com/refractproject/refract-spec\n */\nexport { default as dehydrate } from \"./transformers/dehydrate.mjs\";\n/**\n * Create a refracted string representation of an Element.\n */\nexport { default as toString } from \"./transformers/to-string.mjs\";\nexport { default as sexprs } from \"./transformers/sexprs.mjs\";\nexport { default as deepmerge } from \"./merge/deepmerge.mjs\";\nexport { default as mergeRight } from \"./merge/merge-right.mjs\";\nexport { default as mergeLeft } from \"./merge/merge-left.mjs\";","import { ObjectElement, ArrayElement, StringElement, BooleanElement, NullElement, NumberElement, LinkElement, RefElement } from 'minim';\nimport AnnotationElement from \"../elements/Annotation.mjs\";\nimport CommentElement from \"../elements/Comment.mjs\";\nimport ParseResultElement from \"../elements/ParseResult.mjs\";\nimport SourceMapElement from \"../elements/SourceMap.mjs\";\nimport { createRefractor } from \"./index.mjs\";\nObjectElement.refract = createRefractor(ObjectElement);\nArrayElement.refract = createRefractor(ArrayElement);\nStringElement.refract = createRefractor(StringElement);\nBooleanElement.refract = createRefractor(BooleanElement);\nNullElement.refract = createRefractor(NullElement);\nNumberElement.refract = createRefractor(NumberElement);\nLinkElement.refract = createRefractor(LinkElement);\nRefElement.refract = createRefractor(RefElement);\nAnnotationElement.refract = createRefractor(AnnotationElement);\nCommentElement.refract = createRefractor(CommentElement);\nParseResultElement.refract = createRefractor(ParseResultElement);\nSourceMapElement.refract = createRefractor(SourceMapElement);\nexport { ObjectElement, ArrayElement, StringElement, BooleanElement, NullElement, NumberElement, LinkElement, RefElement, AnnotationElement, CommentElement, ParseResultElement, SourceMapElement };","import { dispatchPluginsSync } from \"./plugins/dispatcher/index.mjs\";\nimport { getNodeType } from \"../traversal/visitor.mjs\";\nimport { cloneDeep } from \"../clone/index.mjs\";\nimport { isElement } from \"../predicates/index.mjs\";\nimport createToolbox from \"./toolbox.mjs\";\nconst refract = (value, {\n Type,\n plugins = []\n}) => {\n /**\n * This is where values gets refracted into generic ApiDOM.\n * We don't allow consumers to hook into this translation.\n * Though we allow consumers to define their onw plugins on already transformed ApiDOM.\n */\n const element = new Type(value);\n if (isElement(value)) {\n if (value.meta.length > 0) {\n element.meta = cloneDeep(value.meta);\n }\n if (value.attributes.length > 0) {\n element.attributes = cloneDeep(value.attributes);\n }\n }\n\n /**\n * Run plugins only when necessary.\n * Running plugins visitors means extra single traversal === performance hit.\n */\n return dispatchPluginsSync(element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n nodeTypeGetter: getNodeType\n }\n });\n};\nexport const createRefractor = Type => (value, options = {}) => refract(value, {\n ...options,\n Type\n});\nexport default refract;","import { ArraySlice } from 'minim';\nimport { PredicateVisitor, visit } from \"./visitor.mjs\";\n/**\n * Finds all elements matching the predicate.\n * @public\n */\nconst filter = (predicate, element) => {\n const visitor = new PredicateVisitor({\n predicate\n });\n visit(element, visitor);\n return new ArraySlice(visitor.result);\n};\nexport default filter;","import { pathOr } from 'ramda';\nimport { PredicateVisitor, BREAK, visit } from \"./visitor.mjs\";\n/**\n * Find first element that satisfies the provided predicate.\n * @public\n */\nconst find = (predicate, element) => {\n const visitor = new PredicateVisitor({\n predicate,\n returnOnTrue: BREAK\n });\n visit(element, visitor);\n return pathOr(undefined, [0], visitor.result);\n};\nexport default find;","import { T as stubTrue } from 'ramda';\nimport { visit as astVisit, keyMapDefault as baseKeyMap, getNodeType as baseGetNodeType } from \"../../../traversal/visitor.mjs\";\nconst nodeTypeGetter = node => {\n if (typeof (node === null || node === void 0 ? void 0 : node.type) === 'string') {\n return node.type;\n }\n return baseGetNodeType(node);\n};\nconst keyMapDefault = {\n EphemeralObject: ['content'],\n EphemeralArray: ['content'],\n ...baseKeyMap\n};\n\n// eslint-disable-next-line import/prefer-default-export\nexport const visit = (root,\n// @ts-ignore\nvisitor, {\n keyMap = keyMapDefault,\n ...rest\n} = {}) => {\n return astVisit(root, visitor, {\n keyMap,\n // @ts-ignore\n nodeTypeGetter,\n nodePredicate: stubTrue,\n detectCycles: false,\n deleteNodeSymbol: Symbol.for('delete-node'),\n skipVisitingNodeSymbol: Symbol.for('skip-visiting-node'),\n ...rest\n });\n};\n\n// @ts-ignore\nvisit[Symbol.for('nodejs.util.promisify.custom')] = async (root, {\n keyMap = keyMapDefault,\n ...rest\n} = {}) => {\n // @ts-ignore\n return astVisit[Symbol.for('nodejs.util.promisify.custom')](root, visitor, {\n keyMap,\n nodeTypeGetter,\n nodePredicate: stubTrue,\n detectCycles: false,\n deleteNodeSymbol: Symbol.for('delete-node'),\n skipVisitingNodeSymbol: Symbol.for('skip-visiting-node'),\n ...rest\n });\n};","class EphemeralArray {\n type = 'EphemeralArray';\n content = [];\n reference = undefined;\n constructor(content) {\n this.content = content;\n this.reference = [];\n }\n toReference() {\n return this.reference;\n }\n toArray() {\n this.reference.push(...this.content);\n return this.reference;\n }\n}\nexport default EphemeralArray;","class EphemeralObject {\n type = 'EphemeralObject';\n content = [];\n reference = undefined;\n constructor(content) {\n this.content = content;\n this.reference = {};\n }\n toReference() {\n return this.reference;\n }\n toObject() {\n return Object.assign(this.reference, Object.fromEntries(this.content));\n }\n}\nexport default EphemeralObject;","import { visit } from \"./visitor.mjs\";\nimport EphemeralArray from \"./ast/ephemeral-array.mjs\";\nimport EphemeralObject from \"./ast/ephemeral-object.mjs\";\nimport { isElement, isBooleanElement, isNumberElement, isStringElement, isNullElement } from \"../../../predicates/index.mjs\";\n/* eslint-disable class-methods-use-this */\nclass Visitor {\n ObjectElement = {\n enter: element => {\n if (this.references.has(element)) {\n return this.references.get(element).toReference();\n }\n const ephemeral = new EphemeralObject(element.content);\n this.references.set(element, ephemeral);\n return ephemeral;\n }\n };\n EphemeralObject = {\n leave: ephemeral => {\n return ephemeral.toObject();\n }\n };\n MemberElement = {\n enter: element => {\n return [element.key, element.value];\n }\n };\n ArrayElement = {\n enter: element => {\n if (this.references.has(element)) {\n return this.references.get(element).toReference();\n }\n const ephemeral = new EphemeralArray(element.content);\n this.references.set(element, ephemeral);\n return ephemeral;\n }\n };\n EphemeralArray = {\n leave: ephemeral => {\n return ephemeral.toArray();\n }\n };\n references = new WeakMap();\n BooleanElement(element) {\n return element.toValue();\n }\n NumberElement(element) {\n return element.toValue();\n }\n StringElement(element) {\n return element.toValue();\n }\n NullElement() {\n return null;\n }\n RefElement(element, ...rest) {\n var _ancestors;\n const ancestors = rest[3];\n if (((_ancestors = ancestors[ancestors.length - 1]) === null || _ancestors === void 0 ? void 0 : _ancestors.type) === 'EphemeralObject') {\n return Symbol.for('delete-node');\n }\n return String(element.toValue());\n }\n LinkElement(element) {\n if (isStringElement(element.href)) {\n return element.href.toValue();\n }\n return '';\n }\n}\n/**\n * @public\n */\nconst serializer = element => {\n if (!isElement(element)) return element;\n\n // shortcut optimization for certain element types\n if (isStringElement(element) || isNumberElement(element) || isBooleanElement(element) || isNullElement(element)) {\n return element.toValue();\n }\n return visit(element, new Visitor());\n};\nexport default serializer;","import { isUndefined } from 'ramda-adjunct';\nimport { isObjectElement, isArrayElement, isMemberElement } from \"../predicates/index.mjs\";\nconst computeEdges = (element, edges = new WeakMap()) => {\n if (isMemberElement(element)) {\n // @ts-ignore\n edges.set(element.key, element);\n // @ts-ignore\n computeEdges(element.key, edges);\n // @ts-ignore\n edges.set(element.value, element);\n // @ts-ignore\n computeEdges(element.value, edges);\n } else {\n element.children.forEach(childElement => {\n edges.set(childElement, element);\n computeEdges(childElement, edges);\n });\n }\n return edges;\n};\nconst transcludeChildOfMemberElement = (search, replace, edges) => {\n const memberElement = edges.get(search);\n if (!isMemberElement(memberElement)) {\n return;\n }\n if (memberElement.key === search) {\n memberElement.key = replace;\n edges.delete(search);\n edges.set(replace, memberElement);\n }\n if (memberElement.value === search) {\n memberElement.value = replace;\n edges.delete(search);\n edges.set(replace, memberElement);\n }\n};\nconst transcludeChildOfObjectElement = (search, replace, edges) => {\n const objectElement = edges.get(search);\n if (!isObjectElement(objectElement)) {\n return;\n }\n objectElement.content = objectElement.map((value, key, member) => {\n if (member === search) {\n edges.delete(search);\n edges.set(replace, objectElement);\n return replace;\n }\n return member;\n });\n};\nconst transcludeChildOfArrayElement = (search, replace, edges) => {\n const arrayElement = edges.get(search);\n if (!isArrayElement(arrayElement)) {\n return;\n }\n arrayElement.content = arrayElement.map(element => {\n if (element === search) {\n edges.delete(search);\n edges.set(replace, arrayElement);\n return replace;\n }\n return element;\n });\n};\n\n/**\n * This is a mutating stamp. If you don't want your Element to be mutated,\n * clone in before passing it to initializer of this stamp.\n * @public\n */\n\nclass Transcluder {\n element;\n edges;\n constructor({\n element\n }) {\n this.element = element;\n }\n transclude(search, replace) {\n var _this$edges;\n // shortcut 1. - replacing entire ApiDOM tree\n if (search === this.element) return replace;\n // shortcut 2. - replacing nothing\n if (search === replace) return this.element;\n this.edges = (_this$edges = this.edges) !== null && _this$edges !== void 0 ? _this$edges : computeEdges(this.element);\n const parent = this.edges.get(search);\n if (isUndefined(parent)) {\n return undefined;\n }\n\n /**\n * This predicate must be first because ObjectElement extends ArrayElement.\n * isArrayElement returns true for ObjectElements.\n * (classical problems with polymorphism)\n */\n if (isObjectElement(parent)) {\n // @ts-ignore\n transcludeChildOfObjectElement(search, replace, this.edges);\n } else if (isArrayElement(parent)) {\n transcludeChildOfArrayElement(search, replace, this.edges);\n } else if (isMemberElement(parent)) {\n transcludeChildOfMemberElement(search, replace, this.edges);\n }\n return this.element;\n }\n}\nexport default Transcluder;","import Transcluder from \"./Transcluder.mjs\";\n/**\n * This is a mutating function. If you don't want your Element to be mutated,\n * clone in before passing it to this function.\n * @public\n */\nexport const transclude = (search, replace, element) => {\n const transcluder = new Transcluder({\n element\n });\n return transcluder.transclude(search, replace);\n};\nexport default Transcluder;","import { defaultTo, has, mapObjIndexed, path, propSatisfies } from 'ramda';\nimport { isPlainObject, isString, trimCharsStart } from 'ramda-adjunct';\n\n/**\n * This dereference algorithm is used exclusively for dereferencing specification objects.\n * It doesn't handle circular references of external references and works on objects only (not arrays).\n * @public\n */\n// eslint-disable-next-line import/prefer-default-export\nexport const dereference = (object, root) => {\n const rootObject = defaultTo(object, root);\n return mapObjIndexed(val => {\n if (isPlainObject(val) && has('$ref', val) && propSatisfies(isString, '$ref', val)) {\n const $ref = path(['$ref'], val);\n // @ts-ignore\n const pointer = trimCharsStart('#/', $ref);\n return path(pointer.split('/'), rootObject);\n }\n if (isPlainObject(val)) {\n return dereference(val, rootObject);\n }\n return val;\n }, object);\n};","import { has } from 'ramda';\nimport { isPlainObject, isString } from 'ramda-adjunct';\nimport defaultNamespaceInstance from \"../namespace.mjs\";\n/**\n * Transforms data to an Element from a particular namespace.\n *\n * The name of the function was originally `from`,\n * but it was renamed to `fromFn` to avoid issues with Parcel.js:\n *\n * - https://github.com/parcel-bundler/parcel/issues/9473\n * - https://github.com/swagger-api/swagger-ui/issues/9466#issuecomment-1881053410\n * @public\n */\nconst fromFn = (data, namespace = defaultNamespaceInstance) => {\n if (isString(data)) {\n // JSON serialized refract\n try {\n return namespace.fromRefract(JSON.parse(data));\n } catch {\n // noop\n }\n }\n if (isPlainObject(data) && has('element', data)) {\n // refract javascript structure\n return namespace.fromRefract(data);\n }\n return namespace.toElement(data);\n};\nexport default fromFn;","import { ObjectElement } from 'minim';\nimport { isObjectElement, isArrayElement } from \"../predicates/index.mjs\";\nimport { cloneDeep, cloneShallow } from \"../clone/index.mjs\";\nimport toValue from \"../transformers/serializers/value/index.mjs\";\n/* eslint-disable @typescript-eslint/no-use-before-define */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nexport const emptyElement = element => {\n const meta = element.meta.length > 0 ? cloneDeep(element.meta) : undefined;\n const attributes = element.attributes.length > 0 ? cloneDeep(element.attributes) : undefined;\n\n // @ts-ignore\n return new element.constructor(undefined, meta, attributes);\n};\nconst cloneUnlessOtherwiseSpecified = (element, options) => options.clone && options.isMergeableElement(element) ? deepmerge(emptyElement(element), element, options) : element;\nconst getMergeFunction = (keyElement, options) => {\n if (typeof options.customMerge !== 'function') {\n return deepmerge;\n }\n const customMerge = options.customMerge(keyElement, options);\n return typeof customMerge === 'function' ? customMerge : deepmerge;\n};\nconst getMetaMergeFunction = options => {\n if (typeof options.customMetaMerge !== 'function') {\n return targetMeta => cloneDeep(targetMeta);\n }\n return options.customMetaMerge;\n};\nconst getAttributesMergeFunction = options => {\n if (typeof options.customAttributesMerge !== 'function') {\n return targetAttributes => cloneDeep(targetAttributes);\n }\n return options.customAttributesMerge;\n};\nconst mergeArrayElement = (targetElement, sourceElement, options) => targetElement.concat(sourceElement)['fantasy-land/map'](item => cloneUnlessOtherwiseSpecified(item, options));\nconst mergeObjectElement = (targetElement, sourceElement, options) => {\n const destination = isObjectElement(targetElement) ? emptyElement(targetElement) : emptyElement(sourceElement);\n if (isObjectElement(targetElement)) {\n targetElement.forEach((value, key, member) => {\n const clonedMember = cloneShallow(member);\n clonedMember.value = cloneUnlessOtherwiseSpecified(value, options);\n destination.content.push(clonedMember);\n });\n }\n sourceElement.forEach((value, key, member) => {\n const keyValue = toValue(key);\n let clonedMember;\n if (isObjectElement(targetElement) && targetElement.hasKey(keyValue) && options.isMergeableElement(value)) {\n const targetValue = targetElement.get(keyValue);\n clonedMember = cloneShallow(member);\n clonedMember.value = getMergeFunction(key, options)(targetValue, value);\n } else {\n clonedMember = cloneShallow(member);\n clonedMember.value = cloneUnlessOtherwiseSpecified(value, options);\n }\n destination.remove(keyValue);\n destination.content.push(clonedMember);\n });\n return destination;\n};\nexport const defaultOptions = {\n clone: true,\n isMergeableElement: element => isObjectElement(element) || isArrayElement(element),\n arrayElementMerge: mergeArrayElement,\n objectElementMerge: mergeObjectElement,\n customMerge: undefined,\n customMetaMerge: undefined,\n customAttributesMerge: undefined\n};\n\n/**\n * @public\n */\nconst deepmerge = (targetElement, sourceElement, options) => {\n var _mergedOptions$isMerg, _mergedOptions$arrayE, _mergedOptions$object;\n const mergedOptions = {\n ...defaultOptions,\n ...options\n };\n mergedOptions.isMergeableElement = (_mergedOptions$isMerg = mergedOptions.isMergeableElement) !== null && _mergedOptions$isMerg !== void 0 ? _mergedOptions$isMerg : defaultOptions.isMergeableElement;\n mergedOptions.arrayElementMerge = (_mergedOptions$arrayE = mergedOptions.arrayElementMerge) !== null && _mergedOptions$arrayE !== void 0 ? _mergedOptions$arrayE : defaultOptions.arrayElementMerge;\n mergedOptions.objectElementMerge = (_mergedOptions$object = mergedOptions.objectElementMerge) !== null && _mergedOptions$object !== void 0 ? _mergedOptions$object : defaultOptions.objectElementMerge;\n const sourceIsArrayElement = isArrayElement(sourceElement);\n const targetIsArrayElement = isArrayElement(targetElement);\n const sourceAndTargetTypesMatch = sourceIsArrayElement === targetIsArrayElement;\n if (!sourceAndTargetTypesMatch) {\n return cloneUnlessOtherwiseSpecified(sourceElement, mergedOptions);\n }\n\n // merging two elements\n const mergedElement = sourceIsArrayElement && typeof mergedOptions.arrayElementMerge === 'function' ? mergedOptions.arrayElementMerge(targetElement, sourceElement, mergedOptions) : mergedOptions.objectElementMerge(targetElement, sourceElement, mergedOptions);\n\n // merging meta & attributes\n mergedElement.meta = getMetaMergeFunction(mergedOptions)(targetElement.meta, sourceElement.meta);\n mergedElement.attributes = getAttributesMergeFunction(mergedOptions)(targetElement.attributes, sourceElement.attributes);\n return mergedElement;\n};\ndeepmerge.all = (list, options) => {\n if (!Array.isArray(list)) {\n throw new TypeError('First argument of deepmerge should be an array.');\n }\n if (list.length === 0) {\n return new ObjectElement();\n }\n return list.reduce((target, source) => {\n return deepmerge(target, source, options);\n }, emptyElement(list[0]));\n};\nexport default deepmerge;\n/* eslint-enable @typescript-eslint/no-use-before-define */","import { ApiDOMError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\nclass DereferenceError extends ApiDOMError {}\nexport default DereferenceError;","import DereferenceError from \"./DereferenceError.mjs\";\n/**\n * @public\n */\nclass UnmatchedDereferenceStrategyError extends DereferenceError {}\nexport default UnmatchedDereferenceStrategyError;","import { isEmpty, propEq } from 'ramda';\nimport { isParseResultElement, ParseResultElement, cloneShallow } from '@swagger-api/apidom-core';\nimport File from \"../File.mjs\";\nimport * as plugins from \"../util/plugins.mjs\";\nimport UnmatchedDereferenceStrategyError from \"../errors/UnmatchedDereferenceStrategyError.mjs\";\nimport DereferenceError from \"../errors/DereferenceError.mjs\";\nimport parse from \"../parse/index.mjs\";\nimport { merge as mergeOptions } from \"../options/util.mjs\";\nimport * as url from \"../util/url.mjs\";\n/**\n * Dereferences ApiDOM with all its external references.\n */\nexport const dereferenceApiDOM = async (element, options) => {\n // @ts-ignore\n let parseResult = element;\n let surrogateWrapping = false;\n\n // wrap element into parse result\n if (!isParseResultElement(element)) {\n const elementClone = cloneShallow(element);\n elementClone.classes.push('result');\n parseResult = new ParseResultElement([elementClone]);\n surrogateWrapping = true;\n }\n const file = new File({\n uri: options.resolve.baseURI,\n parseResult,\n mediaType: options.parse.mediaType\n });\n const dereferenceStrategies = await plugins.filter('canDereference', [file, options], options.dereference.strategies);\n\n // we couldn't find any dereference strategy for this File\n if (isEmpty(dereferenceStrategies)) {\n throw new UnmatchedDereferenceStrategyError(file.uri);\n }\n try {\n const {\n result\n } = await plugins.run('dereference', [file, options], dereferenceStrategies);\n // unwrap the element from ParseResult assuming first element is the actual result\n return surrogateWrapping ? result.get(0) : result;\n } catch (error) {\n throw new DereferenceError(`Error while dereferencing file \"${file.uri}\"`, {\n cause: error\n });\n }\n};\n\n/**\n * Dereferences a file with all its external references.\n */\nconst dereference = async (uri, options) => {\n const {\n refSet\n } = options.dereference;\n const sanitizedURI = url.sanitize(uri);\n let parseResult;\n\n // if refSet was provided, use it to avoid unnecessary parsing\n if (refSet !== null && refSet.has(sanitizedURI)) {\n // @ts-ignore\n ({\n value: parseResult\n } = refSet.find(propEq(sanitizedURI, 'uri')));\n } else {\n parseResult = await parse(uri, options);\n }\n const mergedOptions = mergeOptions(options, {\n resolve: {\n baseURI: sanitizedURI\n },\n dereference: {\n // if refSet was not provided, then we can work in mutable mode\n immutable: options.dereference.immutable && refSet !== null\n }\n });\n return dereferenceApiDOM(parseResult, mergedOptions);\n};\nexport default dereference;","/**\n * @public\n */\n\n/**\n * @public\n */\nclass Parser {\n name;\n\n /**\n * Whether to allow \"empty\" files. This includes zero-byte files.\n */\n allowEmpty;\n\n /**\n * Whether to generate source map during parsing.\n */\n sourceMap;\n\n /**\n * List of supported file extensions.\n */\n fileExtensions;\n\n /**\n * List of supported media types.\n */\n mediaTypes;\n constructor({\n name,\n allowEmpty = true,\n sourceMap = false,\n fileExtensions = [],\n mediaTypes = []\n }) {\n this.name = name;\n this.allowEmpty = allowEmpty;\n this.sourceMap = sourceMap;\n this.fileExtensions = fileExtensions;\n this.mediaTypes = mediaTypes;\n }\n}\nexport default Parser;","/**\n * @public\n */\n\n/**\n * @public\n */\nclass Resolver {\n name;\n constructor({\n name\n }) {\n this.name = name;\n }\n}\nexport default Resolver;","import Resolver from \"./Resolver.mjs\";\nimport * as url from \"../../util/url.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass HTTPResolver extends Resolver {\n timeout;\n redirects;\n withCredentials;\n constructor(options) {\n const {\n name = 'http-resolver',\n timeout = 5000,\n redirects = 5,\n withCredentials = false\n } = options !== null && options !== void 0 ? options : {};\n super({\n name\n });\n this.timeout = timeout;\n this.redirects = redirects;\n this.withCredentials = withCredentials;\n }\n\n // eslint-disable-next-line class-methods-use-this\n canRead(file) {\n return url.isHttpUrl(file.uri);\n }\n}\nexport default HTTPResolver;","/**\n * @public\n */\n\n/**\n * @public\n */\nclass ResolveStrategy {\n name;\n constructor({\n name\n }) {\n this.name = name;\n }\n}\nexport default ResolveStrategy;","/**\n * @public\n */\n\n/**\n * @public\n */\nclass DereferenceStrategy {\n name;\n constructor({\n name\n }) {\n this.name = name;\n }\n}\nexport default DereferenceStrategy;","import { isElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\n// eslint-disable-next-line import/prefer-default-export\nexport class AncestorLineage extends Array {\n includesCycle(element) {\n return this.filter(ancestors => ancestors.has(element)).length > 1;\n }\n includes(searchElement, fromIndex) {\n if (searchElement instanceof Set) {\n return super.includes(searchElement, fromIndex);\n }\n return this.some(ancestors => ancestors.has(searchElement));\n }\n findItem(predicate) {\n for (const set of this) {\n for (const item of set) {\n if (isElement(item) && predicate(item)) {\n return item;\n }\n }\n }\n return undefined;\n }\n}","/**\n * @public\n */\n\n/**\n * @public\n */\nclass Reference {\n uri;\n depth;\n value;\n refSet;\n errors;\n constructor({\n uri,\n depth = 0,\n refSet,\n value\n }) {\n this.uri = uri;\n this.value = value;\n this.depth = depth;\n this.refSet = refSet;\n this.errors = [];\n }\n}\nexport default Reference;","import { ApiDOMError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\nclass JsonSchema$anchorError extends ApiDOMError {}\nexport default JsonSchema$anchorError;","import JsonSchema$anchorError from \"./JsonSchema$anchorError.mjs\";\n/**\n * @public\n */\nclass EvaluationJsonSchema$anchorError extends JsonSchema$anchorError {}\nexport default EvaluationJsonSchema$anchorError;","import { ApiDOMError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\nclass JsonSchemaUriError extends ApiDOMError {}\nexport default JsonSchemaUriError;","import JsonSchemaUriError from \"./JsonSchemaUriError.mjs\";\n/**\n * @public\n */\nclass EvaluationJsonSchemaUriError extends JsonSchemaUriError {}\nexport default EvaluationJsonSchemaUriError;","import JsonSchema$anchorError from \"./JsonSchema$anchorError.mjs\";\n/**\n * @public\n */\nclass InvalidJsonSchema$anchorError extends JsonSchema$anchorError {\n constructor(anchor) {\n super(`Invalid JSON Schema $anchor \"${anchor}\".`);\n }\n}\nexport default InvalidJsonSchema$anchorError;","import DereferenceError from \"./DereferenceError.mjs\";\n/**\n * @public\n */\nclass MaximumDereferenceDepthError extends DereferenceError {}\nexport default MaximumDereferenceDepthError;","import ResolveError from \"./ResolveError.mjs\";\n/**\n * @public\n */\nclass MaximumResolveDepthError extends ResolveError {}\nexport default MaximumResolveDepthError;","import ParseError from \"./ParseError.mjs\";\n/**\n * @public\n */\nclass ParserError extends ParseError {}\nexport default ParserError;","import File from \"./File.mjs\";\nimport ReferenceSet from \"./ReferenceSet.mjs\";\nimport * as url from \"./util/url.mjs\";\nimport defaultOptions from \"./options/index.mjs\";\nimport { merge as mergeOptions } from \"./options/util.mjs\";\nimport parseFn from \"./parse/index.mjs\";\nimport resolveFn, { resolveApiDOM as resolveApiDOMFn } from \"./resolve/index.mjs\";\nimport { readFile as readFileFn } from \"./resolve/util.mjs\";\nimport dereferenceFn, { dereferenceApiDOM as dereferenceApiDOMFn } from \"./dereference/index.mjs\";\nimport bundleFn from \"./bundle/index.mjs\";\nexport { url };\nexport { default as Parser } from \"./parse/parsers/Parser.mjs\";\nexport { default as Resolver } from \"./resolve/resolvers/Resolver.mjs\";\nexport { default as HTTPResolver } from \"./resolve/resolvers/HTTPResolver.mjs\";\nexport { default as ResolveStrategy } from \"./resolve/strategies/ResolveStrategy.mjs\";\nexport { default as DereferenceStrategy } from \"./dereference/strategies/DereferenceStrategy.mjs\";\nexport { AncestorLineage as DereferenceAncestorLineage } from \"./dereference/util.mjs\";\nexport { default as BundleStrategy } from \"./bundle/strategies/BundleStrategy.mjs\";\nexport { default as options } from \"./options/index.mjs\";\nexport { merge as mergeOptions } from \"./options/util.mjs\";\nexport { File };\nexport { default as Reference } from \"./Reference.mjs\";\nexport { ReferenceSet };\nexport { default as BundleError } from \"./errors/BundleError.mjs\";\nexport { default as MaximumBundleDepthError } from \"./errors/MaximumBundleDepthError.mjs\";\nexport { default as UnmatchedBundleStrategyError } from \"./errors/UnmatchedBundleStrategyError.mjs\";\nexport { default as DereferenceError } from \"./errors/DereferenceError.mjs\";\nexport { default as EvaluationElementIdError } from \"./errors/EvaluationElementIdError.mjs\";\nexport { default as EvaluationJsonSchema$anchorError } from \"./errors/EvaluationJsonSchema$anchorError.mjs\";\nexport { default as EvaluationJsonSchemaUriError } from \"./errors/EvaluationJsonSchemaUriError.mjs\";\nexport { default as InvalidJsonSchema$anchorError } from \"./errors/InvalidJsonSchema$anchorError.mjs\";\nexport { default as JsonSchema$anchorError } from \"./errors/JsonSchema$anchorError.mjs\";\nexport { default as JsonSchemaURIError } from \"./errors/JsonSchemaUriError.mjs\";\nexport { default as MaximumDereferenceDepthError } from \"./errors/MaximumDereferenceDepthError.mjs\";\nexport { default as MaximumResolveDepthError } from \"./errors/MaximumResolveDepthError.mjs\";\nexport { default as ParseError } from \"./errors/ParseError.mjs\";\nexport { default as ParserError } from \"./errors/ParserError.mjs\";\nexport { default as PluginError } from \"./errors/PluginError.mjs\";\nexport { default as ResolveError } from \"./errors/ResolveError.mjs\";\nexport { default as ResolverError } from \"./errors/ResolverError.mjs\";\nexport { default as UnmatchedDereferenceStrategyError } from \"./errors/UnmatchedDereferenceStrategyError.mjs\";\nexport { default as UnmatchedResolveStrategyError } from \"./errors/UnmatchedResolveStrategyError.mjs\";\nexport { default as UnmatchedResolverError } from \"./errors/UnmatchedResolverError.mjs\";\n/**\n * @public\n */\nexport const readFile = async (uri, options = {}) => {\n const mergedOptions = mergeOptions(defaultOptions, options);\n const file = new File({\n uri: url.sanitize(uri)\n });\n return readFileFn(file, mergedOptions);\n};\n\n/**\n * @public\n */\nexport const parse = async (uri, options = {}) => {\n const mergedOptions = mergeOptions(defaultOptions, options);\n return parseFn(uri, mergedOptions);\n};\n\n/**\n * @public\n */\nexport const resolve = async (uri, options = {}) => {\n const mergedOptions = mergeOptions(defaultOptions, options);\n return resolveFn(uri, mergedOptions);\n};\n\n/**\n * @public\n */\nexport const resolveApiDOM = async (element, options = {}) => {\n const mergedOptions = mergeOptions(defaultOptions, options);\n return resolveApiDOMFn(element, mergedOptions);\n};\n\n/**\n * @public\n */\nexport const dereference = async (uri, options = {}) => {\n const mergedOptions = mergeOptions(defaultOptions, options);\n return dereferenceFn(uri, mergedOptions);\n};\n\n/**\n * @public\n */\nexport const dereferenceApiDOM = async (element, options = {}) => {\n const mergedOptions = mergeOptions(defaultOptions, options);\n return dereferenceApiDOMFn(element, mergedOptions);\n};\n\n/**\n * @public\n */\nexport const bundle = async (uri, options = {}) => {\n const mergedOptions = mergeOptions(defaultOptions, options);\n return bundleFn(uri, mergedOptions);\n};","// we're targeting browsers that already support fetch API\nconst {\n fetch,\n Response,\n Headers,\n Request,\n FormData,\n File,\n Blob\n} = globalThis;\nexport { fetch, Response, Headers, Request, FormData, File, Blob };","import { fetch, Headers, Request, Response, FormData, File, Blob } from './fetch-ponyfill.browser.js';\nif (typeof globalThis.fetch === 'undefined') {\n globalThis.fetch = fetch;\n}\nif (typeof globalThis.Headers === 'undefined') {\n globalThis.Headers = Headers;\n}\nif (typeof globalThis.Request === 'undefined') {\n globalThis.Request = Request;\n}\nif (typeof globalThis.Response === 'undefined') {\n globalThis.Response = Response;\n}\nif (typeof globalThis.FormData === 'undefined') {\n globalThis.FormData = FormData;\n}\nif (typeof globalThis.File === 'undefined') {\n globalThis.File = File;\n}\nif (typeof globalThis.Blob === 'undefined') {\n globalThis.Blob = Blob;\n}","function _array_like_to_array(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _array_with_holes(arr) {\n if (Array.isArray(arr)) return arr;\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _create_class(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n}\nfunction _iterable_to_array_limit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _s, _e;\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\nfunction _non_iterable_rest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _sliced_to_array(arr, i) {\n return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction _unsupported_iterable_to_array(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _array_like_to_array(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);\n}\nvar __typeError = function (msg) {\n throw TypeError(msg);\n};\nvar __accessCheck = function (obj, member, msg) {\n return member.has(obj) || __typeError(\"Cannot \" + msg);\n};\nvar __privateGet = function (obj, member, getter) {\n return __accessCheck(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd = function (obj, member, value) {\n return member.has(obj) ? __typeError(\"Cannot add the same private member more than once\") : _instanceof(member, WeakSet) ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet = function (obj, member, value, setter) {\n return __accessCheck(obj, member, \"write to private field\"), setter ? setter.call(obj, value) : member.set(obj, value), value;\n};\n// src/index.ts\nvar to_string = function (obj) {\n return Object.prototype.toString.call(obj);\n};\nvar is_typed_array = function (value) {\n return ArrayBuffer.isView(value) && !_instanceof(value, DataView);\n};\nvar is_date = function (obj) {\n return to_string(obj) === \"[object Date]\";\n};\nvar is_regexp = function (obj) {\n return to_string(obj) === \"[object RegExp]\";\n};\nvar is_error = function (obj) {\n return to_string(obj) === \"[object Error]\";\n};\nvar is_boolean = function (obj) {\n return to_string(obj) === \"[object Boolean]\";\n};\nvar is_number = function (obj) {\n return to_string(obj) === \"[object Number]\";\n};\nvar is_string = function (obj) {\n return to_string(obj) === \"[object String]\";\n};\nvar is_array = Array.isArray;\nvar gopd = Object.getOwnPropertyDescriptor;\nvar is_property_enumerable = Object.prototype.propertyIsEnumerable;\nvar get_own_property_symbols = Object.getOwnPropertySymbols;\nvar has_own_property = Object.prototype.hasOwnProperty;\nfunction own_enumerable_keys(obj) {\n var res = Object.keys(obj);\n var symbols = get_own_property_symbols(obj);\n for (var i = 0; i < symbols.length; i++) {\n if (is_property_enumerable.call(obj, symbols[i])) {\n res.push(symbols[i]);\n }\n }\n return res;\n}\nfunction is_writable(object, key) {\n var _gopd;\n return !((_gopd = gopd(object, key)) === null || _gopd === void 0 ? void 0 : _gopd.writable);\n}\nfunction copy(src, options) {\n if ((typeof src === \"undefined\" ? \"undefined\" : _type_of(src)) === \"object\" && src !== null) {\n var dst;\n if (is_array(src)) {\n dst = [];\n } else if (is_date(src)) {\n dst = new Date(src.getTime ? src.getTime() : src);\n } else if (is_regexp(src)) {\n dst = new RegExp(src);\n } else if (is_error(src)) {\n dst = {\n message: src.message\n };\n } else if (is_boolean(src) || is_number(src) || is_string(src)) {\n dst = Object(src);\n } else if (is_typed_array(src)) {\n return src.slice();\n } else {\n dst = Object.create(Object.getPrototypeOf(src));\n }\n var iterator_function = options.includeSymbols ? own_enumerable_keys : Object.keys;\n var _iteratorNormalCompletion = true,\n _didIteratorError = false,\n _iteratorError = undefined;\n try {\n for (var _iterator = iterator_function(src)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n dst[key] = src[key];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return dst;\n }\n return src;\n}\nvar empty_null = {\n includeSymbols: false,\n immutable: false\n};\nfunction walk(root, cb) {\n var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : empty_null;\n var path = [];\n var parents = [];\n var alive = true;\n var iterator_function = options.includeSymbols ? own_enumerable_keys : Object.keys;\n var immutable = !!options.immutable;\n return function walker(node_) {\n var node = immutable ? copy(node_, options) : node_;\n var modifiers = {};\n var keep_going = true;\n var state = {\n node: node,\n node_: node_,\n path: [].concat(path),\n parent: parents[parents.length - 1],\n parents: parents,\n key: path[path.length - 1],\n isRoot: path.length === 0,\n level: path.length,\n circular: void 0,\n isLeaf: false,\n notLeaf: true,\n notRoot: true,\n isFirst: false,\n isLast: false,\n update: function update(x) {\n var stopHere = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!state.isRoot) {\n state.parent.node[state.key] = x;\n }\n state.node = x;\n if (stopHere) {\n keep_going = false;\n }\n },\n delete: function _delete(stopHere) {\n delete state.parent.node[state.key];\n if (stopHere) {\n keep_going = false;\n }\n },\n remove: function remove(stopHere) {\n if (is_array(state.parent.node)) {\n state.parent.node.splice(state.key, 1);\n } else {\n delete state.parent.node[state.key];\n }\n if (stopHere) {\n keep_going = false;\n }\n },\n keys: null,\n before: function before(f) {\n modifiers.before = f;\n },\n after: function after(f) {\n modifiers.after = f;\n },\n pre: function pre(f) {\n modifiers.pre = f;\n },\n post: function post(f) {\n modifiers.post = f;\n },\n stop: function stop() {\n alive = false;\n },\n block: function block() {\n keep_going = false;\n }\n };\n if (!alive) {\n return state;\n }\n function update_state() {\n if (_type_of(state.node) === \"object\" && state.node !== null) {\n if (!state.keys || state.node_ !== state.node) {\n state.keys = iterator_function(state.node);\n }\n state.isLeaf = state.keys.length === 0;\n for (var i = 0; i < parents.length; i++) {\n if (parents[i].node_ === node_) {\n state.circular = parents[i];\n break;\n }\n }\n } else {\n state.isLeaf = true;\n state.keys = null;\n }\n state.notLeaf = !state.isLeaf;\n state.notRoot = !state.isRoot;\n }\n update_state();\n var ret = cb.call(state, state.node);\n if (ret !== void 0 && state.update) {\n state.update(ret);\n }\n if (modifiers.before) {\n modifiers.before.call(state, state.node);\n }\n if (!keep_going) {\n return state;\n }\n if (_type_of(state.node) === \"object\" && state.node !== null && !state.circular) {\n parents.push(state);\n update_state();\n var _state_keys;\n var _iteratorNormalCompletion = true,\n _didIteratorError = false,\n _iteratorError = undefined;\n try {\n for (var _iterator = Object.entries((_state_keys = state.keys) !== null && _state_keys !== void 0 ? _state_keys : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _step_value = _sliced_to_array(_step.value, 2),\n index = _step_value[0],\n key = _step_value[1];\n var _state_keys1;\n path.push(key);\n if (modifiers.pre) {\n modifiers.pre.call(state, state.node[key], key);\n }\n var child = walker(state.node[key]);\n if (immutable && has_own_property.call(state.node, key) && !is_writable(state.node, key)) {\n state.node[key] = child.node;\n }\n child.isLast = ((_state_keys1 = state.keys) === null || _state_keys1 === void 0 ? void 0 : _state_keys1.length) ? +index === state.keys.length - 1 : false;\n child.isFirst = +index === 0;\n if (modifiers.post) {\n modifiers.post.call(state, child);\n }\n path.pop();\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n parents.pop();\n }\n if (modifiers.after) {\n modifiers.after.call(state, state.node);\n }\n return state;\n }(root).node;\n}\nvar _value, _options;\nvar Traverse = /*#__PURE__*/function () {\n \"use strict\";\n\n function Traverse(obj) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : empty_null;\n _class_call_check(this, Traverse);\n // ! Have to keep these public as legacy mode requires them\n __privateAdd(this, _value);\n __privateAdd(this, _options);\n __privateSet(this, _value, obj);\n __privateSet(this, _options, options);\n }\n _create_class(Traverse, [{\n /**\n * Get the element at the array `path`.\n */\n key: \"get\",\n value: function get(paths) {\n var node = __privateGet(this, _value);\n for (var i = 0; node && i < paths.length; i++) {\n var key = paths[i];\n if (!has_own_property.call(node, key) || !__privateGet(this, _options).includeSymbols && (typeof key === \"undefined\" ? \"undefined\" : _type_of(key)) === \"symbol\") {\n return void 0;\n }\n node = node[key];\n }\n return node;\n }\n }, {\n /**\n * Return whether the element at the array `path` exists.\n */\n key: \"has\",\n value: function has(paths) {\n var node = __privateGet(this, _value);\n for (var i = 0; node && i < paths.length; i++) {\n var key = paths[i];\n if (!has_own_property.call(node, key) || !__privateGet(this, _options).includeSymbols && (typeof key === \"undefined\" ? \"undefined\" : _type_of(key)) === \"symbol\") {\n return false;\n }\n node = node[key];\n }\n return true;\n }\n }, {\n /**\n * Set the element at the array `path` to `value`.\n */\n key: \"set\",\n value: function set(path, value) {\n var node = __privateGet(this, _value);\n var i = 0;\n for (i = 0; i < path.length - 1; i++) {\n var key = path[i];\n if (!has_own_property.call(node, key)) {\n node[key] = {};\n }\n node = node[key];\n }\n node[path[i]] = value;\n return value;\n }\n }, {\n /**\n * Execute `fn` for each node in the object and return a new object with the results of the walk. To update nodes in the result use `this.update(value)`.\n */\n key: \"map\",\n value: function map(cb) {\n return walk(__privateGet(this, _value), cb, {\n immutable: true,\n includeSymbols: !!__privateGet(this, _options).includeSymbols\n });\n }\n }, {\n /**\n * Execute `fn` for each node in the object but unlike `.map()`, when `this.update()` is called it updates the object in-place.\n */\n key: \"forEach\",\n value: function forEach(cb) {\n __privateSet(this, _value, walk(__privateGet(this, _value), cb, __privateGet(this, _options)));\n return __privateGet(this, _value);\n }\n }, {\n /**\n * For each node in the object, perform a [left-fold](http://en.wikipedia.org/wiki/Fold_(higher-order_function)) with the return value of `fn(acc, node)`.\n *\n * If `init` isn't specified, `init` is set to the root object for the first step and the root element is skipped.\n */\n key: \"reduce\",\n value: function reduce(cb, init) {\n var skip = arguments.length === 1;\n var acc = skip ? __privateGet(this, _value) : init;\n this.forEach(function (x) {\n if (!this.isRoot || !skip) {\n acc = cb.call(this, acc, x);\n }\n });\n return acc;\n }\n }, {\n /**\n * Return an `Array` of every possible non-cyclic path in the object.\n * Paths are `Array`s of string keys.\n */\n key: \"paths\",\n value: function paths() {\n var acc = [];\n this.forEach(function () {\n acc.push(this.path);\n });\n return acc;\n }\n }, {\n /**\n * Return an `Array` of every node in the object.\n */\n key: \"nodes\",\n value: function nodes() {\n var acc = [];\n this.forEach(function () {\n acc.push(this.node);\n });\n return acc;\n }\n }, {\n /**\n * Create a deep clone of the object.\n */\n key: \"clone\",\n value: function clone() {\n var parents = [];\n var nodes = [];\n var options = __privateGet(this, _options);\n if (is_typed_array(__privateGet(this, _value))) {\n return __privateGet(this, _value).slice();\n }\n return function clone(src) {\n for (var i = 0; i < parents.length; i++) {\n if (parents[i] === src) {\n return nodes[i];\n }\n }\n if ((typeof src === \"undefined\" ? \"undefined\" : _type_of(src)) === \"object\" && src !== null) {\n var dst = copy(src, options);\n parents.push(src);\n nodes.push(dst);\n var iteratorFunction = options.includeSymbols ? own_enumerable_keys : Object.keys;\n var _iteratorNormalCompletion = true,\n _didIteratorError = false,\n _iteratorError = undefined;\n try {\n for (var _iterator = iteratorFunction(src)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n dst[key] = clone(src[key]);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n parents.pop();\n nodes.pop();\n return dst;\n }\n return src;\n }(__privateGet(this, _value));\n }\n }]);\n return Traverse;\n}();\n_value = new WeakMap();\n_options = new WeakMap();\nvar traverse = function (obj, options) {\n return new Traverse(obj, options);\n};\ntraverse.get = function (obj, paths, options) {\n return new Traverse(obj, options).get(paths);\n};\ntraverse.set = function (obj, path, value, options) {\n return new Traverse(obj, options).set(path, value);\n};\ntraverse.has = function (obj, paths, options) {\n return new Traverse(obj, options).has(paths);\n};\ntraverse.map = function (obj, cb, options) {\n return new Traverse(obj, options).map(cb);\n};\ntraverse.forEach = function (obj, cb, options) {\n return new Traverse(obj, options).forEach(cb);\n};\ntraverse.reduce = function (obj, cb, init, options) {\n return new Traverse(obj, options).reduce(cb, init);\n};\ntraverse.paths = function (obj, options) {\n return new Traverse(obj, options).paths();\n};\ntraverse.nodes = function (obj, options) {\n return new Traverse(obj, options).nodes();\n};\ntraverse.clone = function (obj, options) {\n return new Traverse(obj, options).clone();\n};\nvar src_default = traverse;\n// src/legacy.cts\n\nexport { src_default as default };","export const ACCEPT_HEADER_VALUE_FOR_DOCUMENTS = 'application/json, application/yaml';\nexport const DEFAULT_BASE_URL = 'https://swagger.io';\nexport const DEFAULT_OPENAPI_3_SERVER = Object.freeze({\n url: '/'\n});\nexport const TRAVERSE_LIMIT = 3000;","import traverse from 'neotraverse/legacy';\nimport { url } from '@swagger-api/apidom-reference/configuration/empty';\nimport { DEFAULT_BASE_URL } from '../../constants.js';\n\n// This will match if the direct parent's key exactly matches an item.\nconst freelyNamedKeyParents = ['properties'];\n\n// This will match if the grandparent's key exactly matches an item.\n// NOTE that this is for finding non-free paths!\nconst nonFreelyNamedKeyGrandparents = ['properties'];\n\n// This will match if the joined parent path exactly matches an item.\n//\n// This is mostly useful for filtering out root-level reusable item names,\n// for example `[\"definitions\", \"$ref\"]`\nconst freelyNamedPaths = [\n// Swagger 2.0\n'definitions', 'parameters', 'responses', 'securityDefinitions',\n// OpenAPI 3.0\n'components/schemas', 'components/responses', 'components/parameters', 'components/securitySchemes'];\n\n// This will match if any of these items are substrings of the joined\n// parent path.\n//\n// Warning! These are powerful. Beware of edge cases.\nconst freelyNamedAncestors = ['schema/example', 'items/example'];\nexport function isFreelyNamed(parentPath) {\n const parentKey = parentPath[parentPath.length - 1];\n const grandparentKey = parentPath[parentPath.length - 2];\n const parentStr = parentPath.join('/');\n return (\n // eslint-disable-next-line max-len\n freelyNamedKeyParents.indexOf(parentKey) > -1 && nonFreelyNamedKeyGrandparents.indexOf(grandparentKey) === -1 || freelyNamedPaths.indexOf(parentStr) > -1 || freelyNamedAncestors.some(el => parentStr.indexOf(el) > -1)\n );\n}\nexport function generateAbsoluteRefPatches(obj, basePath, {\n specmap,\n getBaseUrlForNodePath = path => specmap.getContext([...basePath, ...path]).baseDoc,\n targetKeys = ['$ref', '$$ref']\n} = {}) {\n const patches = [];\n traverse(obj).forEach(function callback() {\n if (targetKeys.includes(this.key) && typeof this.node === 'string') {\n const nodePath = this.path; // this node's path, relative to `obj`\n const fullPath = basePath.concat(this.path);\n const absolutifiedRefValue = absolutifyPointer(this.node, getBaseUrlForNodePath(nodePath));\n patches.push(specmap.replace(fullPath, absolutifiedRefValue));\n }\n });\n return patches;\n}\nexport function absolutifyPointer(pointer, baseUrl) {\n const [urlPart, fragmentPart] = pointer.split('#');\n const safeBaseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : '';\n const safeUrlPart = urlPart !== null && urlPart !== void 0 ? urlPart : '';\n let newRefUrlPart;\n if (!url.isHttpUrl(safeBaseUrl)) {\n const absoluteBaseUrl = url.resolve(DEFAULT_BASE_URL, safeBaseUrl);\n const absoluteRefUrlPart = url.resolve(absoluteBaseUrl, safeUrlPart);\n const rawRefUrlPart = absoluteRefUrlPart.replace(DEFAULT_BASE_URL, '');\n newRefUrlPart = safeUrlPart.startsWith('/') ? rawRefUrlPart : rawRefUrlPart.substring(1);\n } else {\n newRefUrlPart = url.resolve(safeBaseUrl, safeUrlPart);\n }\n return fragmentPart ? `${newRefUrlPart}#${fragmentPart}` : newRefUrlPart;\n}","import jsYaml from 'js-yaml';\nimport { ApiDOMStructuredError } from '@swagger-api/apidom-error';\nimport { url } from '@swagger-api/apidom-reference/configuration/empty';\nimport '../../../helpers/fetch-polyfill.node.js';\nimport lib from './index.js';\nimport { isFreelyNamed, absolutifyPointer } from '../helpers.js';\nimport { ACCEPT_HEADER_VALUE_FOR_DOCUMENTS } from '../../../constants.js';\nconst ABSOLUTE_URL_REGEXP = /^([a-z]+:\\/\\/|\\/\\/)/i;\nclass JSONRefError extends ApiDOMStructuredError {}\nconst docCache = {};\nconst specmapRefs = new WeakMap();\nconst skipResolutionTestFns = [\n// OpenAPI 2.0 response examples\npath =>\n// [\"paths\", *, *, \"responses\", *, \"examples\"]\npath[0] === 'paths' && path[3] === 'responses' && path[5] === 'examples',\n// OpenAPI 3.0 Response Media Type Examples\npath =>\n// [\"paths\", *, *, \"responses\", *, \"content\", *, \"example\"]\npath[0] === 'paths' && path[3] === 'responses' && path[5] === 'content' && path[7] === 'example', path =>\n// [\"paths\", *, *, \"responses\", *, \"content\", *, \"examples\", *, \"value\"]\npath[0] === 'paths' && path[3] === 'responses' && path[5] === 'content' && path[7] === 'examples' && path[9] === 'value',\n// OpenAPI 3.0 Request Body Media Type Examples\npath =>\n// [\"paths\", *, *, \"requestBody\", \"content\", *, \"example\"]\npath[0] === 'paths' && path[3] === 'requestBody' && path[4] === 'content' && path[6] === 'example', path =>\n// [\"paths\", *, *, \"requestBody\", \"content\", *, \"examples\", *, \"value\"]\npath[0] === 'paths' && path[3] === 'requestBody' && path[4] === 'content' && path[6] === 'examples' && path[8] === 'value',\n// OAS 3.0 Parameter Examples\npath =>\n// [\"paths\", *, \"parameters\", *, \"example\"]\npath[0] === 'paths' && path[2] === 'parameters' && path[4] === 'example', path =>\n// [\"paths\", *, *, \"parameters\", *, \"example\"]\npath[0] === 'paths' && path[3] === 'parameters' && path[5] === 'example', path =>\n// [\"paths\", *, \"parameters\", *, \"examples\", *, \"value\"]\npath[0] === 'paths' && path[2] === 'parameters' && path[4] === 'examples' && path[6] === 'value', path =>\n// [\"paths\", *, *, \"parameters\", *, \"examples\", *, \"value\"]\npath[0] === 'paths' && path[3] === 'parameters' && path[5] === 'examples' && path[7] === 'value', path =>\n// [\"paths\", *, \"parameters\", *, \"content\", *, \"example\"]\npath[0] === 'paths' && path[2] === 'parameters' && path[4] === 'content' && path[6] === 'example', path =>\n// [\"paths\", *, \"parameters\", *, \"content\", *, \"examples\", *, \"value\"]\npath[0] === 'paths' && path[2] === 'parameters' && path[4] === 'content' && path[6] === 'examples' && path[8] === 'value', path =>\n// [\"paths\", *, *, \"parameters\", *, \"content\", *, \"example\"]\npath[0] === 'paths' && path[3] === 'parameters' && path[4] === 'content' && path[7] === 'example', path =>\n// [\"paths\", *, *, \"parameters\", *, \"content\", *, \"examples\", *, \"value\"]\npath[0] === 'paths' && path[3] === 'parameters' && path[5] === 'content' && path[7] === 'examples' && path[9] === 'value'];\nconst shouldSkipResolution = path => skipResolutionTestFns.some(fn => fn(path));\n\n// =========================\n// Core\n// =========================\n\n/**\n * This plugin resolves the JSON pointers.\n * A major part of this plugin deals with cyclic references via 2 mechanisms.\n * 1. If a pointer was already resolved before in this path, halt.\n * 2. If the patch value points to one of the ancestors in this path, halt.\n *\n * Note that either one of these mechanism is sufficient, both must be in place.\n * For examples:\n *\n * Given the following spec, #1 alone is insufficient because after the 2nd\n * application, there will be a cyclic object reference.\n * a.b.c: $ref-d\n * d.e.f: $ref-a (per #1, safe to return patch as no immediate cycle)\n *\n * Given the following spec, #2 alone is insufficient because although there will\n * never be any cyclic object reference, the plugin will keep producing patches.\n * a: $ref-b\n * b: $ref-a\n */\nconst plugin = {\n key: '$ref',\n plugin: (ref, key, fullPath, specmap) => {\n const specmapInstance = specmap.getInstance();\n const parent = fullPath.slice(0, -1);\n if (isFreelyNamed(parent) || shouldSkipResolution(parent)) {\n return undefined;\n }\n const {\n baseDoc\n } = specmap.getContext(fullPath);\n if (typeof ref !== 'string') {\n return new JSONRefError('$ref: must be a string (JSON-Ref)', {\n $ref: ref,\n baseDoc,\n fullPath\n });\n }\n const splitString = split(ref);\n const refPath = splitString[0];\n const pointer = splitString[1] || '';\n let basePath;\n try {\n basePath = baseDoc || refPath ? absoluteify(refPath, baseDoc) : null;\n } catch (e) {\n return wrapError(e, {\n pointer,\n $ref: ref,\n basePath,\n fullPath\n });\n }\n let promOrVal;\n let tokens;\n if (pointerAlreadyInPath(pointer, basePath, parent, specmap)) {\n // Cyclic reference!\n // if `useCircularStructures` is not set, just leave the reference\n // unresolved, but absolutify it so that we don't leave an invalid $ref\n // path in the content\n if (!specmapInstance.useCircularStructures) {\n const absolutifiedRef = absolutifyPointer(ref, basePath);\n if (ref === absolutifiedRef) {\n // avoids endless looping\n // without this, the ref plugin never stops seeing this $ref\n return null;\n }\n return lib.replace(fullPath, absolutifiedRef);\n }\n }\n if (basePath == null) {\n tokens = jsonPointerToArray(pointer);\n promOrVal = specmap.get(tokens);\n if (typeof promOrVal === 'undefined') {\n promOrVal = new JSONRefError(`Could not resolve reference: ${ref}`, {\n pointer,\n $ref: ref,\n baseDoc,\n fullPath\n });\n }\n } else {\n promOrVal = extractFromDoc(basePath, pointer);\n // eslint-disable-next-line no-underscore-dangle\n if (promOrVal.__value != null) {\n promOrVal = promOrVal.__value; // eslint-disable-line no-underscore-dangle\n } else {\n promOrVal = promOrVal.catch(e => {\n throw wrapError(e, {\n pointer,\n $ref: ref,\n baseDoc,\n fullPath\n });\n });\n }\n }\n if (promOrVal instanceof Error) {\n return [lib.remove(fullPath), promOrVal];\n }\n const absolutifiedRef = absolutifyPointer(ref, basePath);\n const patch = lib.replace(parent, promOrVal, {\n $$ref: absolutifiedRef\n });\n if (basePath && basePath !== baseDoc) {\n return [patch, lib.context(parent, {\n baseDoc: basePath\n })];\n }\n try {\n // prevents circular values from being constructed, unless we specifically\n // want that to happen\n if (!patchValueAlreadyInPath(specmap.state, patch) || specmapInstance.useCircularStructures) {\n return patch;\n }\n } catch (e) {\n // if we're catching here, path traversal failed, so we should\n // ditch without sending any patches back up.\n //\n // this is a narrow fix for the larger problem of patches being queued\n // and then having the state they were generated against be modified\n // before they are applied.\n //\n // TODO: re-engineer specmap patch/state management to avoid this\n return null;\n }\n return undefined;\n }\n};\nconst mod = Object.assign(plugin, {\n docCache,\n absoluteify,\n clearCache,\n JSONRefError,\n wrapError,\n getDoc,\n split,\n extractFromDoc,\n fetchJSON,\n extract,\n jsonPointerToArray,\n unescapeJsonPointerToken\n});\nexport default mod;\n\n// =========================\n// Utilities\n// =========================\n\n/**\n * Resolves a path and its base to an abolute URL.\n * @api public\n */\nfunction absoluteify(path, basePath) {\n if (!ABSOLUTE_URL_REGEXP.test(path)) {\n if (!basePath) {\n throw new JSONRefError(`Tried to resolve a relative URL, without having a basePath. path: '${path}' basePath: '${basePath}'`);\n }\n return url.resolve(basePath, path);\n }\n return path;\n}\n\n/**\n * Wraps an error as JSONRefError.\n * @param {Error} e the error.\n * @param {Object} extra (optional) optional data.\n * @return {Error} an instance of JSONRefError.\n * @api public\n */\nfunction wrapError(e, extra) {\n let message;\n if (e && e.response && e.response.body) {\n message = `${e.response.body.code} ${e.response.body.message}`;\n } else {\n message = e.message;\n }\n return new JSONRefError(`Could not resolve reference: ${message}`, {\n ...extra,\n cause: e\n });\n}\n\n/**\n * Splits a pointer by the hash delimiter.\n * @api public\n */\nfunction split(ref) {\n return (ref + '').split('#'); // eslint-disable-line prefer-template\n}\n\n/**\n * Extracts a pointer from its document.\n * @param {String} docPath the absolute document URL.\n * @param {String} pointer the pointer whose value is to be extracted.\n * @return {Promise} a promise of the pointer value.\n * @api public\n */\nfunction extractFromDoc(docPath, pointer) {\n const doc = docCache[docPath];\n if (doc && !lib.isPromise(doc)) {\n // If doc is already available, return __value together with the promise.\n // __value is for special handling in cycle check:\n // pointerAlreadyInPath() won't work if patch.value is a promise,\n // thus when that promise is finally resolved, cycle might happen (because\n // `spec` and `docCache[basePath]` refer to the exact same object).\n // See test \"should resolve a cyclic spec when baseDoc is specified\".\n try {\n const v = extract(pointer, doc);\n return Object.assign(Promise.resolve(v), {\n __value: v\n });\n } catch (e) {\n return Promise.reject(e);\n }\n }\n return getDoc(docPath).then(_doc => extract(pointer, _doc));\n}\n\n/**\n * Clears all document caches.\n * @param {String} item (optional) the name of the cache item to be cleared.\n * @api public\n */\nfunction clearCache(item) {\n if (typeof item !== 'undefined') {\n delete docCache[item];\n } else {\n Object.keys(docCache).forEach(key => {\n delete docCache[key];\n });\n }\n}\n\n/**\n * Fetches and caches a document.\n * @param {String} docPath the absolute URL of the document.\n * @return {Promise} a promise of the document content.\n * @api public\n */\nfunction getDoc(docPath) {\n const val = docCache[docPath];\n if (val) {\n return lib.isPromise(val) ? val : Promise.resolve(val);\n }\n\n // NOTE: we need to use `mod.fetchJSON` in order to be able to overwrite it.\n // Any tips on how to make this cleaner, please ping!\n docCache[docPath] = mod.fetchJSON(docPath).then(doc => {\n docCache[docPath] = doc;\n return doc;\n });\n return docCache[docPath];\n}\n\n/**\n * Fetches a document.\n * @param {String} docPath the absolute URL of the document.\n * @return {Promise} a promise of the document content.\n * @api public\n */\nfunction fetchJSON(docPath) {\n return fetch(docPath, {\n headers: {\n Accept: ACCEPT_HEADER_VALUE_FOR_DOCUMENTS\n },\n loadSpec: true\n }).then(res => res.text()).then(text => jsYaml.load(text));\n}\n\n/**\n * Extracts a pointer from an object.\n * @param {String[]} pointer the JSON pointer.\n * @param {Object} obj an object whose value is to be extracted.\n * @return {Object} the value to be extracted.\n * @api public\n */\nfunction extract(pointer, obj) {\n const tokens = jsonPointerToArray(pointer);\n if (tokens.length < 1) {\n return obj;\n }\n const val = lib.getIn(obj, tokens);\n if (typeof val === 'undefined') {\n throw new JSONRefError(`Could not resolve pointer: ${pointer} does not exist in document`, {\n pointer\n });\n }\n return val;\n}\n\n/**\n * Converts a JSON pointer to array.\n * @api public\n */\nfunction jsonPointerToArray(pointer) {\n if (typeof pointer !== 'string') {\n throw new TypeError(`Expected a string, got a ${typeof pointer}`);\n }\n if (pointer[0] === '/') {\n pointer = pointer.substr(1);\n }\n if (pointer === '') {\n return [];\n }\n return pointer.split('/').map(unescapeJsonPointerToken);\n}\n\n/**\n * Unescapes a JSON pointer.\n * @api public\n */\nfunction unescapeJsonPointerToken(token) {\n if (typeof token !== 'string') {\n return token;\n }\n const params = new URLSearchParams(`=${token.replace(/~1/g, '/').replace(/~0/g, '~')}`);\n return params.get('');\n}\n\n/**\n * Escapes a JSON pointer.\n * @api public\n */\nfunction escapeJsonPointerToken(token) {\n const params = new URLSearchParams([['', token.replace(/~/g, '~0').replace(/\\//g, '~1')]]);\n return params.toString().slice(1);\n}\nfunction arrayToJsonPointer(arr) {\n if (arr.length === 0) {\n return '';\n }\n return `/${arr.map(escapeJsonPointerToken).join('/')}`;\n}\nconst pointerBoundaryChar = c => !c || c === '/' || c === '#';\nfunction pointerIsAParent(pointer, parentPointer) {\n if (pointerBoundaryChar(parentPointer)) {\n // This is the root of the document, so its naturally a parent\n return true;\n }\n const nextChar = pointer.charAt(parentPointer.length);\n const lastParentChar = parentPointer.slice(-1);\n return pointer.indexOf(parentPointer) === 0 && (!nextChar || nextChar === '/' || nextChar === '#') && lastParentChar !== '#';\n}\n\n// =========================\n// Private\n// =========================\n\n/**\n * Checks if this pointer points back to one or more pointers along the path.\n */\nfunction pointerAlreadyInPath(pointer, basePath, parent, specmap) {\n let refs = specmapRefs.get(specmap);\n if (!refs) {\n // Stores all resolved references of a specmap instance.\n // Schema: path -> pointer (path's $ref value).\n refs = {};\n specmapRefs.set(specmap, refs);\n }\n const parentPointer = arrayToJsonPointer(parent);\n const fullyQualifiedPointer = `${basePath || ''}#${pointer}`;\n\n // dirty hack to strip `allof/[index]` from the path, in order to avoid cases\n // where we get false negatives because:\n // - we resolve a path, then\n // - allOf plugin collapsed `allOf/[index]` out of the path, then\n // - we try to work on a child $ref within that collapsed path.\n //\n // because of the path collapse, we lose track of it in our specmapRefs hash\n // solution: always throw the allOf constructs out of paths we store\n // TODO: solve this with a global register, or by writing more metadata in\n // either allOf or refs plugin\n const safeParentPointer = parentPointer.replace(/allOf\\/\\d+\\/?/g, '');\n\n // Case 1: direct cycle, e.g. a.b.c.$ref: '/a.b'\n // Detect by checking that the parent path doesn't start with pointer.\n // This only applies if the pointer is internal, i.e. basePath === rootPath (could be null)\n const rootDoc = specmap.contextTree.get([]).baseDoc;\n if (basePath === rootDoc && pointerIsAParent(safeParentPointer, pointer)) {\n // eslint-disable-line\n return true;\n }\n\n // Case 2: indirect cycle\n // ex1: a.$ref: '/b' & b.c.$ref: '/b/c'\n // ex2: a.$ref: '/b/c' & b.c.$ref: '/b'\n // Detect by retrieving all the $refs along the path of parent\n // and checking if any starts with pointer or vice versa.\n let currPath = '';\n const hasIndirectCycle = parent.some(token => {\n currPath = `${currPath}/${escapeJsonPointerToken(token)}`;\n return refs[currPath] && refs[currPath].some(ref => pointerIsAParent(ref, fullyQualifiedPointer) || pointerIsAParent(fullyQualifiedPointer, ref));\n });\n if (hasIndirectCycle) {\n return true;\n }\n\n // No cycle, this ref will be resolved, so stores it now for future detection.\n // No need to store if has cycle, as parent path is a dead-end and won't be checked again.\n\n refs[safeParentPointer] = (refs[safeParentPointer] || []).concat(fullyQualifiedPointer);\n return undefined;\n}\n\n/**\n * Checks if the value of this patch ends up pointing to an ancestor along the path.\n */\nfunction patchValueAlreadyInPath(root, patch) {\n const ancestors = [root];\n patch.path.reduce((parent, p) => {\n ancestors.push(parent[p]);\n return parent[p];\n }, root);\n return pointToAncestor(patch.value);\n function pointToAncestor(obj) {\n return lib.isObject(obj) && (ancestors.indexOf(obj) >= 0 || Object.keys(obj).some(k => pointToAncestor(obj[k])));\n }\n}","import { isFreelyNamed, generateAbsoluteRefPatches } from '../helpers.js';\nexport default {\n key: 'allOf',\n plugin: (val, key, fullPath, specmap, patch) => {\n // Ignore replace patches created by $ref because the changes will\n // occur in the original \"add\" patch and we don't want this plugin\n // to redundantly processes those \"relace\" patches.\n if (patch.meta && patch.meta.$$ref) {\n return undefined;\n }\n const parent = fullPath.slice(0, -1);\n if (isFreelyNamed(parent)) {\n return undefined;\n }\n if (!Array.isArray(val)) {\n const err = new TypeError('allOf must be an array');\n err.fullPath = fullPath; // This is an array\n return err;\n }\n let alreadyAddError = false;\n\n // Find the original definition from the `patch.value` object\n // Remove the `allOf` property so it doesn't get added to the result of the `allOf` plugin\n let originalDefinitionObj = patch.value;\n parent.forEach(part => {\n if (!originalDefinitionObj) return; // bail out if we've lost sight of our target\n originalDefinitionObj = originalDefinitionObj[part];\n });\n originalDefinitionObj = {\n ...originalDefinitionObj\n };\n\n // when we've lost sight, interrupt prematurely\n if (Object.keys(originalDefinitionObj).length === 0) {\n return undefined;\n }\n delete originalDefinitionObj.allOf;\n const patches = [];\n\n // remove existing content\n patches.push(specmap.replace(parent, {}));\n val.forEach((toMerge, i) => {\n if (!specmap.isObject(toMerge)) {\n if (alreadyAddError) {\n return null;\n }\n alreadyAddError = true;\n const err = new TypeError('Elements in allOf must be objects');\n err.fullPath = fullPath; // This is an array\n return patches.push(err);\n }\n\n // Deeply merge the member's contents onto the parent location\n patches.push(specmap.mergeDeep(parent, toMerge));\n\n // Generate patches that migrate $ref values based on ContextTree information\n\n // remove [\"allOf\"], which will not be present when these patches are applied\n const collapsedFullPath = fullPath.slice(0, -1);\n const absoluteRefPatches = generateAbsoluteRefPatches(toMerge, collapsedFullPath, {\n getBaseUrlForNodePath: nodePath => specmap.getContext([...fullPath, i, ...nodePath]).baseDoc,\n specmap\n });\n patches.push(...absoluteRefPatches);\n return undefined;\n });\n\n // If there was an example in the original definition,\n // keep it instead of merging with examples from other schema\n if (originalDefinitionObj.example) {\n // Delete other schema examples\n patches.push(specmap.remove([].concat(parent, 'example')));\n }\n // Merge back the values from the original definition\n patches.push(specmap.mergeDeep(parent, originalDefinitionObj));\n\n // If there was not an original $$ref value, make sure to remove\n // any $$ref value that may exist from the result of `allOf` merges\n if (!originalDefinitionObj.$$ref) {\n patches.push(specmap.remove([].concat(parent, '$$ref')));\n }\n return patches;\n }\n};","import lib from './index.js';\nexport default {\n key: 'parameters',\n plugin: (parameters, key, fullPath, specmap) => {\n if (Array.isArray(parameters) && parameters.length) {\n const val = Object.assign([], parameters);\n const opPath = fullPath.slice(0, -1);\n const op = {\n ...lib.getIn(specmap.spec, opPath)\n };\n for (let i = 0; i < parameters.length; i += 1) {\n const param = parameters[i];\n try {\n val[i].default = specmap.parameterMacro(op, param);\n } catch (e) {\n const err = new Error(e);\n err.fullPath = fullPath;\n return err;\n }\n }\n return lib.replace(fullPath, val);\n }\n return lib.replace(fullPath, parameters);\n }\n};","import lib from './index.js';\nexport default {\n key: 'properties',\n plugin: (properties, key, fullPath, specmap) => {\n const val = {\n ...properties\n };\n\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (const k in properties) {\n try {\n val[k].default = specmap.modelPropertyMacro(val[k]);\n } catch (e) {\n const err = new Error(e);\n err.fullPath = fullPath; // This is an array\n return err;\n }\n }\n const patch = lib.replace(fullPath, val);\n return patch;\n }\n};","class ContextTree {\n constructor(value) {\n this.root = createNode(value || {});\n }\n set(path, value) {\n const parent = this.getParent(path, true);\n if (!parent) {\n updateNode(this.root, value, null);\n return;\n }\n const key = path[path.length - 1];\n const {\n children\n } = parent;\n if (children[key]) {\n updateNode(children[key], value, parent);\n return;\n }\n children[key] = createNode(value, parent);\n }\n\n // Get the \"best\" node (node or nearest parent) and return its value.\n get(path) {\n path = path || [];\n if (path.length < 1) {\n return this.root.value;\n }\n let branch = this.root;\n let child;\n let token;\n for (let i = 0; i < path.length; i += 1) {\n token = path[i];\n child = branch.children;\n if (!child[token]) {\n break;\n }\n branch = child[token];\n }\n return branch && branch.protoValue;\n }\n getParent(path, ensureExists) {\n if (!path || path.length < 1) {\n return null;\n }\n if (path.length < 2) {\n return this.root;\n }\n return path.slice(0, -1).reduce((branch, token) => {\n if (!branch) {\n return branch;\n }\n const {\n children\n } = branch;\n if (!children[token] && ensureExists) {\n children[token] = createNode(null, branch);\n }\n return children[token];\n }, this.root);\n }\n}\n\n// =========================\n// Utilities\n// =========================\nexport { ContextTree as default };\nfunction createNode(value, parent) {\n return updateNode({\n children: {}\n }, value, parent);\n}\nfunction updateNode(node, value, parent) {\n node.value = value || {};\n node.protoValue = parent ? {\n ...parent.protoValue,\n ...node.value\n } : node.value;\n Object.keys(node.children).forEach(prop => {\n const child = node.children[prop];\n node.children[prop] = updateNode(child, child.value, node);\n });\n return node;\n}","import lib from './lib/index.js';\nimport refs from './lib/refs.js';\nimport allOf from './lib/all-of.js';\nimport parameters from './lib/parameters.js';\nimport properties from './lib/properties.js';\nimport ContextTree from './lib/context-tree.js';\nimport { TRAVERSE_LIMIT } from '../../constants.js';\nconst PLUGIN_DISPATCH_LIMIT = 100;\nconst noop = () => {};\nclass SpecMap {\n static getPluginName(plugin) {\n return plugin.pluginName;\n }\n static getPatchesOfType(patches, fn) {\n return patches.filter(fn);\n }\n constructor(opts) {\n Object.assign(this, {\n spec: '',\n debugLevel: 'info',\n plugins: [],\n pluginHistory: {},\n errors: [],\n mutations: [],\n promisedPatches: [],\n state: {},\n patches: [],\n context: {},\n contextTree: new ContextTree(),\n showDebug: false,\n allPatches: [],\n // only populated if showDebug is true\n pluginProp: 'specMap',\n libMethods: Object.assign(Object.create(this), lib, {\n getInstance: () => this\n }),\n allowMetaPatches: false\n }, opts);\n\n // Lib methods bound\n this.get = this._get.bind(this); // eslint-disable-line no-underscore-dangle\n this.getContext = this._getContext.bind(this); // eslint-disable-line no-underscore-dangle\n this.hasRun = this._hasRun.bind(this); // eslint-disable-line no-underscore-dangle\n\n this.wrappedPlugins = this.plugins.map(this.wrapPlugin.bind(this)).filter(lib.isFunction);\n\n // Initial patch(s)\n this.patches.push(lib.add([], this.spec));\n this.patches.push(lib.context([], this.context));\n this.updatePatches(this.patches);\n }\n debug(level, ...args) {\n if (this.debugLevel === level) {\n console.log(...args); // eslint-disable-line no-console\n }\n }\n verbose(header, ...args) {\n if (this.debugLevel === 'verbose') {\n console.log(`[${header}] `, ...args); // eslint-disable-line no-console\n }\n }\n wrapPlugin(plugin, name) {\n const {\n pathDiscriminator\n } = this;\n let ctx = null;\n let fn;\n if (plugin[this.pluginProp]) {\n ctx = plugin;\n fn = plugin[this.pluginProp];\n } else if (lib.isFunction(plugin)) {\n fn = plugin;\n } else if (lib.isObject(plugin)) {\n fn = createKeyBasedPlugin(plugin);\n }\n return Object.assign(fn.bind(ctx), {\n pluginName: plugin.name || name,\n isGenerator: lib.isGenerator(fn)\n });\n\n // Expected plugin interface: {key: string, plugin: fn*}\n // This traverses depth-first and immediately applies yielded patches.\n // This strategy should work well for most plugins (including the built-ins).\n // We might consider making this (traversing & application) configurable later.\n function createKeyBasedPlugin(pluginObj) {\n const isSubPath = (path, tested) => {\n if (!Array.isArray(path)) {\n return true;\n }\n return path.every((val, i) => val === tested[i]);\n };\n return function* generator(patches, specmap) {\n const refCache = {};\n\n // eslint-disable-next-line no-restricted-syntax\n for (const [i, patch] of patches.filter(lib.isAdditiveMutation).entries()) {\n if (i < TRAVERSE_LIMIT) {\n yield* traverse(patch.value, patch.path, patch);\n } else {\n return;\n }\n }\n function* traverse(obj, path, patch) {\n if (!lib.isObject(obj)) {\n if (pluginObj.key === path[path.length - 1]) {\n yield pluginObj.plugin(obj, pluginObj.key, path, specmap);\n }\n } else {\n const parentIndex = path.length - 1;\n const parent = path[parentIndex];\n const indexOfFirstProperties = path.indexOf('properties');\n const isRootProperties = parent === 'properties' && parentIndex === indexOfFirstProperties;\n const traversed = specmap.allowMetaPatches && refCache[obj.$$ref];\n\n // eslint-disable-next-line no-restricted-syntax\n for (const key of Object.keys(obj)) {\n const val = obj[key];\n const updatedPath = path.concat(key);\n const isObj = lib.isObject(val);\n const objRef = obj.$$ref;\n if (!traversed) {\n if (isObj) {\n // Only store the ref if it exists\n if (specmap.allowMetaPatches && objRef) {\n refCache[objRef] = true;\n }\n yield* traverse(val, updatedPath, patch);\n }\n }\n if (!isRootProperties && key === pluginObj.key) {\n const isWithinPathDiscriminator = isSubPath(pathDiscriminator, path);\n if (!pathDiscriminator || isWithinPathDiscriminator) {\n yield pluginObj.plugin(val, key, updatedPath, specmap, patch);\n }\n }\n }\n }\n }\n };\n }\n }\n nextPlugin() {\n return this.wrappedPlugins.find(plugin => {\n const mutations = this.getMutationsForPlugin(plugin);\n return mutations.length > 0;\n });\n }\n nextPromisedPatch() {\n if (this.promisedPatches.length > 0) {\n return Promise.race(this.promisedPatches.map(patch => patch.value));\n }\n return undefined;\n }\n getPluginHistory(plugin) {\n const name = this.constructor.getPluginName(plugin);\n return this.pluginHistory[name] || [];\n }\n getPluginRunCount(plugin) {\n return this.getPluginHistory(plugin).length;\n }\n getPluginHistoryTip(plugin) {\n const history = this.getPluginHistory(plugin);\n const val = history && history[history.length - 1];\n return val || {};\n }\n getPluginMutationIndex(plugin) {\n const mi = this.getPluginHistoryTip(plugin).mutationIndex;\n return typeof mi !== 'number' ? -1 : mi;\n }\n updatePluginHistory(plugin, val) {\n const name = this.constructor.getPluginName(plugin);\n this.pluginHistory[name] = this.pluginHistory[name] || [];\n this.pluginHistory[name].push(val);\n }\n updatePatches(patches) {\n lib.normalizeArray(patches).forEach(patch => {\n if (patch instanceof Error) {\n this.errors.push(patch);\n return;\n }\n try {\n if (!lib.isObject(patch)) {\n this.debug('updatePatches', 'Got a non-object patch', patch);\n return;\n }\n if (this.showDebug) {\n this.allPatches.push(patch);\n }\n if (lib.isPromise(patch.value)) {\n this.promisedPatches.push(patch);\n this.promisedPatchThen(patch);\n return;\n }\n if (lib.isContextPatch(patch)) {\n this.setContext(patch.path, patch.value);\n return;\n }\n if (lib.isMutation(patch)) {\n this.updateMutations(patch);\n }\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n this.errors.push(e);\n }\n });\n }\n updateMutations(patch) {\n if (typeof patch.value === 'object' && !Array.isArray(patch.value) && this.allowMetaPatches) {\n patch.value = {\n ...patch.value\n };\n }\n const result = lib.applyPatch(this.state, patch, {\n allowMetaPatches: this.allowMetaPatches\n });\n if (result) {\n this.mutations.push(patch);\n this.state = result;\n }\n }\n removePromisedPatch(patch) {\n const index = this.promisedPatches.indexOf(patch);\n if (index < 0) {\n this.debug(\"Tried to remove a promisedPatch that isn't there!\");\n return;\n }\n this.promisedPatches.splice(index, 1);\n }\n promisedPatchThen(patch) {\n patch.value = patch.value.then(val => {\n const promisedPatch = {\n ...patch,\n value: val\n };\n this.removePromisedPatch(patch);\n this.updatePatches(promisedPatch);\n }).catch(e => {\n this.removePromisedPatch(patch);\n this.updatePatches(e);\n });\n return patch.value;\n }\n getMutations(from, to) {\n from = from || 0;\n if (typeof to !== 'number') {\n to = this.mutations.length;\n }\n return this.mutations.slice(from, to);\n }\n getCurrentMutations() {\n return this.getMutationsForPlugin(this.getCurrentPlugin());\n }\n getMutationsForPlugin(plugin) {\n const tip = this.getPluginMutationIndex(plugin);\n return this.getMutations(tip + 1);\n }\n getCurrentPlugin() {\n return this.currentPlugin;\n }\n getLib() {\n return this.libMethods;\n }\n\n // eslint-disable-next-line no-underscore-dangle\n _get(path) {\n return lib.getIn(this.state, path);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n _getContext(path) {\n return this.contextTree.get(path);\n }\n setContext(path, value) {\n return this.contextTree.set(path, value);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n _hasRun(count) {\n const times = this.getPluginRunCount(this.getCurrentPlugin());\n return times > (count || 0);\n }\n dispatch() {\n const that = this;\n const plugin = this.nextPlugin();\n if (!plugin) {\n const nextPromise = this.nextPromisedPatch();\n if (nextPromise) {\n return nextPromise.then(() => this.dispatch()).catch(() => this.dispatch());\n }\n\n // We're done!\n const result = {\n spec: this.state,\n errors: this.errors\n };\n if (this.showDebug) {\n result.patches = this.allPatches;\n }\n return Promise.resolve(result);\n }\n\n // Makes sure plugin isn't running an endless loop\n that.pluginCount = that.pluginCount || new WeakMap();\n that.pluginCount.set(plugin, (that.pluginCount.get(plugin) || 0) + 1);\n if (that.pluginCount[plugin] > PLUGIN_DISPATCH_LIMIT) {\n return Promise.resolve({\n spec: that.state,\n errors: that.errors.concat(new Error(`We've reached a hard limit of ${PLUGIN_DISPATCH_LIMIT} plugin runs`))\n });\n }\n\n // A different plugin runs, wait for all promises to resolve, then retry\n if (plugin !== this.currentPlugin && this.promisedPatches.length) {\n const promises = this.promisedPatches.map(p => p.value);\n\n // Waits for all to settle instead of Promise.all which stops on rejection\n return Promise.all(promises.map(promise => promise.then(noop, noop))).then(() => this.dispatch());\n }\n\n // Ok, run the plugin\n return executePlugin();\n function executePlugin() {\n that.currentPlugin = plugin;\n const mutations = that.getCurrentMutations();\n const lastMutationIndex = that.mutations.length - 1;\n try {\n if (plugin.isGenerator) {\n // eslint-disable-next-line no-restricted-syntax\n for (const yieldedPatches of plugin(mutations, that.getLib())) {\n updatePatches(yieldedPatches);\n }\n } else {\n const newPatches = plugin(mutations, that.getLib());\n updatePatches(newPatches);\n }\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n updatePatches([Object.assign(Object.create(e), {\n plugin\n })]);\n } finally {\n that.updatePluginHistory(plugin, {\n mutationIndex: lastMutationIndex\n });\n }\n return that.dispatch();\n }\n function updatePatches(patches) {\n if (patches) {\n patches = lib.fullyNormalizeArray(patches);\n that.updatePatches(patches, plugin);\n }\n }\n }\n}\nexport default function mapSpec(opts) {\n return new SpecMap(opts).dispatch();\n}\nconst plugins = {\n refs,\n allOf,\n parameters,\n properties\n};\nexport { SpecMap, plugins };","import { ACCEPT_HEADER_VALUE_FOR_DOCUMENTS } from '../../constants.js';\n\n// eslint-disable-next-line import/prefer-default-export\nexport function makeFetchJSON(http, opts = {}) {\n const {\n requestInterceptor,\n responseInterceptor\n } = opts;\n // Set credentials with 'http.withCredentials' value\n const credentials = http.withCredentials ? 'include' : 'same-origin';\n return docPath => http({\n url: docPath,\n loadSpec: true,\n requestInterceptor,\n responseInterceptor,\n headers: {\n Accept: ACCEPT_HEADER_VALUE_FOR_DOCUMENTS\n },\n credentials\n }).then(res => res.body);\n}","export function isFile(obj, navigatorObj) {\n if (!navigatorObj && typeof navigator !== 'undefined') {\n // eslint-disable-next-line no-undef\n navigatorObj = navigator;\n }\n if (navigatorObj && navigatorObj.product === 'ReactNative') {\n if (obj && typeof obj === 'object' && typeof obj.uri === 'string') {\n return true;\n }\n return false;\n }\n if (typeof File !== 'undefined' && obj instanceof File) {\n return true;\n }\n if (typeof Blob !== 'undefined' && obj instanceof Blob) {\n return true;\n }\n if (ArrayBuffer.isView(obj)) {\n return true;\n }\n return obj !== null && typeof obj === 'object' && typeof obj.pipe === 'function';\n}\nexport function isArrayOfFile(obj, navigatorObj) {\n return Array.isArray(obj) && obj.some(v => isFile(v, navigatorObj));\n}\n\n/**\n * Specialized sub-class of File class, that only\n * accepts string data and retain this data in `data`\n * public property throughout the lifecycle of its instances.\n *\n * This sub-class is exclusively used only when Encoding Object\n * is defined within the Media Type Object (OpenAPI 3.x.y).\n */\nexport class FileWithData extends File {\n constructor(data, name = '', options = {}) {\n super([data], name, options);\n this.data = data;\n }\n valueOf() {\n return this.data;\n }\n toString() {\n return this.valueOf();\n }\n}","const isRfc3986Reserved = char => \":/?#[]@!$&'()*+,;=\".indexOf(char) > -1;\nconst isRfc3986Unreserved = char => /^[a-z0-9\\-._~]+$/i.test(char);\n\n// eslint-disable-next-line default-param-last\nexport function encodeCharacters(str, characterSet = 'reserved') {\n // In ES6 you can do this quite easily by using the new ... spread operator.\n // This causes the string iterator (another new ES6 feature) to be used internally,\n // and because that iterator is designed to deal with\n // code points rather than UCS-2/UTF-16 code units.\n return [...str].map(char => {\n if (isRfc3986Unreserved(char)) {\n return char;\n }\n if (isRfc3986Reserved(char) && characterSet === 'unsafe') {\n return char;\n }\n const encoder = new TextEncoder();\n const encoded = Array.from(encoder.encode(char)).map(byte => `0${byte.toString(16).toUpperCase()}`.slice(-2)).map(encodedByte => `%${encodedByte}`).join('');\n return encoded;\n }).join('');\n}\nexport default function stylize(config) {\n const {\n value\n } = config;\n if (Array.isArray(value)) {\n return encodeArray(config);\n }\n if (typeof value === 'object') {\n return encodeObject(config);\n }\n return encodePrimitive(config);\n}\nexport function valueEncoder(value, escape = false) {\n if (Array.isArray(value) || value !== null && typeof value === 'object') {\n value = JSON.stringify(value);\n } else if (typeof value === 'number' || typeof value === 'boolean') {\n value = String(value);\n }\n if (escape && typeof value === 'string' && value.length > 0) {\n return encodeCharacters(value, escape);\n }\n return value !== null && value !== void 0 ? value : '';\n}\nfunction encodeArray({\n key,\n value,\n style,\n explode,\n escape\n}) {\n if (style === 'simple') {\n return value.map(val => valueEncoder(val, escape)).join(',');\n }\n if (style === 'label') {\n return `.${value.map(val => valueEncoder(val, escape)).join('.')}`;\n }\n if (style === 'matrix') {\n return value.map(val => valueEncoder(val, escape)).reduce((prev, curr) => {\n if (!prev || explode) {\n return `${prev || ''};${key}=${curr}`;\n }\n return `${prev},${curr}`;\n }, '');\n }\n if (style === 'form') {\n const after = explode ? `&${key}=` : ',';\n return value.map(val => valueEncoder(val, escape)).join(after);\n }\n if (style === 'spaceDelimited') {\n const after = explode ? `${key}=` : '';\n return value.map(val => valueEncoder(val, escape)).join(` ${after}`);\n }\n if (style === 'pipeDelimited') {\n const after = explode ? `${key}=` : '';\n return value.map(val => valueEncoder(val, escape)).join(`|${after}`);\n }\n return undefined;\n}\nfunction encodeObject({\n key,\n value,\n style,\n explode,\n escape\n}) {\n const valueKeys = Object.keys(value);\n if (style === 'simple') {\n return valueKeys.reduce((prev, curr) => {\n const val = valueEncoder(value[curr], escape);\n const middleChar = explode ? '=' : ',';\n const prefix = prev ? `${prev},` : '';\n return `${prefix}${curr}${middleChar}${val}`;\n }, '');\n }\n if (style === 'label') {\n return valueKeys.reduce((prev, curr) => {\n const val = valueEncoder(value[curr], escape);\n const middleChar = explode ? '=' : '.';\n const prefix = prev ? `${prev}.` : '.';\n return `${prefix}${curr}${middleChar}${val}`;\n }, '');\n }\n if (style === 'matrix' && explode) {\n return valueKeys.reduce((prev, curr) => {\n const val = valueEncoder(value[curr], escape);\n const prefix = prev ? `${prev};` : ';';\n return `${prefix}${curr}=${val}`;\n }, '');\n }\n if (style === 'matrix') {\n // no explode\n return valueKeys.reduce((prev, curr) => {\n const val = valueEncoder(value[curr], escape);\n const prefix = prev ? `${prev},` : `;${key}=`;\n return `${prefix}${curr},${val}`;\n }, '');\n }\n if (style === 'form') {\n return valueKeys.reduce((prev, curr) => {\n const val = valueEncoder(value[curr], escape);\n const prefix = prev ? `${prev}${explode ? '&' : ','}` : '';\n const separator = explode ? '=' : ',';\n return `${prefix}${curr}${separator}${val}`;\n }, '');\n }\n return undefined;\n}\nfunction encodePrimitive({\n key,\n value,\n style,\n escape\n}) {\n if (style === 'simple') {\n return valueEncoder(value, escape);\n }\n if (style === 'label') {\n return `.${valueEncoder(value, escape)}`;\n }\n if (style === 'matrix') {\n return `;${key}=${valueEncoder(value, escape)}`;\n }\n if (style === 'form') {\n return valueEncoder(value, escape);\n }\n if (style === 'deepObject') {\n return valueEncoder(value, escape);\n }\n return undefined;\n}","import { isFile, isArrayOfFile, FileWithData } from './file.js';\nimport { valueEncoder } from '../../../execute/oas3/style-serializer.js';\nconst STYLE_SEPARATORS = {\n form: ',',\n spaceDelimited: '%20',\n pipeDelimited: '|'\n};\nconst SEPARATORS = {\n csv: ',',\n ssv: '%20',\n tsv: '%09',\n pipes: '|'\n};\n\n// Formats a key-value and returns an array of key-value pairs.\n//\n// Return value example 1: [['color', 'blue']]\n// Return value example 2: [['color', 'blue,black,brown']]\n// Return value example 3: [['color', ['blue', 'black', 'brown']]]\n// Return value example 4: [['color', 'R,100,G,200,B,150']]\n// Return value example 5: [['R', '100'], ['G', '200'], ['B', '150']]\n// Return value example 6: [['color[R]', '100'], ['color[G]', '200'], ['color[B]', '150']]\nexport default function formatKeyValue(key, input, skipEncoding = false) {\n const {\n collectionFormat,\n allowEmptyValue,\n serializationOption,\n encoding\n } = input;\n // `input` can be string\n const value = typeof input === 'object' && !Array.isArray(input) ? input.value : input;\n const encodeFn = skipEncoding ? k => k.toString() : k => encodeURIComponent(k);\n const encodedKey = encodeFn(key);\n if (typeof value === 'undefined' && allowEmptyValue) {\n return [[encodedKey, '']];\n }\n\n // file\n if (isFile(value) || isArrayOfFile(value)) {\n return [[encodedKey, value]];\n }\n\n // for OAS 3 Parameter Object for serialization\n if (serializationOption) {\n return formatKeyValueBySerializationOption(key, value, skipEncoding, serializationOption);\n }\n\n // for OAS 3 Encoding Object\n if (encoding) {\n if ([typeof encoding.style, typeof encoding.explode, typeof encoding.allowReserved].some(type => type !== 'undefined')) {\n const {\n style,\n explode,\n allowReserved\n } = encoding;\n return formatKeyValueBySerializationOption(key, value, skipEncoding, {\n style,\n explode,\n allowReserved\n });\n }\n if (typeof encoding.contentType === 'string') {\n if (encoding.contentType.startsWith('application/json')) {\n // if value is a string, assume value is already a JSON string\n const json = typeof value === 'string' ? value : JSON.stringify(value);\n const encodedJson = encodeFn(json);\n const file = new FileWithData(encodedJson, 'blob', {\n type: encoding.contentType\n });\n return [[encodedKey, file]];\n }\n const encodedData = encodeFn(String(value));\n const blob = new FileWithData(encodedData, 'blob', {\n type: encoding.contentType\n });\n return [[encodedKey, blob]];\n }\n\n // Primitive\n if (typeof value !== 'object') {\n return [[encodedKey, encodeFn(value)]];\n }\n\n // Array of primitives\n if (Array.isArray(value) && value.every(v => typeof v !== 'object')) {\n return [[encodedKey, value.map(encodeFn).join(',')]];\n }\n\n // Array or object\n return [[encodedKey, encodeFn(JSON.stringify(value))]];\n }\n\n // for OAS 2 Parameter Object\n // Primitive\n if (typeof value !== 'object') {\n return [[encodedKey, encodeFn(value)]];\n }\n\n // Array\n if (Array.isArray(value)) {\n if (collectionFormat === 'multi') {\n // In case of multipart/formdata, it is used as array.\n // Otherwise, the caller will convert it to a query by qs.stringify.\n return [[encodedKey, value.map(encodeFn)]];\n }\n return [[encodedKey, value.map(encodeFn).join(SEPARATORS[collectionFormat || 'csv'])]];\n }\n\n // Object\n return [[encodedKey, '']];\n}\nfunction formatKeyValueBySerializationOption(key, value, skipEncoding, serializationOption) {\n const style = serializationOption.style || 'form';\n const explode = typeof serializationOption.explode === 'undefined' ? style === 'form' : serializationOption.explode;\n // eslint-disable-next-line no-nested-ternary\n const escape = skipEncoding ? false : serializationOption && serializationOption.allowReserved ? 'unsafe' : 'reserved';\n const encodeFn = v => valueEncoder(v, escape);\n const encodeKeyFn = skipEncoding ? k => k : k => encodeFn(k);\n\n // Primitive\n if (typeof value !== 'object') {\n return [[encodeKeyFn(key), encodeFn(value)]];\n }\n\n // Array\n if (Array.isArray(value)) {\n if (explode) {\n // In case of multipart/formdata, it is used as array.\n // Otherwise, the caller will convert it to a query by qs.stringify.\n return [[encodeKeyFn(key), value.map(encodeFn)]];\n }\n return [[encodeKeyFn(key), value.map(encodeFn).join(STYLE_SEPARATORS[style])]];\n }\n\n // Object\n if (style === 'deepObject') {\n return Object.keys(value).map(valueKey => [encodeKeyFn(`${key}[${valueKey}]`), encodeFn(value[valueKey])]);\n }\n if (explode) {\n return Object.keys(value).map(valueKey => [encodeKeyFn(valueKey), encodeFn(value[valueKey])]);\n }\n return [[encodeKeyFn(key), Object.keys(value).map(valueKey => [`${encodeKeyFn(valueKey)},${encodeFn(value[valueKey])}`]).join(',')]];\n}","import formatKeyValue from './format.js';\nimport { isFile, isArrayOfFile, FileWithData } from './file.js';\nfunction buildFormData(reqForm) {\n /**\n * Build a new FormData instance, support array as field value\n * OAS2.0 - when collectionFormat is multi\n * OAS3.0 - when explode of Encoding Object is true\n *\n * This function explicitly handles Buffers (for backward compatibility)\n * if provided as a values to FormData. FormData can only handle USVString\n * or Blob.\n *\n * @param {Object} reqForm - ori req.form\n * @return {FormData} - new FormData instance\n */\n return Object.entries(reqForm).reduce((formData, [name, input]) => {\n // eslint-disable-next-line no-restricted-syntax\n for (const [key, value] of formatKeyValue(name, input, true)) {\n if (Array.isArray(value)) {\n // eslint-disable-next-line no-restricted-syntax\n for (const v of value) {\n if (ArrayBuffer.isView(v)) {\n const blob = new Blob([v]);\n formData.append(key, blob);\n } else {\n formData.append(key, v);\n }\n }\n } else if (ArrayBuffer.isView(value)) {\n const blob = new Blob([value]);\n formData.append(key, blob);\n } else {\n formData.append(key, value);\n }\n }\n return formData;\n }, new FormData());\n}\nexport const stringifyQuery = (queryObject, {\n encode = true\n} = {}) => {\n const buildNestedParams = (params, key, value) => {\n if (Array.isArray(value)) {\n value.reduce((acc, v) => buildNestedParams(params, key, v), params);\n } else if (value instanceof Date) {\n params.append(key, value.toISOString());\n } else if (typeof value === 'object') {\n Object.entries(value).reduce((acc, [k, v]) => buildNestedParams(params, `${key}[${k}]`, v), params);\n } else {\n params.append(key, value);\n }\n return params;\n };\n const params = Object.entries(queryObject).reduce((acc, [key, value]) => buildNestedParams(acc, key, value), new URLSearchParams());\n const queryString = String(params);\n return encode ? queryString : decodeURIComponent(queryString);\n};\n\n// Encodes an object using appropriate serializer.\nexport function encodeFormOrQuery(data) {\n /**\n * Encode parameter names and values\n * @param {Object} result - parameter names and values\n * @param {string} parameterName - Parameter name\n * @return {object} encoded parameter names and values\n */\n const encodedQueryObj = Object.keys(data).reduce((result, parameterName) => {\n // eslint-disable-next-line no-restricted-syntax\n for (const [key, value] of formatKeyValue(parameterName, data[parameterName])) {\n if (value instanceof FileWithData) {\n result[key] = value.valueOf();\n } else {\n result[key] = value;\n }\n }\n return result;\n }, {});\n return stringifyQuery(encodedQueryObj, {\n encode: false\n });\n}\n\n// If the request has a `query` object, merge it into the request.url, and delete the object\n// If file and/or multipart, also create FormData instance\nexport function serializeRequest(req = {}) {\n const {\n url = '',\n query,\n form\n } = req;\n const joinSearch = (...strs) => {\n const search = strs.filter(a => a).join('&'); // Only truthy value\n return search ? `?${search}` : ''; // Only add '?' if there is a str\n };\n if (form) {\n const hasFile = Object.keys(form).some(key => {\n const {\n value\n } = form[key];\n return isFile(value) || isArrayOfFile(value);\n });\n const contentType = req.headers['content-type'] || req.headers['Content-Type'];\n if (hasFile || /multipart\\/form-data/i.test(contentType)) {\n const formdata = buildFormData(req.form);\n req.formdata = formdata;\n req.body = formdata;\n } else {\n req.body = encodeFormOrQuery(form);\n }\n delete req.form;\n }\n if (query) {\n const [baseUrl, oriSearch] = url.split('?');\n let newStr = '';\n if (oriSearch) {\n const oriQuery = new URLSearchParams(oriSearch);\n const keysToRemove = Object.keys(query);\n keysToRemove.forEach(key => oriQuery.delete(key));\n newStr = String(oriQuery);\n }\n const finalStr = joinSearch(newStr, encodeFormOrQuery(query));\n req.url = baseUrl + finalStr;\n delete req.query;\n }\n return req;\n}","import jsYaml from 'js-yaml';\nexport const shouldDownloadAsText = (contentType = '') => /(json|xml|yaml|text)\\b/.test(contentType);\nfunction parseBody(body, contentType) {\n if (contentType && (contentType.indexOf('application/json') === 0 || contentType.indexOf('+json') > 0)) {\n return JSON.parse(body);\n }\n return jsYaml.load(body);\n}\nfunction serializeHeaderValue(value) {\n const isMulti = value.includes(', ');\n return isMulti ? value.split(', ') : value;\n}\n\n// Serialize headers into a hash, where mutliple-headers result in an array.\n//\n// eg: Cookie: one\n// Cookie: two\n// = { Cookie: [ \"one\", \"two\" ]\nexport function serializeHeaders(headers = {}) {\n if (typeof headers.entries !== 'function') return {};\n return Array.from(headers.entries()).reduce((acc, [header, value]) => {\n acc[header] = serializeHeaderValue(value);\n return acc;\n }, {});\n}\n\n// Serialize the response, returns a promise with headers and the body part of the hash\nexport function serializeResponse(oriRes, url, {\n loadSpec = false\n} = {}) {\n const res = {\n ok: oriRes.ok,\n url: oriRes.url || url,\n status: oriRes.status,\n statusText: oriRes.statusText,\n headers: serializeHeaders(oriRes.headers)\n };\n const contentType = res.headers['content-type'];\n const useText = loadSpec || shouldDownloadAsText(contentType);\n const getBody = useText ? oriRes.text : oriRes.blob || oriRes.buffer;\n return getBody.call(oriRes).then(body => {\n res.text = body;\n res.data = body;\n if (useText) {\n try {\n const obj = parseBody(body, contentType);\n res.body = obj;\n res.obj = obj;\n } catch (e) {\n res.parseError = e;\n }\n }\n return res;\n });\n}","import '../helpers/fetch-polyfill.node.js';\nimport { serializeRequest } from './serializers/request/index.js';\nimport { serializeResponse } from './serializers/response/index.js';\nexport { serializeResponse as serializeRes };\n\n// Handles fetch-like syntax and the case where there is only one object passed-in\n// (which will have the URL as a property). Also serializes the response.\nexport default async function http(url, request = {}) {\n if (typeof url === 'object') {\n request = url;\n url = request.url;\n }\n request.headers = request.headers || {};\n\n // Serializes query, for convenience\n // Should be the last thing we do, as its hard to mutate the URL with\n // the search string, but much easier to manipulate the req.query object\n request = serializeRequest(request);\n\n // Newlines in header values cause weird error messages from `window.fetch`,\n // so let's message them out.\n // Context: https://stackoverflow.com/a/50709178\n if (request.headers) {\n Object.keys(request.headers).forEach(headerName => {\n const value = request.headers[headerName];\n if (typeof value === 'string') {\n request.headers[headerName] = value.replace(/\\n+/g, ' ');\n }\n });\n }\n\n // Wait for the request interceptor, if it was provided\n // WARNING: don't put anything between this and the request firing unless\n // you have a good reason!\n if (request.requestInterceptor) {\n request = (await request.requestInterceptor(request)) || request;\n }\n\n /**\n * For content-type=multipart/form-data remove content-type from request before fetch,\n * so that correct one with `boundary` is set when request body is different from boundary encoded string.\n */\n const contentType = request.headers['content-type'] || request.headers['Content-Type'];\n if (/multipart\\/form-data/i.test(contentType)) {\n delete request.headers['content-type'];\n delete request.headers['Content-Type'];\n }\n\n // eslint-disable-next-line no-undef\n let res;\n try {\n res = await (request.userFetch || fetch)(request.url, request);\n res = await serializeResponse(res, url, request);\n if (request.responseInterceptor) {\n res = (await request.responseInterceptor(res)) || res;\n }\n } catch (resError) {\n if (!res) {\n // res is completely absent, so we can't construct our own error\n // so we'll just throw the error we got\n throw resError;\n }\n const error = new Error(res.statusText || `response status is ${res.status}`);\n error.status = res.status;\n error.statusCode = res.status;\n error.responseError = resError;\n throw error;\n }\n if (!res.ok) {\n const error = new Error(res.statusText || `response status is ${res.status}`);\n error.status = res.status;\n error.statusCode = res.status;\n error.response = res;\n throw error;\n }\n return res;\n}\n\n// Wrap a http function ( there are otherways to do this, consider this deprecated )\nexport function makeHttp(httpFn, preFetch, postFetch) {\n postFetch = postFetch || (a => a);\n preFetch = preFetch || (a => a);\n return req => {\n if (typeof req === 'string') {\n req = {\n url: req\n };\n }\n req = serializeRequest(req);\n req = preFetch(req);\n return postFetch(httpFn(req));\n };\n}","import Http from '../../http/index.js';\nexport const retrievalURI = options => {\n var _ref, _globalThis$document;\n /**\n * Swagger-UI uses baseDoc instead of url, this helper function exists\n * to allow both.\n *\n * In browser environment, we allow to pass a relative URI Reference,\n * and we resolve it against the document's baseURI before passing it deeper\n * to swagger-client code.\n */\n const {\n baseDoc,\n url\n } = options;\n const retrievalURL = (_ref = baseDoc !== null && baseDoc !== void 0 ? baseDoc : url) !== null && _ref !== void 0 ? _ref : '';\n return typeof ((_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.baseURI) === 'string' ? String(new URL(retrievalURL, globalThis.document.baseURI)) : retrievalURL;\n};\nexport const httpClient = options => {\n const {\n fetch,\n http\n } = options;\n\n // @TODO fetch should be removed, and http used instead\n // provide a default fetch implementation\n return fetch || http || Http;\n};","import mapSpec, { plugins } from '../../specmap/index.js';\nimport { makeFetchJSON } from '../../utils/index.js';\nimport * as optionsUtil from '../../utils/options.js';\nexport default async function resolveGenericStrategy(options) {\n const {\n spec,\n mode,\n allowMetaPatches = true,\n pathDiscriminator,\n modelPropertyMacro,\n parameterMacro,\n requestInterceptor,\n responseInterceptor,\n skipNormalization = false,\n useCircularStructures,\n strategies\n } = options;\n const retrievalURI = optionsUtil.retrievalURI(options);\n const httpClient = optionsUtil.httpClient(options);\n const strategy = strategies.find(strg => strg.match(spec));\n return doResolve(spec);\n async function doResolve(_spec) {\n if (retrievalURI) {\n plugins.refs.docCache[retrievalURI] = _spec;\n }\n\n // Build a json-fetcher ( ie: give it a URL and get json out )\n plugins.refs.fetchJSON = makeFetchJSON(httpClient, {\n requestInterceptor,\n responseInterceptor\n });\n const plugs = [plugins.refs];\n if (typeof parameterMacro === 'function') {\n plugs.push(plugins.parameters);\n }\n if (typeof modelPropertyMacro === 'function') {\n plugs.push(plugins.properties);\n }\n if (mode !== 'strict') {\n plugs.push(plugins.allOf);\n }\n\n // mapSpec is where the hard work happens\n const result = await mapSpec({\n spec: _spec,\n context: {\n baseDoc: retrievalURI\n },\n plugins: plugs,\n allowMetaPatches,\n // allows adding .meta patches, which include adding `$$ref`s to the spec\n pathDiscriminator,\n // for lazy resolution\n parameterMacro,\n modelPropertyMacro,\n useCircularStructures\n });\n if (!skipNormalization) {\n result.spec = strategy.normalize(result.spec);\n }\n return result;\n }\n}","const replaceSpecialCharsWithUnderscore = operationId => operationId.replace(/\\W/gi, '_');\nexport default replaceSpecialCharsWithUnderscore;","import replaceSpecialCharsWithUnderscore from '../replace-special-chars-with-underscore.js';\nexport default function idFromPathMethod(pathName, method, {\n v2OperationIdCompatibilityMode\n} = {}) {\n if (v2OperationIdCompatibilityMode) {\n let res = `${method.toLowerCase()}_${pathName}`.replace(/[\\s!@#$%^&*()_+=[{\\]};:<>|./?,\\\\'\"\"-]/g, '_');\n res = res || `${pathName.substring(1)}_${method}`;\n return res.replace(/((_){2,})/g, '_').replace(/^(_)*/g, '').replace(/([_])*$/g, '');\n }\n return `${method.toLowerCase()}${replaceSpecialCharsWithUnderscore(pathName)}`;\n}","import idFromPathMethod from './id-from-path-method/index.js';\nimport replaceSpecialCharsWithUnderscore from './replace-special-chars-with-underscore.js';\nexport default function opId(operation, pathName, method = '', {\n v2OperationIdCompatibilityMode\n} = {}) {\n if (!operation || typeof operation !== 'object') {\n return null;\n }\n const idWithoutWhitespace = (operation.operationId || '').replace(/\\s/g, '');\n if (idWithoutWhitespace.length) {\n return replaceSpecialCharsWithUnderscore(operation.operationId);\n }\n return idFromPathMethod(pathName, method, {\n v2OperationIdCompatibilityMode\n });\n}","import opId from '../../../helpers/op-id.js';\nexport default function normalize(parsedSpec) {\n const {\n spec\n } = parsedSpec;\n const {\n paths\n } = spec;\n const map = {};\n if (!paths || spec.$$normalized) {\n return parsedSpec;\n }\n\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (const pathName in paths) {\n const path = paths[pathName];\n if (path == null || !['object', 'function'].includes(typeof path)) {\n continue; // eslint-disable-line no-continue\n }\n const pathParameters = path.parameters;\n\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (const method in path) {\n const operation = path[method];\n if (operation == null || !['object', 'function'].includes(typeof operation)) {\n continue; // eslint-disable-line no-continue\n }\n const oid = opId(operation, pathName, method);\n if (oid) {\n if (map[oid]) {\n map[oid].push(operation);\n } else {\n map[oid] = [operation];\n }\n const opList = map[oid];\n if (opList.length > 1) {\n opList.forEach((o, i) => {\n // eslint-disable-next-line no-underscore-dangle\n o.__originalOperationId = o.__originalOperationId || o.operationId;\n o.operationId = `${oid}${i + 1}`;\n });\n } else if (typeof operation.operationId !== 'undefined') {\n // Ensure we always add the normalized operation ID if one already exists\n // ( potentially different, given that we normalize our IDs)\n // ... _back_ to the spec. Otherwise, they might not line up\n const obj = opList[0];\n // eslint-disable-next-line no-underscore-dangle\n obj.__originalOperationId = obj.__originalOperationId || operation.operationId;\n obj.operationId = oid;\n }\n }\n if (method !== 'parameters') {\n // Add inherited consumes, produces, parameters, securities\n const inheritsList = [];\n const toBeInherit = {};\n\n // Global-levels\n // eslint-disable-next-line no-restricted-syntax\n for (const key in spec) {\n if (key === 'produces' || key === 'consumes' || key === 'security') {\n toBeInherit[key] = spec[key];\n inheritsList.push(toBeInherit);\n }\n }\n\n // Path-levels\n if (pathParameters) {\n toBeInherit.parameters = pathParameters;\n inheritsList.push(toBeInherit);\n }\n if (inheritsList.length) {\n // eslint-disable-next-line no-restricted-syntax\n for (const inherits of inheritsList) {\n // eslint-disable-next-line no-restricted-syntax\n for (const inheritName in inherits) {\n if (!operation[inheritName]) {\n operation[inheritName] = inherits[inheritName];\n } else if (inheritName === 'parameters') {\n // eslint-disable-next-line no-restricted-syntax\n for (const param of inherits[inheritName]) {\n const exists = operation[inheritName].some(opParam => opParam.name && opParam.name === param.name || opParam.$ref && opParam.$ref === param.$ref || opParam.$$ref && opParam.$$ref === param.$$ref || opParam === param);\n if (!exists) {\n operation[inheritName].push(param);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n spec.$$normalized = true;\n return parsedSpec;\n}","import resolveGenericStrategy from './resolve.js';\nimport normalize from './normalize.js';\nimport { plugins } from '../../specmap/index.js';\nexport function clearCache() {\n plugins.refs.clearCache();\n}\nconst genericStrategy = {\n name: 'generic',\n match() {\n return true;\n },\n normalize(spec) {\n const {\n spec: normalized\n } = normalize({\n spec\n });\n return normalized;\n },\n async resolve(options) {\n return resolveGenericStrategy(options);\n }\n};\nexport default genericStrategy;","import resolveGenericStrategy from '../generic/resolve.js';\nexport default async function resolveOpenAPI2Strategy(options) {\n return resolveGenericStrategy(options);\n}","export const isOpenAPI2 = spec => {\n try {\n const {\n swagger\n } = spec;\n return swagger === '2.0';\n } catch {\n return false;\n }\n};\nexport const isOpenAPI30 = spec => {\n try {\n const {\n openapi\n } = spec;\n return typeof openapi === 'string' && /^3\\.0\\.(?:[1-9]\\d*|0)$/.test(openapi);\n } catch {\n return false;\n }\n};\nexport const isOpenAPI31 = spec => {\n try {\n const {\n openapi\n } = spec;\n return typeof openapi === 'string' && /^3\\.1\\.(?:[1-9]\\d*|0)$/.test(openapi);\n } catch {\n return false;\n }\n};\nexport const isOpenAPI3 = spec => isOpenAPI30(spec) || isOpenAPI31(spec);\n\n// backward compatibility export\nexport { isOpenAPI2 as isSwagger2 };","import resolveOpenAPI2Strategy from './resolve.js';\nimport normalize from './normalize.js';\nimport { isOpenAPI2 } from '../../../helpers/openapi-predicates.js';\nexport { clearCache } from '../generic/index.js';\nconst openApi2Strategy = {\n name: 'openapi-2',\n match(spec) {\n return isOpenAPI2(spec);\n },\n normalize(spec) {\n const {\n spec: normalized\n } = normalize({\n spec\n });\n return normalized;\n },\n async resolve(options) {\n return resolveOpenAPI2Strategy(options);\n }\n};\nexport default openApi2Strategy;","import resolveGenericStrategy from '../generic/resolve.js';\nexport default async function resolveOpenAPI30Strategy(options) {\n return resolveGenericStrategy(options);\n}","import resolveOpenAPI30Strategy from './resolve.js';\nimport normalize from './normalize.js';\nimport { isOpenAPI30 } from '../../../helpers/openapi-predicates.js';\nexport { clearCache } from '../generic/index.js';\nconst openApi30Strategy = {\n name: 'openapi-3-0',\n match(spec) {\n return isOpenAPI30(spec);\n },\n normalize(spec) {\n const {\n spec: normalized\n } = normalize({\n spec\n });\n return normalized;\n },\n async resolve(options) {\n return resolveOpenAPI30Strategy(options);\n }\n};\nexport default openApi30Strategy;","import { ApiDOMStructuredError } from '@swagger-api/apidom-error';\n\n/**\n * @public\n */\nclass JsonPointerError extends ApiDOMStructuredError {}\nexport default JsonPointerError;","import JsonPointerError from \"./JsonPointerError.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass InvalidJsonPointerError extends JsonPointerError {\n pointer;\n constructor(message, structuredOptions) {\n super(message, structuredOptions);\n if (typeof structuredOptions !== 'undefined') {\n this.pointer = structuredOptions.pointer;\n }\n }\n}\nexport default InvalidJsonPointerError;","import JsonPointerError from \"./JsonPointerError.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass CompilationJsonPointerError extends JsonPointerError {\n tokens;\n constructor(message, structuredOptions) {\n super(message, structuredOptions);\n if (typeof structuredOptions !== 'undefined') {\n this.tokens = [...structuredOptions.tokens];\n }\n }\n}\nexport default CompilationJsonPointerError;","import JsonPointerError from \"./JsonPointerError.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass EvaluationJsonPointerError extends JsonPointerError {\n pointer;\n tokens;\n failedToken;\n failedTokenPosition;\n element;\n constructor(message, structuredOptions) {\n super(message, structuredOptions);\n if (typeof structuredOptions !== 'undefined') {\n this.pointer = structuredOptions.pointer;\n if (Array.isArray(structuredOptions.tokens)) {\n this.tokens = [...structuredOptions.tokens];\n }\n this.failedToken = structuredOptions.failedToken;\n this.failedTokenPosition = structuredOptions.failedTokenPosition;\n this.element = structuredOptions.element;\n }\n }\n}\nexport default EvaluationJsonPointerError;","import { pipe, replace } from 'ramda';\n\n/**\n * @public\n */\nconst escape = pipe(replace(/~/g, '~0'), replace(/\\//g, '~1'), encodeURIComponent);\nexport default escape;","import { pipe, replace } from 'ramda';\n\n/**\n * decodeURIComponent can throw URIError in certain cases like 'c%d'.\n * safeDecodeURIComponent is a safe variant of decodeURIComponent that never trows.\n *\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Malformed_URI|More info about URIError}\n */\nconst safeDecodeURIComponent = encodedURIComponent => {\n try {\n return decodeURIComponent(encodedURIComponent);\n } catch {\n return encodedURIComponent;\n }\n};\n\n/**\n * @public\n */\nconst unescape = pipe(replace(/~1/g, '/'), replace(/~0/g, '~'), safeDecodeURIComponent);\nexport default unescape;","import { map, pipe, split, startsWith, tail } from 'ramda';\nimport { isEmptyString, trimCharsStart } from 'ramda-adjunct';\nimport unescape from \"./unescape.mjs\";\nimport InvalidJsonPointerError from \"./errors/InvalidJsonPointerError.mjs\";\n/**\n * @public\n */\nconst parse = pointer => {\n if (isEmptyString(pointer)) {\n return [];\n }\n if (!startsWith('/', pointer)) {\n throw new InvalidJsonPointerError(`Invalid JSON Pointer \"${pointer}\". JSON Pointers must begin with \"/\"`, {\n pointer\n });\n }\n try {\n const tokens = pipe(split('/'), map(unescape))(pointer);\n return tail(tokens);\n } catch (error) {\n throw new InvalidJsonPointerError(`JSON Pointer parsing of \"${pointer}\" encountered an error.`, {\n pointer,\n cause: error\n });\n }\n};\n\n/**\n * Returns the hash (URL fragment), of the given path.\n * If there is no hash, then the root hash (\"#\") is returned.\n */\nconst getHash = uri => {\n const hashIndex = uri.indexOf('#');\n if (hashIndex !== -1) {\n return uri.substring(hashIndex);\n }\n return '#';\n};\n\n/**\n * @public\n */\nexport const uriToPointer = uri => {\n const hash = getHash(uri);\n return trimCharsStart('#', hash);\n};\nexport default parse;","import escape from \"./escape.mjs\";\nimport CompilationJsonPointerError from \"./errors/CompilationJsonPointerError.mjs\";\n/**\n * @public\n */\nconst compile = tokens => {\n try {\n if (tokens.length === 0) {\n return '';\n }\n return `/${tokens.map(escape).join('/')}`;\n } catch (error) {\n throw new CompilationJsonPointerError('JSON Pointer compilation of tokens encountered an error.', {\n tokens,\n cause: error\n });\n }\n};\nexport default compile;","import { isInteger } from 'ramda-adjunct';\nimport { isObjectElement, isArrayElement, cloneDeep } from '@swagger-api/apidom-core';\nimport parse from \"./parse.mjs\";\nimport EvaluationJsonPointerError from \"./errors/EvaluationJsonPointerError.mjs\";\n/**\n * Evaluates JSON Pointer against ApiDOM fragment.\n * @public\n */\nconst evaluate = (pointer, element) => {\n let tokens;\n try {\n tokens = parse(pointer);\n } catch (error) {\n throw new EvaluationJsonPointerError(`JSON Pointer evaluation failed while parsing the pointer \"${pointer}\".`, {\n pointer,\n element: cloneDeep(element),\n cause: error\n });\n }\n return tokens.reduce((acc, token, tokenPosition) => {\n if (isObjectElement(acc)) {\n // @ts-ignore\n if (!acc.hasKey(token)) {\n throw new EvaluationJsonPointerError(`JSON Pointer evaluation failed while evaluating token \"${token}\" against an ObjectElement`, {\n pointer,\n tokens,\n failedToken: token,\n failedTokenPosition: tokenPosition,\n element: cloneDeep(acc)\n });\n }\n // @ts-ignore\n return acc.get(token);\n }\n if (isArrayElement(acc)) {\n if (!(token in acc.content) || !isInteger(Number(token))) {\n throw new EvaluationJsonPointerError(`JSON Pointer evaluation failed while evaluating token \"${token}\" against an ArrayElement`, {\n pointer,\n tokens,\n failedToken: token,\n failedTokenPosition: tokenPosition,\n element: cloneDeep(acc)\n });\n }\n // @ts-ignore\n return acc.get(Number(token));\n }\n throw new EvaluationJsonPointerError(`JSON Pointer evaluation failed while evaluating token \"${token}\" against an unexpected Element`, {\n pointer,\n tokens,\n failedToken: token,\n failedTokenPosition: tokenPosition,\n element: cloneDeep(acc)\n });\n }, element);\n};\nexport default evaluate;","import { last } from 'ramda';\nimport { MediaTypes } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nexport class OpenAPIMediaTypes extends MediaTypes {\n filterByFormat(format = 'generic') {\n const effectiveFormat = format === 'generic' ? 'openapi;version' : format;\n return this.filter(mediaType => mediaType.includes(effectiveFormat));\n }\n findBy(version = '3.1.0', format = 'generic') {\n const search = format === 'generic' ? `vnd.oai.openapi;version=${version}` : `vnd.oai.openapi+${format};version=${version}`;\n const found = this.find(mediaType => mediaType.includes(search));\n return found || this.unknownMediaType;\n }\n latest(format = 'generic') {\n return last(this.filterByFormat(format));\n }\n}\n\n/**\n * @public\n */\nconst mediaTypes = new OpenAPIMediaTypes('application/vnd.oai.openapi;version=3.1.0', 'application/vnd.oai.openapi+json;version=3.1.0', 'application/vnd.oai.openapi+yaml;version=3.1.0');\nexport default mediaTypes;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Callback extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'callback';\n }\n}\nexport default Callback;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Components extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'components';\n }\n get schemas() {\n return this.get('schemas');\n }\n set schemas(schemas) {\n this.set('schemas', schemas);\n }\n get responses() {\n return this.get('responses');\n }\n set responses(responses) {\n this.set('responses', responses);\n }\n get parameters() {\n return this.get('parameters');\n }\n set parameters(parameters) {\n this.set('parameters', parameters);\n }\n get examples() {\n return this.get('examples');\n }\n set examples(examples) {\n this.set('examples', examples);\n }\n get requestBodies() {\n return this.get('requestBodies');\n }\n set requestBodies(requestBodies) {\n this.set('requestBodies', requestBodies);\n }\n get headers() {\n return this.get('headers');\n }\n set headers(headers) {\n this.set('headers', headers);\n }\n get securitySchemes() {\n return this.get('securitySchemes');\n }\n set securitySchemes(securitySchemes) {\n this.set('securitySchemes', securitySchemes);\n }\n get links() {\n return this.get('links');\n }\n set links(links) {\n this.set('links', links);\n }\n get callbacks() {\n return this.get('callbacks');\n }\n set callbacks(callbacks) {\n this.set('callbacks', callbacks);\n }\n}\nexport default Components;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Contact extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'contact';\n }\n get name() {\n return this.get('name');\n }\n set name(name) {\n this.set('name', name);\n }\n get url() {\n return this.get('url');\n }\n set url(url) {\n this.set('url', url);\n }\n get email() {\n return this.get('email');\n }\n set email(email) {\n this.set('email', email);\n }\n}\nexport default Contact;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Discriminator extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'discriminator';\n }\n get propertyName() {\n return this.get('propertyName');\n }\n set propertyName(propertyName) {\n this.set('propertyName', propertyName);\n }\n get mapping() {\n return this.get('mapping');\n }\n set mapping(mapping) {\n this.set('mapping', mapping);\n }\n}\nexport default Discriminator;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Encoding extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'encoding';\n }\n get contentType() {\n return this.get('contentType');\n }\n set contentType(contentType) {\n this.set('contentType', contentType);\n }\n get headers() {\n return this.get('headers');\n }\n set headers(headers) {\n this.set('headers', headers);\n }\n get style() {\n return this.get('style');\n }\n set style(style) {\n this.set('style', style);\n }\n get explode() {\n return this.get('explode');\n }\n set explode(explode) {\n this.set('explode', explode);\n }\n get allowedReserved() {\n return this.get('allowedReserved');\n }\n set allowedReserved(allowedReserved) {\n this.set('allowedReserved', allowedReserved);\n }\n}\nexport default Encoding;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Example extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'example';\n }\n get summary() {\n return this.get('summary');\n }\n set summary(summary) {\n this.set('summary', summary);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get value() {\n return this.get('value');\n }\n set value(value) {\n this.set('value', value);\n }\n get externalValue() {\n return this.get('externalValue');\n }\n set externalValue(externalValue) {\n this.set('externalValue', externalValue);\n }\n}\nexport default Example;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass ExternalDocumentation extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'externalDocumentation';\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get url() {\n return this.get('url');\n }\n set url(url) {\n this.set('url', url);\n }\n}\nexport default ExternalDocumentation;","import { ObjectElement, BooleanElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass Header extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'header';\n }\n get required() {\n if (this.hasKey('required')) {\n return this.get('required');\n }\n return new BooleanElement(false);\n }\n set required(required) {\n this.set('required', required);\n }\n get deprecated() {\n if (this.hasKey('deprecated')) {\n return this.get('deprecated');\n }\n return new BooleanElement(false);\n }\n set deprecated(deprecated) {\n this.set('deprecated', deprecated);\n }\n get allowEmptyValue() {\n return this.get('allowEmptyValue');\n }\n set allowEmptyValue(allowEmptyValue) {\n this.set('allowEmptyValue', allowEmptyValue);\n }\n get style() {\n return this.get('style');\n }\n set style(style) {\n this.set('style', style);\n }\n get explode() {\n return this.get('explode');\n }\n set explode(explode) {\n this.set('explode', explode);\n }\n get allowReserved() {\n return this.get('allowReserved');\n }\n set allowReserved(allowReserved) {\n this.set('allowReserved', allowReserved);\n }\n get schema() {\n return this.get('schema');\n }\n set schema(schema) {\n this.set('schema', schema);\n }\n get example() {\n return this.get('example');\n }\n set example(example) {\n this.set('example', example);\n }\n get examples() {\n return this.get('examples');\n }\n set examples(examples) {\n this.set('examples', examples);\n }\n get contentProp() {\n return this.get('content');\n }\n set contentProp(content) {\n this.set('content', content);\n }\n}\nObject.defineProperty(Header.prototype, 'description', {\n get() {\n return this.get('description');\n },\n set(description) {\n this.set('description', description);\n },\n enumerable: true\n});\nexport default Header;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass Info extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'info';\n this.classes.push('info');\n }\n get title() {\n return this.get('title');\n }\n set title(title) {\n this.set('title', title);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get termsOfService() {\n return this.get('termsOfService');\n }\n set termsOfService(tos) {\n this.set('termsOfService', tos);\n }\n get contact() {\n return this.get('contact');\n }\n set contact(contactElement) {\n this.set('contact', contactElement);\n }\n get license() {\n return this.get('license');\n }\n set license(licenseElement) {\n this.set('license', licenseElement);\n }\n get version() {\n return this.get('version');\n }\n set version(version) {\n this.set('version', version);\n }\n}\nexport default Info;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass License extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'license';\n }\n get name() {\n return this.get('name');\n }\n set name(name) {\n this.set('name', name);\n }\n get url() {\n return this.get('url');\n }\n set url(url) {\n this.set('url', url);\n }\n}\nexport default License;","import { ObjectElement, isStringElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass Link extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'link';\n }\n get operationRef() {\n return this.get('operationRef');\n }\n set operationRef(operationRef) {\n this.set('operationRef', operationRef);\n }\n get operationId() {\n return this.get('operationId');\n }\n set operationId(operationId) {\n this.set('operationId', operationId);\n }\n get operation() {\n if (isStringElement(this.operationRef)) {\n var _this$operationRef;\n return (_this$operationRef = this.operationRef) === null || _this$operationRef === void 0 ? void 0 : _this$operationRef.meta.get('operation');\n }\n if (isStringElement(this.operationId)) {\n var _this$operationId;\n return (_this$operationId = this.operationId) === null || _this$operationId === void 0 ? void 0 : _this$operationId.meta.get('operation');\n }\n return undefined;\n }\n set operation(operation) {\n this.set('operation', operation);\n }\n get parameters() {\n return this.get('parameters');\n }\n set parameters(parameters) {\n this.set('parameters', parameters);\n }\n get requestBody() {\n return this.get('requestBody');\n }\n set requestBody(requestBody) {\n this.set('requestBody', requestBody);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get server() {\n return this.get('server');\n }\n set server(server) {\n this.set('server', server);\n }\n}\nexport default Link;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass MediaType extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'mediaType';\n }\n get schema() {\n return this.get('schema');\n }\n set schema(schema) {\n this.set('schema', schema);\n }\n get example() {\n return this.get('example');\n }\n set example(example) {\n this.set('example', example);\n }\n get examples() {\n return this.get('examples');\n }\n set examples(examples) {\n this.set('examples', examples);\n }\n get encoding() {\n return this.get('encoding');\n }\n set encoding(encoding) {\n this.set('encoding', encoding);\n }\n}\nexport default MediaType;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass OAuthFlow extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'oAuthFlow';\n }\n get authorizationUrl() {\n return this.get('authorizationUrl');\n }\n set authorizationUrl(authorizationUrl) {\n this.set('authorizationUrl', authorizationUrl);\n }\n get tokenUrl() {\n return this.get('tokenUrl');\n }\n set tokenUrl(tokenUrl) {\n this.set('tokenUrl', tokenUrl);\n }\n get refreshUrl() {\n return this.get('refreshUrl');\n }\n set refreshUrl(refreshUrl) {\n this.set('refreshUrl', refreshUrl);\n }\n get scopes() {\n return this.get('scopes');\n }\n set scopes(scopes) {\n this.set('scopes', scopes);\n }\n}\nexport default OAuthFlow;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass OAuthFlows extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'oAuthFlows';\n }\n get implicit() {\n return this.get('implicit');\n }\n set implicit(implicit) {\n this.set('implicit', implicit);\n }\n get password() {\n return this.get('password');\n }\n set password(password) {\n this.set('password', password);\n }\n get clientCredentials() {\n return this.get('clientCredentials');\n }\n set clientCredentials(clientCredentials) {\n this.set('clientCredentials', clientCredentials);\n }\n get authorizationCode() {\n return this.get('authorizationCode');\n }\n set authorizationCode(authorizationCode) {\n this.set('authorizationCode', authorizationCode);\n }\n}\nexport default OAuthFlows;","import { StringElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Openapi extends StringElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'openapi';\n this.classes.push('spec-version');\n this.classes.push('version');\n }\n}\nexport default Openapi;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass OpenApi3_0 extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'openApi3_0';\n this.classes.push('api');\n }\n get openapi() {\n return this.get('openapi');\n }\n set openapi(openapi) {\n this.set('openapi', openapi);\n }\n get info() {\n return this.get('info');\n }\n set info(info) {\n this.set('info', info);\n }\n get servers() {\n return this.get('servers');\n }\n set servers(servers) {\n this.set('servers', servers);\n }\n get paths() {\n return this.get('paths');\n }\n set paths(paths) {\n this.set('paths', paths);\n }\n get components() {\n return this.get('components');\n }\n set components(components) {\n this.set('components', components);\n }\n get security() {\n return this.get('security');\n }\n set security(security) {\n this.set('security', security);\n }\n get tags() {\n return this.get('tags');\n }\n set tags(tags) {\n this.set('tags', tags);\n }\n get externalDocs() {\n return this.get('externalDocs');\n }\n set externalDocs(externalDocs) {\n this.set('externalDocs', externalDocs);\n }\n}\nexport default OpenApi3_0;","import { ObjectElement, BooleanElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass Operation extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'operation';\n }\n get tags() {\n return this.get('tags');\n }\n set tags(tags) {\n this.set('tags', tags);\n }\n get summary() {\n return this.get('summary');\n }\n set summary(description) {\n this.set('summary', description);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n set externalDocs(externalDocs) {\n this.set('externalDocs', externalDocs);\n }\n get externalDocs() {\n return this.get('externalDocs');\n }\n get operationId() {\n return this.get('operationId');\n }\n set operationId(operationId) {\n this.set('operationId', operationId);\n }\n get parameters() {\n return this.get('parameters');\n }\n set parameters(parameters) {\n this.set('parameters', parameters);\n }\n get requestBody() {\n return this.get('requestBody');\n }\n set requestBody(requestBody) {\n this.set('requestBody', requestBody);\n }\n get responses() {\n return this.get('responses');\n }\n set responses(responses) {\n this.set('responses', responses);\n }\n get callbacks() {\n return this.get('callbacks');\n }\n set callbacks(callbacks) {\n this.set('callbacks', callbacks);\n }\n get deprecated() {\n if (this.hasKey('deprecated')) {\n return this.get('deprecated');\n }\n return new BooleanElement(false);\n }\n set deprecated(deprecated) {\n this.set('deprecated', deprecated);\n }\n get security() {\n return this.get('security');\n }\n set security(security) {\n this.set('security', security);\n }\n get servers() {\n return this.get('severs');\n }\n set servers(servers) {\n this.set('servers', servers);\n }\n}\nexport default Operation;","import { ObjectElement, BooleanElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass Parameter extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'parameter';\n }\n get name() {\n return this.get('name');\n }\n set name(name) {\n this.set('name', name);\n }\n get in() {\n return this.get('in');\n }\n set in(val) {\n this.set('in', val);\n }\n get required() {\n if (this.hasKey('required')) {\n return this.get('required');\n }\n return new BooleanElement(false);\n }\n set required(required) {\n this.set('required', required);\n }\n get deprecated() {\n if (this.hasKey('deprecated')) {\n return this.get('deprecated');\n }\n return new BooleanElement(false);\n }\n set deprecated(deprecated) {\n this.set('deprecated', deprecated);\n }\n get allowEmptyValue() {\n return this.get('allowEmptyValue');\n }\n set allowEmptyValue(allowEmptyValue) {\n this.set('allowEmptyValue', allowEmptyValue);\n }\n get style() {\n return this.get('style');\n }\n set style(style) {\n this.set('style', style);\n }\n get explode() {\n return this.get('explode');\n }\n set explode(explode) {\n this.set('explode', explode);\n }\n get allowReserved() {\n return this.get('allowReserved');\n }\n set allowReserved(allowReserved) {\n this.set('allowReserved', allowReserved);\n }\n get schema() {\n return this.get('schema');\n }\n set schema(schema) {\n this.set('schema', schema);\n }\n get example() {\n return this.get('example');\n }\n set example(example) {\n this.set('example', example);\n }\n get examples() {\n return this.get('examples');\n }\n set examples(examples) {\n this.set('examples', examples);\n }\n get contentProp() {\n return this.get('content');\n }\n set contentProp(content) {\n this.set('content', content);\n }\n}\nObject.defineProperty(Parameter.prototype, 'description', {\n get() {\n return this.get('description');\n },\n set(description) {\n this.set('description', description);\n },\n enumerable: true\n});\nexport default Parameter;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass PathItem extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'pathItem';\n }\n get $ref() {\n return this.get('$ref');\n }\n set $ref($ref) {\n this.set('$ref', $ref);\n }\n get summary() {\n return this.get('summary');\n }\n set summary(summary) {\n this.set('summary', summary);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get GET() {\n return this.get('get');\n }\n set GET(operation) {\n this.set('GET', operation);\n }\n get PUT() {\n return this.get('put');\n }\n set PUT(operation) {\n this.set('PUT', operation);\n }\n get POST() {\n return this.get('post');\n }\n set POST(operation) {\n this.set('POST', operation);\n }\n get DELETE() {\n return this.get('delete');\n }\n set DELETE(operation) {\n this.set('DELETE', operation);\n }\n get OPTIONS() {\n return this.get('options');\n }\n set OPTIONS(operation) {\n this.set('OPTIONS', operation);\n }\n get HEAD() {\n return this.get('head');\n }\n set HEAD(operation) {\n this.set('HEAD', operation);\n }\n get PATCH() {\n return this.get('patch');\n }\n set PATCH(operation) {\n this.set('PATCH', operation);\n }\n get TRACE() {\n return this.get('trace');\n }\n set TRACE(operation) {\n this.set('TRACE', operation);\n }\n get servers() {\n return this.get('servers');\n }\n set servers(servers) {\n this.set('servers', servers);\n }\n get parameters() {\n return this.get('parameters');\n }\n set parameters(parameters) {\n this.set('parameters', parameters);\n }\n}\nexport default PathItem;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Paths extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'paths';\n }\n}\nexport default Paths;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Reference extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'reference';\n this.classes.push('openapi-reference');\n }\n get $ref() {\n return this.get('$ref');\n }\n set $ref($ref) {\n this.set('$ref', $ref);\n }\n}\nexport default Reference;","import { ObjectElement, BooleanElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass RequestBody extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'requestBody';\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get contentProp() {\n return this.get('content');\n }\n set contentProp(content) {\n this.set('content', content);\n }\n get required() {\n if (this.hasKey('required')) {\n return this.get('required');\n }\n return new BooleanElement(false);\n }\n set required(required) {\n this.set('required', required);\n }\n}\nexport default RequestBody;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Response extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'response';\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get headers() {\n return this.get('headers');\n }\n set headers(headers) {\n this.set('headers', headers);\n }\n get contentProp() {\n return this.get('content');\n }\n set contentProp(contentProp) {\n this.set('content', contentProp);\n }\n get links() {\n return this.get('links');\n }\n set links(links) {\n this.set('links', links);\n }\n}\nexport default Response;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass Responses extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'responses';\n }\n get default() {\n return this.get('default');\n }\n set default(defaultValue) {\n this.set('default', defaultValue);\n }\n}\nexport default Responses;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass JSONSchema extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'JSONSchemaDraft4';\n }\n\n /**\n * Core vocabulary\n *\n * URI: https://tools.ietf.org/html/draft-wright-json-schema-00\n */\n\n get idProp() {\n return this.get('id');\n }\n set idProp(idProp) {\n this.set('id', idProp);\n }\n get $schema() {\n return this.get('$schema');\n }\n set $schema($schema) {\n this.set('$schema', $schema);\n }\n\n /**\n * Validation vocabulary\n *\n * URI: https://tools.ietf.org/html/draft-wright-json-schema-validation-00\n */\n\n /**\n * Validation keywords for numeric instances (number and integer)\n */\n\n get multipleOf() {\n return this.get('multipleOf');\n }\n set multipleOf(multipleOf) {\n this.set('multipleOf', multipleOf);\n }\n get maximum() {\n return this.get('maximum');\n }\n set maximum(maximum) {\n this.set('maximum', maximum);\n }\n get exclusiveMaximum() {\n return this.get('exclusiveMaximum');\n }\n set exclusiveMaximum(exclusiveMaximum) {\n this.set('exclusiveMaximum', exclusiveMaximum);\n }\n get minimum() {\n return this.get('minimum');\n }\n set minimum(minimum) {\n this.set('minimum', minimum);\n }\n get exclusiveMinimum() {\n return this.get('exclusiveMinimum');\n }\n set exclusiveMinimum(exclusiveMinimum) {\n this.set('exclusiveMinimum', exclusiveMinimum);\n }\n\n /**\n * Validation keywords for strings\n */\n\n get maxLength() {\n return this.get('maxLength');\n }\n set maxLength(maxLength) {\n this.set('maxLength', maxLength);\n }\n get minLength() {\n return this.get('minLength');\n }\n set minLength(minLength) {\n this.set('minLength', minLength);\n }\n get pattern() {\n return this.get('pattern');\n }\n set pattern(pattern) {\n this.set('pattern', pattern);\n }\n\n /**\n * Validation keywords for arrays\n */\n\n get additionalItems() {\n return this.get('additionalItems');\n }\n set additionalItems(additionalItems) {\n this.set('additionalItems', additionalItems);\n }\n get items() {\n return this.get('items');\n }\n set items(items) {\n this.set('items', items);\n }\n get maxItems() {\n return this.get('maxItems');\n }\n set maxItems(maxItems) {\n this.set('maxItems', maxItems);\n }\n get minItems() {\n return this.get('minItems');\n }\n set minItems(minItems) {\n this.set('minItems', minItems);\n }\n get uniqueItems() {\n return this.get('uniqueItems');\n }\n set uniqueItems(uniqueItems) {\n this.set('uniqueItems', uniqueItems);\n }\n\n /**\n * Validation keywords for objects\n */\n\n get maxProperties() {\n return this.get('maxProperties');\n }\n set maxProperties(maxProperties) {\n this.set('maxProperties', maxProperties);\n }\n get minProperties() {\n return this.get('minProperties');\n }\n set minProperties(minProperties) {\n this.set('minProperties', minProperties);\n }\n get required() {\n return this.get('required');\n }\n set required(required) {\n this.set('required', required);\n }\n get properties() {\n return this.get('properties');\n }\n set properties(properties) {\n this.set('properties', properties);\n }\n get additionalProperties() {\n return this.get('additionalProperties');\n }\n set additionalProperties(additionalProperties) {\n this.set('additionalProperties', additionalProperties);\n }\n get patternProperties() {\n return this.get('patternProperties');\n }\n set patternProperties(patternProperties) {\n this.set('patternProperties', patternProperties);\n }\n get dependencies() {\n return this.get('dependencies');\n }\n set dependencies(dependencies) {\n this.set('dependencies', dependencies);\n }\n\n /**\n * Validation keywords for any instance type\n */\n\n get enum() {\n return this.get('enum');\n }\n set enum(enumValue) {\n this.set('enum', enumValue);\n }\n get type() {\n return this.get('type');\n }\n set type(type) {\n this.set('type', type);\n }\n get allOf() {\n return this.get('allOf');\n }\n set allOf(allOf) {\n this.set('allOf', allOf);\n }\n get anyOf() {\n return this.get('anyOf');\n }\n set anyOf(anyOf) {\n this.set('anyOf', anyOf);\n }\n get oneOf() {\n return this.get('oneOf');\n }\n set oneOf(oneOf) {\n this.set('oneOf', oneOf);\n }\n get not() {\n return this.get('not');\n }\n set not(not) {\n this.set('not', not);\n }\n get definitions() {\n return this.get('definitions');\n }\n set definitions(definitions) {\n this.set('definitions', definitions);\n }\n\n /**\n * Metadata keywords\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-6\n */\n\n get title() {\n return this.get('title');\n }\n set title(title) {\n this.set('title', title);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get default() {\n return this.get('default');\n }\n set default(defaultValue) {\n this.set('default', defaultValue);\n }\n\n /**\n * Semantic validation with \"format\"\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-7\n */\n\n get format() {\n return this.get('format');\n }\n set format(format) {\n this.set('format', format);\n }\n\n /**\n * JSON Hyper-Schema\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00\n */\n\n get base() {\n return this.get('base');\n }\n set base(base) {\n this.set('base', base);\n }\n get links() {\n return this.get('links');\n }\n set links(links) {\n this.set('links', links);\n }\n get media() {\n return this.get('media');\n }\n set media(media) {\n this.set('media', media);\n }\n get readOnly() {\n return this.get('readOnly');\n }\n set readOnly(readOnly) {\n this.set('readOnly', readOnly);\n }\n}\nexport default JSONSchema;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * In Draft 4, $ref behaves a little differently. When an object contains a $ref property,\n * the object is considered a reference, not a schema. Therefore, any other properties you put in that object will\n * not be treated as JSON Schema keywords and will be ignored by the validator.\n * $ref can only be used where a schema is expected.\n *\n * URI: https://json-schema.org/understanding-json-schema/structuring.html?highlight=ref#id18\n * @public\n */\n\nclass JSONReference extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'JSONReference';\n this.classes.push('json-reference');\n }\n get $ref() {\n return this.get('$ref');\n }\n set $ref($ref) {\n this.set('$ref', $ref);\n }\n}\nexport default JSONReference;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00#section-4.3\n * @public\n */\n\nclass Media extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'media';\n }\n get binaryEncoding() {\n return this.get('binaryEncoding');\n }\n set binaryEncoding(binaryEncoding) {\n this.set('binaryEncoding', binaryEncoding);\n }\n get type() {\n return this.get('type');\n }\n set type(type) {\n this.set('type', type);\n }\n}\nexport default Media;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00#section-5\n * @public\n */\n\nclass LinkDescription extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'linkDescription';\n }\n get href() {\n return this.get('href');\n }\n set href(href) {\n this.set('href', href);\n }\n get rel() {\n return this.get('rel');\n }\n set rel(rel) {\n this.set('rel', rel);\n }\n get title() {\n return this.get('title');\n }\n set title(title) {\n this.set('title', title);\n }\n get targetSchema() {\n return this.get('targetSchema');\n }\n set targetSchema(targetSchema) {\n this.set('targetSchema', targetSchema);\n }\n get mediaType() {\n return this.get('mediaType');\n }\n set mediaType(mediaType) {\n this.set('mediaType', mediaType);\n }\n get method() {\n return this.get('method');\n }\n set method(method) {\n this.set('method', method);\n }\n get encType() {\n return this.get('encType');\n }\n set encType(encType) {\n this.set('encType', encType);\n }\n get schema() {\n return this.get('schema');\n }\n set schema(schema) {\n this.set('schema', schema);\n }\n}\nexport default LinkDescription;","import JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport JSONReferenceElement from \"./elements/JSONReference.mjs\";\nimport MediaElement from \"./elements/Media.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\n/**\n * @public\n */\nconst jsonSchemaDraft4 = {\n namespace: options => {\n const {\n base\n } = options;\n base.register('jSONSchemaDraft4', JSONSchemaElement);\n base.register('jSONReference', JSONReferenceElement);\n base.register('media', MediaElement);\n base.register('linkDescription', LinkDescriptionElement);\n return base;\n }\n};\nexport default jsonSchemaDraft4;","import { keyMap as keyMapBase, isElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nexport const getNodeType = element => {\n if (!isElement(element)) {\n return undefined;\n }\n return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;\n};\n\n/**\n * @public\n */\nexport const keyMap = {\n JSONSchemaDraft4Element: ['content'],\n JSONReferenceElement: ['content'],\n MediaElement: ['content'],\n LinkDescriptionElement: ['content'],\n ...keyMapBase\n};","import { hasElementSourceMap, deepmerge } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass Visitor {\n element;\n constructor(options) {\n Object.assign(this, options);\n }\n\n // eslint-disable-next-line class-methods-use-this\n copyMetaAndAttributes(from, to) {\n if (from.meta.length > 0 || to.meta.length > 0) {\n // eslint-disable-next-line no-param-reassign\n to.meta = deepmerge(to.meta, from.meta);\n if (hasElementSourceMap(from)) {\n // avoid deep merging of source maps\n to.meta.set('sourceMap', from.meta.get('sourceMap'));\n }\n }\n if (from.attributes.length > 0 || from.meta.length > 0) {\n // eslint-disable-next-line no-param-reassign\n to.attributes = deepmerge(to.attributes, from.attributes);\n }\n }\n}\nexport default Visitor;","import { BREAK, cloneDeep } from '@swagger-api/apidom-core';\nimport Visitor from \"./Visitor.mjs\";\n/**\n * This visitor is responsible for falling back to current traversed element\n * Given JSONSchemaVisitor expects ObjectElement to be traversed. If\n * different Element is provided FallBackVisitor is responsible to assigning\n * this Element as current element.\n * @public\n */\n/**\n * @public\n */\nclass FallbackVisitor extends Visitor {\n enter(element) {\n this.element = cloneDeep(element);\n return BREAK;\n }\n}\nexport default FallbackVisitor;","/**\n * Utility function that works like `Object.apply`, but copies getters and setters properly as well. Additionally gives\n * the option to exclude properties by name.\n */\nconst copyProps = (dest, src, exclude = []) => {\n const props = Object.getOwnPropertyDescriptors(src);\n for (let prop of exclude) delete props[prop];\n Object.defineProperties(dest, props);\n};\n/**\n * Returns the full chain of prototypes up until Object.prototype given a starting object. The order of prototypes will\n * be closest to farthest in the chain.\n */\nconst protoChain = (obj, currentChain = [obj]) => {\n const proto = Object.getPrototypeOf(obj);\n if (proto === null) return currentChain;\n return protoChain(proto, [...currentChain, proto]);\n};\n/**\n * Identifies the nearest ancestor common to all the given objects in their prototype chains. For most unrelated\n * objects, this function should return Object.prototype.\n */\nconst nearestCommonProto = (...objs) => {\n if (objs.length === 0) return undefined;\n let commonProto = undefined;\n const protoChains = objs.map(obj => protoChain(obj));\n while (protoChains.every(protoChain => protoChain.length > 0)) {\n const protos = protoChains.map(protoChain => protoChain.pop());\n const potentialCommonProto = protos[0];\n if (protos.every(proto => proto === potentialCommonProto)) commonProto = potentialCommonProto;else break;\n }\n return commonProto;\n};\n/**\n * Creates a new prototype object that is a mixture of the given prototypes. The mixing is achieved by first\n * identifying the nearest common ancestor and using it as the prototype for a new object. Then all properties/methods\n * downstream of this prototype (ONLY downstream) are copied into the new object.\n *\n * The resulting prototype is more performant than softMixProtos(...), as well as ES5 compatible. However, it's not as\n * flexible as updates to the source prototypes aren't captured by the mixed result. See softMixProtos for why you may\n * want to use that instead.\n */\nconst hardMixProtos = (ingredients, constructor, exclude = []) => {\n var _a;\n const base = (_a = nearestCommonProto(...ingredients)) !== null && _a !== void 0 ? _a : Object.prototype;\n const mixedProto = Object.create(base);\n // Keeps track of prototypes we've already visited to avoid copying the same properties multiple times. We init the\n // list with the proto chain below the nearest common ancestor because we don't want any of those methods mixed in\n // when they will already be accessible via prototype access.\n const visitedProtos = protoChain(base);\n for (let prototype of ingredients) {\n let protos = protoChain(prototype);\n // Apply the prototype chain in reverse order so that old methods don't override newer ones.\n for (let i = protos.length - 1; i >= 0; i--) {\n let newProto = protos[i];\n if (visitedProtos.indexOf(newProto) === -1) {\n copyProps(mixedProto, newProto, ['constructor', ...exclude]);\n visitedProtos.push(newProto);\n }\n }\n }\n mixedProto.constructor = constructor;\n return mixedProto;\n};\nconst unique = arr => arr.filter((e, i) => arr.indexOf(e) == i);\n\n/**\n * Finds the ingredient with the given prop, searching in reverse order and breadth-first if searching ingredient\n * prototypes is required.\n */\nconst getIngredientWithProp = (prop, ingredients) => {\n const protoChains = ingredients.map(ingredient => protoChain(ingredient));\n // since we search breadth-first, we need to keep track of our depth in the prototype chains\n let protoDepth = 0;\n // not all prototype chains are the same depth, so this remains true as long as at least one of the ingredients'\n // prototype chains has an object at this depth\n let protosAreLeftToSearch = true;\n while (protosAreLeftToSearch) {\n // with the start of each horizontal slice, we assume this is the one that's deeper than any of the proto chains\n protosAreLeftToSearch = false;\n // scan through the ingredients right to left\n for (let i = ingredients.length - 1; i >= 0; i--) {\n const searchTarget = protoChains[i][protoDepth];\n if (searchTarget !== undefined && searchTarget !== null) {\n // if we find something, this is proof that this horizontal slice potentially more objects to search\n protosAreLeftToSearch = true;\n // eureka, we found it\n if (Object.getOwnPropertyDescriptor(searchTarget, prop) != undefined) {\n return protoChains[i][0];\n }\n }\n }\n protoDepth++;\n }\n return undefined;\n};\n/**\n * \"Mixes\" ingredients by wrapping them in a Proxy. The optional prototype argument allows the mixed object to sit\n * downstream of an existing prototype chain. Note that \"properties\" cannot be added, deleted, or modified.\n */\nconst proxyMix = (ingredients, prototype = Object.prototype) => new Proxy({}, {\n getPrototypeOf() {\n return prototype;\n },\n setPrototypeOf() {\n throw Error('Cannot set prototype of Proxies created by ts-mixer');\n },\n getOwnPropertyDescriptor(_, prop) {\n return Object.getOwnPropertyDescriptor(getIngredientWithProp(prop, ingredients) || {}, prop);\n },\n defineProperty() {\n throw new Error('Cannot define new properties on Proxies created by ts-mixer');\n },\n has(_, prop) {\n return getIngredientWithProp(prop, ingredients) !== undefined || prototype[prop] !== undefined;\n },\n get(_, prop) {\n return (getIngredientWithProp(prop, ingredients) || prototype)[prop];\n },\n set(_, prop, val) {\n const ingredientWithProp = getIngredientWithProp(prop, ingredients);\n if (ingredientWithProp === undefined) throw new Error('Cannot set new properties on Proxies created by ts-mixer');\n ingredientWithProp[prop] = val;\n return true;\n },\n deleteProperty() {\n throw new Error('Cannot delete properties on Proxies created by ts-mixer');\n },\n ownKeys() {\n return ingredients.map(Object.getOwnPropertyNames).reduce((prev, curr) => curr.concat(prev.filter(key => curr.indexOf(key) < 0)));\n }\n});\n/**\n * Creates a new proxy-prototype object that is a \"soft\" mixture of the given prototypes. The mixing is achieved by\n * proxying all property access to the ingredients. This is not ES5 compatible and less performant. However, any\n * changes made to the source prototypes will be reflected in the proxy-prototype, which may be desirable.\n */\nconst softMixProtos = (ingredients, constructor) => proxyMix([...ingredients, {\n constructor\n}]);\nconst settings = {\n initFunction: null,\n staticsStrategy: 'copy',\n prototypeStrategy: 'copy',\n decoratorInheritance: 'deep'\n};\n\n// Keeps track of constituent classes for every mixin class created by ts-mixer.\nconst mixins = new WeakMap();\nconst getMixinsForClass = clazz => mixins.get(clazz);\nconst registerMixins = (mixedClass, constituents) => mixins.set(mixedClass, constituents);\nconst hasMixin = (instance, mixin) => {\n if (instance instanceof mixin) return true;\n const constructor = instance.constructor;\n const visited = new Set();\n let frontier = new Set();\n frontier.add(constructor);\n while (frontier.size > 0) {\n // check if the frontier has the mixin we're looking for. if not, we can say we visited every item in the frontier\n if (frontier.has(mixin)) return true;\n frontier.forEach(item => visited.add(item));\n // build a new frontier based on the associated mixin classes and prototype chains of each frontier item\n const newFrontier = new Set();\n frontier.forEach(item => {\n var _a;\n const itemConstituents = (_a = mixins.get(item)) !== null && _a !== void 0 ? _a : protoChain(item.prototype).map(proto => proto.constructor).filter(item => item !== null);\n if (itemConstituents) itemConstituents.forEach(constituent => {\n if (!visited.has(constituent) && !frontier.has(constituent)) newFrontier.add(constituent);\n });\n });\n // we have a new frontier, now search again\n frontier = newFrontier;\n }\n // if we get here, we couldn't find the mixin anywhere in the prototype chain or associated mixin classes\n return false;\n};\nconst mergeObjectsOfDecorators = (o1, o2) => {\n var _a, _b;\n const allKeys = unique([...Object.getOwnPropertyNames(o1), ...Object.getOwnPropertyNames(o2)]);\n const mergedObject = {};\n for (let key of allKeys) mergedObject[key] = unique([...((_a = o1 === null || o1 === void 0 ? void 0 : o1[key]) !== null && _a !== void 0 ? _a : []), ...((_b = o2 === null || o2 === void 0 ? void 0 : o2[key]) !== null && _b !== void 0 ? _b : [])]);\n return mergedObject;\n};\nconst mergePropertyAndMethodDecorators = (d1, d2) => {\n var _a, _b, _c, _d;\n return {\n property: mergeObjectsOfDecorators((_a = d1 === null || d1 === void 0 ? void 0 : d1.property) !== null && _a !== void 0 ? _a : {}, (_b = d2 === null || d2 === void 0 ? void 0 : d2.property) !== null && _b !== void 0 ? _b : {}),\n method: mergeObjectsOfDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.method) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.method) !== null && _d !== void 0 ? _d : {})\n };\n};\nconst mergeDecorators = (d1, d2) => {\n var _a, _b, _c, _d, _e, _f;\n return {\n class: unique([...((_a = d1 === null || d1 === void 0 ? void 0 : d1.class) !== null && _a !== void 0 ? _a : []), ...((_b = d2 === null || d2 === void 0 ? void 0 : d2.class) !== null && _b !== void 0 ? _b : [])]),\n static: mergePropertyAndMethodDecorators((_c = d1 === null || d1 === void 0 ? void 0 : d1.static) !== null && _c !== void 0 ? _c : {}, (_d = d2 === null || d2 === void 0 ? void 0 : d2.static) !== null && _d !== void 0 ? _d : {}),\n instance: mergePropertyAndMethodDecorators((_e = d1 === null || d1 === void 0 ? void 0 : d1.instance) !== null && _e !== void 0 ? _e : {}, (_f = d2 === null || d2 === void 0 ? void 0 : d2.instance) !== null && _f !== void 0 ? _f : {})\n };\n};\nconst decorators = new Map();\nconst findAllConstituentClasses = (...classes) => {\n var _a;\n const allClasses = new Set();\n const frontier = new Set([...classes]);\n while (frontier.size > 0) {\n for (let clazz of frontier) {\n const protoChainClasses = protoChain(clazz.prototype).map(proto => proto.constructor);\n const mixinClasses = (_a = getMixinsForClass(clazz)) !== null && _a !== void 0 ? _a : [];\n const potentiallyNewClasses = [...protoChainClasses, ...mixinClasses];\n const newClasses = potentiallyNewClasses.filter(c => !allClasses.has(c));\n for (let newClass of newClasses) frontier.add(newClass);\n allClasses.add(clazz);\n frontier.delete(clazz);\n }\n }\n return [...allClasses];\n};\nconst deepDecoratorSearch = (...classes) => {\n const decoratorsForClassChain = findAllConstituentClasses(...classes).map(clazz => decorators.get(clazz)).filter(decorators => !!decorators);\n if (decoratorsForClassChain.length == 0) return {};\n if (decoratorsForClassChain.length == 1) return decoratorsForClassChain[0];\n return decoratorsForClassChain.reduce((d1, d2) => mergeDecorators(d1, d2));\n};\nconst directDecoratorSearch = (...classes) => {\n const classDecorators = classes.map(clazz => getDecoratorsForClass(clazz));\n if (classDecorators.length === 0) return {};\n if (classDecorators.length === 1) return classDecorators[0];\n return classDecorators.reduce((d1, d2) => mergeDecorators(d1, d2));\n};\nconst getDecoratorsForClass = clazz => {\n let decoratorsForClass = decorators.get(clazz);\n if (!decoratorsForClass) {\n decoratorsForClass = {};\n decorators.set(clazz, decoratorsForClass);\n }\n return decoratorsForClass;\n};\nconst decorateClass = decorator => clazz => {\n const decoratorsForClass = getDecoratorsForClass(clazz);\n let classDecorators = decoratorsForClass.class;\n if (!classDecorators) {\n classDecorators = [];\n decoratorsForClass.class = classDecorators;\n }\n classDecorators.push(decorator);\n return decorator(clazz);\n};\nconst decorateMember = decorator => (object, key, ...otherArgs) => {\n var _a, _b, _c;\n const decoratorTargetType = typeof object === 'function' ? 'static' : 'instance';\n const decoratorType = typeof object[key] === 'function' ? 'method' : 'property';\n const clazz = decoratorTargetType === 'static' ? object : object.constructor;\n const decoratorsForClass = getDecoratorsForClass(clazz);\n const decoratorsForTargetType = (_a = decoratorsForClass === null || decoratorsForClass === void 0 ? void 0 : decoratorsForClass[decoratorTargetType]) !== null && _a !== void 0 ? _a : {};\n decoratorsForClass[decoratorTargetType] = decoratorsForTargetType;\n let decoratorsForType = (_b = decoratorsForTargetType === null || decoratorsForTargetType === void 0 ? void 0 : decoratorsForTargetType[decoratorType]) !== null && _b !== void 0 ? _b : {};\n decoratorsForTargetType[decoratorType] = decoratorsForType;\n let decoratorsForKey = (_c = decoratorsForType === null || decoratorsForType === void 0 ? void 0 : decoratorsForType[key]) !== null && _c !== void 0 ? _c : [];\n decoratorsForType[key] = decoratorsForKey;\n // @ts-ignore: array is type `A[] | B[]` and item is type `A | B`, so technically a type error, but it's fine\n decoratorsForKey.push(decorator);\n // @ts-ignore\n return decorator(object, key, ...otherArgs);\n};\nconst decorate = decorator => (...args) => {\n if (args.length === 1) return decorateClass(decorator)(args[0]);\n return decorateMember(decorator)(...args);\n};\nfunction Mixin(...constructors) {\n var _a, _b, _c;\n const prototypes = constructors.map(constructor => constructor.prototype);\n // Here we gather up the init functions of the ingredient prototypes, combine them into one init function, and\n // attach it to the mixed class prototype. The reason we do this is because we want the init functions to mix\n // similarly to constructors -- not methods, which simply override each other.\n const initFunctionName = settings.initFunction;\n if (initFunctionName !== null) {\n const initFunctions = prototypes.map(proto => proto[initFunctionName]).filter(func => typeof func === 'function');\n const combinedInitFunction = function (...args) {\n for (let initFunction of initFunctions) initFunction.apply(this, args);\n };\n const extraProto = {\n [initFunctionName]: combinedInitFunction\n };\n prototypes.push(extraProto);\n }\n function MixedClass(...args) {\n for (const constructor of constructors)\n // @ts-ignore: potentially abstract class\n copyProps(this, new constructor(...args));\n if (initFunctionName !== null && typeof this[initFunctionName] === 'function') this[initFunctionName].apply(this, args);\n }\n MixedClass.prototype = settings.prototypeStrategy === 'copy' ? hardMixProtos(prototypes, MixedClass) : softMixProtos(prototypes, MixedClass);\n Object.setPrototypeOf(MixedClass, settings.staticsStrategy === 'copy' ? hardMixProtos(constructors, null, ['prototype']) : proxyMix(constructors, Function.prototype));\n let DecoratedMixedClass = MixedClass;\n if (settings.decoratorInheritance !== 'none') {\n const classDecorators = settings.decoratorInheritance === 'deep' ? deepDecoratorSearch(...constructors) : directDecoratorSearch(...constructors);\n for (let decorator of (_a = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.class) !== null && _a !== void 0 ? _a : []) {\n const result = decorator(DecoratedMixedClass);\n if (result) {\n DecoratedMixedClass = result;\n }\n }\n applyPropAndMethodDecorators((_b = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.static) !== null && _b !== void 0 ? _b : {}, DecoratedMixedClass);\n applyPropAndMethodDecorators((_c = classDecorators === null || classDecorators === void 0 ? void 0 : classDecorators.instance) !== null && _c !== void 0 ? _c : {}, DecoratedMixedClass.prototype);\n }\n registerMixins(DecoratedMixedClass, constructors);\n return DecoratedMixedClass;\n}\nconst applyPropAndMethodDecorators = (propAndMethodDecorators, target) => {\n const propDecorators = propAndMethodDecorators.property;\n const methodDecorators = propAndMethodDecorators.method;\n if (propDecorators) for (let key in propDecorators) for (let decorator of propDecorators[key]) decorator(target, key);\n if (methodDecorators) for (let key in methodDecorators) for (let decorator of methodDecorators[key]) decorator(target, key, Object.getOwnPropertyDescriptor(target, key));\n};\n/**\n * A decorator version of the `Mixin` function. You'll want to use this instead of `Mixin` for mixing generic classes.\n */\nconst mix = (...ingredients) => decoratedClass => {\n // @ts-ignore\n const mixedClass = Mixin(...ingredients.concat([decoratedClass]));\n Object.defineProperty(mixedClass, 'name', {\n value: decoratedClass.name,\n writable: false\n });\n return mixedClass;\n};\nexport { Mixin, decorate, hasMixin, mix, settings };","import { pathSatisfies, path, pick } from 'ramda';\nimport { isFunction } from 'ramda-adjunct';\nimport { visit, cloneDeep } from '@swagger-api/apidom-core';\nimport Visitor from \"./Visitor.mjs\";\nimport FallbackVisitor from \"./FallbackVisitor.mjs\";\n/**\n * This is a base Type for every visitor that does\n * internal look-ups to retrieve other child visitors.\n * @public\n */\n/**\n * @public\n */\nclass SpecificationVisitor extends Visitor {\n specObj;\n passingOptionsNames = ['specObj', 'parent'];\n constructor({\n specObj,\n ...rest\n }) {\n super({\n ...rest\n });\n this.specObj = specObj;\n }\n retrievePassingOptions() {\n return pick(this.passingOptionsNames, this);\n }\n retrieveFixedFields(specPath) {\n const fixedFields = path(['visitors', ...specPath, 'fixedFields'], this.specObj);\n if (typeof fixedFields === 'object' && fixedFields !== null) {\n return Object.keys(fixedFields);\n }\n return [];\n }\n retrieveVisitor(specPath) {\n if (pathSatisfies(isFunction, ['visitors', ...specPath], this.specObj)) {\n return path(['visitors', ...specPath], this.specObj);\n }\n return path(['visitors', ...specPath, '$visitor'], this.specObj);\n }\n retrieveVisitorInstance(specPath, options = {}) {\n const passingOpts = this.retrievePassingOptions();\n const VisitorClz = this.retrieveVisitor(specPath);\n const visitorOpts = {\n ...passingOpts,\n ...options\n };\n return new VisitorClz(visitorOpts);\n }\n toRefractedElement(specPath, element, options = {}) {\n /**\n * This is `Visitor shortcut`: mechanism for short-circuiting the traversal and replacing\n * it by basic node cloning.\n *\n * Visiting the element is equivalent to cloning it if the prototype of a visitor\n * is the same as the prototype of FallbackVisitor. If that's the case, we can avoid\n * bootstrapping the traversal cycle for fields that don't require any special visiting.\n */\n const visitor = this.retrieveVisitorInstance(specPath, options);\n if (visitor instanceof FallbackVisitor && (visitor === null || visitor === void 0 ? void 0 : visitor.constructor) === FallbackVisitor) {\n return cloneDeep(element);\n }\n visit(element, visitor, options);\n return visitor.element;\n }\n}\nexport default SpecificationVisitor;","import { isStringElement, MemberElement, BREAK, cloneDeep, toValue } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nclass FixedFieldsVisitor extends SpecificationVisitor {\n specPath;\n ignoredFields;\n constructor({\n specPath,\n ignoredFields,\n ...rest\n }) {\n super({\n ...rest\n });\n this.specPath = specPath;\n this.ignoredFields = ignoredFields || [];\n }\n ObjectElement(objectElement) {\n const specPath = this.specPath(objectElement);\n const fields = this.retrieveFixedFields(specPath);\n\n // @ts-ignore\n objectElement.forEach((value, key, memberElement) => {\n if (isStringElement(key) && fields.includes(toValue(key)) && !this.ignoredFields.includes(toValue(key))) {\n const fixedFieldElement = this.toRefractedElement([...specPath, 'fixedFields', toValue(key)], value);\n const newMemberElement = new MemberElement(cloneDeep(key), fixedFieldElement);\n this.copyMetaAndAttributes(memberElement, newMemberElement);\n newMemberElement.classes.push('fixed-field');\n this.element.content.push(newMemberElement);\n } else if (!this.ignoredFields.includes(toValue(key))) {\n this.element.content.push(cloneDeep(memberElement));\n }\n });\n this.copyMetaAndAttributes(objectElement, this.element);\n return BREAK;\n }\n}\nexport default FixedFieldsVisitor;","/**\n * @public\n */\n\n/**\n * @public\n */\nclass ParentSchemaAwareVisitor {\n parent;\n constructor({\n parent\n }) {\n this.parent = parent;\n }\n}\nexport default ParentSchemaAwareVisitor;","import { createPredicate } from '@swagger-api/apidom-core';\nimport JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport JSONReferenceElement from \"./elements/JSONReference.mjs\";\nimport MediaElement from \"./elements/Media.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\n/**\n * @public\n */\nexport const isJSONSchemaElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof JSONSchemaElement || hasBasicElementProps(element) && isElementType('JSONSchemaDraft4', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isJSONReferenceElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof JSONReferenceElement || hasBasicElementProps(element) && isElementType('JSONReference', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isMediaElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof MediaElement || hasBasicElementProps(element) && isElementType('media', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isLinkDescriptionElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LinkDescriptionElement || hasBasicElementProps(element) && isElementType('linkDescription', element) && primitiveEq('object', element);\n});","import { Mixin } from 'ts-mixer';\nimport { always, defaultTo } from 'ramda';\nimport { isNonEmptyString, isUndefined } from 'ramda-adjunct';\nimport { ArrayElement, isStringElement, cloneDeep, toValue } from '@swagger-api/apidom-core';\nimport FixedFieldsVisitor from \"../generics/FixedFieldsVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport JSONSchemaElement from \"../../../elements/JSONSchema.mjs\";\nimport { isJSONSchemaElement } from \"../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass JSONSchemaVisitor extends Mixin(FixedFieldsVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new JSONSchemaElement();\n this.specPath = always(['document', 'objects', 'JSONSchema']);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get defaultDialectIdentifier() {\n return 'http://json-schema.org/draft-04/schema#';\n }\n ObjectElement(objectElement) {\n this.handleDialectIdentifier(objectElement);\n this.handleSchemaIdentifier(objectElement);\n\n // for further processing consider this JSONSchema Element as parent for all sub-schemas\n this.parent = this.element;\n return FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n }\n handleDialectIdentifier(objectElement) {\n // handle $schema keyword in embedded resources\n if (isUndefined(this.parent) && !isStringElement(objectElement.get('$schema'))) {\n // no parent available and no $schema is defined, set default $schema\n this.element.setMetaProperty('inheritedDialectIdentifier', this.defaultDialectIdentifier);\n } else if (isJSONSchemaElement(this.parent) && !isStringElement(objectElement.get('$schema'))) {\n // parent is available and no $schema is defined, set parent $schema\n const inheritedDialectIdentifier = defaultTo(toValue(this.parent.meta.get('inheritedDialectIdentifier')), toValue(this.parent.$schema));\n this.element.setMetaProperty('inheritedDialectIdentifier', inheritedDialectIdentifier);\n }\n }\n handleSchemaIdentifier(objectElement, identifierKeyword = 'id') {\n // handle schema identifier in embedded resources\n // fetch parent's ancestorsSchemaIdentifiers\n const ancestorsSchemaIdentifiers = this.parent !== undefined ? cloneDeep(this.parent.getMetaProperty('ancestorsSchemaIdentifiers', [])) : new ArrayElement();\n // get current schema identifier\n const schemaIdentifier = toValue(objectElement.get(identifierKeyword));\n\n // remember schema identifier if it's a non-empty strings\n if (isNonEmptyString(schemaIdentifier)) {\n ancestorsSchemaIdentifiers.push(schemaIdentifier);\n }\n this.element.setMetaProperty('ancestorsSchemaIdentifiers', ancestorsSchemaIdentifiers);\n }\n}\nexport default JSONSchemaVisitor;","import { isObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\n\n// eslint-disable-next-line import/prefer-default-export\n/**\n * @public\n */\nexport const isJSONReferenceLikeElement = element => {\n return isObjectElement(element) && element.hasKey('$ref');\n};","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ItemsVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n ObjectElement(objectElement) {\n const specPath = isJSONReferenceLikeElement(objectElement) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n this.element = this.toRefractedElement(specPath, objectElement);\n return BREAK;\n }\n ArrayElement(arrayElement) {\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-items');\n arrayElement.forEach(item => {\n const specPath = isJSONReferenceLikeElement(item) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n const element = this.toRefractedElement(specPath, item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default ItemsVisitor;","import FallbackVisitor from \"../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass RequiredVisitor extends FallbackVisitor {\n ArrayElement(arrayElement) {\n const result = this.enter(arrayElement);\n this.element.classes.push('json-schema-required');\n return result;\n }\n}\nexport default RequiredVisitor;","import { F as stubFalse } from 'ramda';\nimport { MemberElement, BREAK, cloneDeep, toValue } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass PatternedFieldsVisitor extends SpecificationVisitor {\n specPath;\n ignoredFields;\n fieldPatternPredicate = stubFalse;\n constructor({\n specPath,\n ignoredFields,\n fieldPatternPredicate,\n ...rest\n }) {\n super({\n ...rest\n });\n this.specPath = specPath;\n this.ignoredFields = ignoredFields || [];\n if (typeof fieldPatternPredicate === 'function') {\n this.fieldPatternPredicate = fieldPatternPredicate;\n }\n }\n ObjectElement(objectElement) {\n // @ts-ignore\n objectElement.forEach((value, key, memberElement) => {\n if (!this.ignoredFields.includes(toValue(key)) && this.fieldPatternPredicate(toValue(key))) {\n const specPath = this.specPath(value);\n const patternedFieldElement = this.toRefractedElement(specPath, value);\n const newMemberElement = new MemberElement(cloneDeep(key), patternedFieldElement);\n this.copyMetaAndAttributes(memberElement, newMemberElement);\n newMemberElement.classes.push('patterned-field');\n this.element.content.push(newMemberElement);\n } else if (!this.ignoredFields.includes(toValue(key))) {\n this.element.content.push(cloneDeep(memberElement));\n }\n });\n this.copyMetaAndAttributes(objectElement, this.element);\n return BREAK;\n }\n}\nexport default PatternedFieldsVisitor;","import { isNonEmptyString } from 'ramda-adjunct';\nimport PatternedFieldsVisitor from \"./PatternedFieldsVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass MapVisitor extends PatternedFieldsVisitor {\n constructor(options) {\n super(options);\n this.fieldPatternPredicate = isNonEmptyString;\n }\n}\nexport default MapVisitor;","import { Mixin } from 'ts-mixer';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport MapVisitor from \"../generics/MapVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass PropertiesVisitor extends Mixin(MapVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('json-schema-properties');\n this.specPath = element => isJSONReferenceLikeElement(element) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n }\n}\nexport default PropertiesVisitor;","import { Mixin } from 'ts-mixer';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport MapVisitor from \"../generics/MapVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass PatternPropertiesVisitor extends Mixin(MapVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('json-schema-patternProperties');\n this.specPath = element => isJSONReferenceLikeElement(element) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n }\n}\nexport default PatternPropertiesVisitor;","import { Mixin } from 'ts-mixer';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport MapVisitor from \"../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass DependenciesVisitor extends Mixin(MapVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('json-schema-dependencies');\n this.specPath = element => isJSONReferenceLikeElement(element) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n }\n}\nexport default DependenciesVisitor;","import FallbackVisitor from \"../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass EnumVisitor extends FallbackVisitor {\n ArrayElement(arrayElement) {\n const result = this.enter(arrayElement);\n this.element.classes.push('json-schema-enum');\n return result;\n }\n}\nexport default EnumVisitor;","import FallbackVisitor from \"../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass TypeVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = this.enter(stringElement);\n this.element.classes.push('json-schema-type');\n return result;\n }\n ArrayElement(arrayElement) {\n const result = this.enter(arrayElement);\n this.element.classes.push('json-schema-type');\n return result;\n }\n}\nexport default TypeVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass AllOfVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-allOf');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const specPath = isJSONReferenceLikeElement(item) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n const element = this.toRefractedElement(specPath, item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default AllOfVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass AnyOfVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-anyOf');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const specPath = isJSONReferenceLikeElement(item) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n const element = this.toRefractedElement(specPath, item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default AnyOfVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass OneOfVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-oneOf');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const specPath = isJSONReferenceLikeElement(item) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n const element = this.toRefractedElement(specPath, item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default OneOfVisitor;","import { Mixin } from 'ts-mixer';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport MapVisitor from \"../generics/MapVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass DefinitionsVisitor extends Mixin(MapVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('json-schema-definitions');\n this.specPath = element => isJSONReferenceLikeElement(element) ? ['document', 'objects', 'JSONReference'] : ['document', 'objects', 'JSONSchema'];\n }\n}\nexport default DefinitionsVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport ParentSchemaAwareVisitor from \"./ParentSchemaAwareVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass LinksVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-links');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const linkDescriptionElement = this.toRefractedElement(['document', 'objects', 'LinkDescription'], item);\n this.element.push(linkDescriptionElement);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default LinksVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isStringElement } from '@swagger-api/apidom-core';\nimport JSONReferenceElement from \"../../../../elements/JSONReference.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass JSONReferenceVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new JSONReferenceElement();\n this.specPath = always(['document', 'objects', 'JSONReference']);\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // mark this JSONReferenceElement with reference metadata\n if (isStringElement(this.element.$ref)) {\n this.element.classes.push('reference-element');\n }\n return result;\n }\n}\nexport default JSONReferenceVisitor;","import FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass $RefVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = this.enter(stringElement);\n this.element.classes.push('reference-value');\n return result;\n }\n}\nexport default $RefVisitor;","import { ifElse, always } from 'ramda';\nimport { dispatch, stubUndefined } from 'ramda-adjunct';\nimport { BREAK } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nclass AlternatingVisitor extends SpecificationVisitor {\n alternator;\n constructor({\n alternator,\n ...rest\n }) {\n super({\n ...rest\n });\n this.alternator = alternator;\n }\n enter(element) {\n const functions = this.alternator.map(({\n predicate,\n specPath\n }) => ifElse(predicate, always(specPath), stubUndefined));\n const specPath = dispatch(functions)(element);\n this.element = this.toRefractedElement(specPath, element);\n return BREAK;\n }\n}\nexport default AlternatingVisitor;","import { T as stubTrue } from 'ramda';\nimport { isJSONReferenceLikeElement } from \"../../predicates.mjs\";\nimport AlternatingVisitor from \"../generics/AlternatingVisitor.mjs\";\n/**\n * @public\n */\nclass SchemaOrReferenceVisitor extends AlternatingVisitor {\n constructor(options) {\n super(options);\n this.alternator = [{\n predicate: isJSONReferenceLikeElement,\n specPath: ['document', 'objects', 'JSONReference']\n }, {\n predicate: stubTrue,\n specPath: ['document', 'objects', 'JSONSchema']\n }];\n }\n}\nexport default SchemaOrReferenceVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport MediaElement from \"../../../../elements/Media.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass MediaVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new MediaElement();\n this.specPath = always(['document', 'objects', 'Media']);\n }\n}\nexport default MediaVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport LinkDescriptionElement from \"../../../../elements/LinkDescription.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass LinkDescriptionVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new LinkDescriptionElement();\n this.specPath = always(['document', 'objects', 'LinkDescription']);\n }\n}\nexport default LinkDescriptionVisitor;","import FallbackVisitor from \"./visitors/FallbackVisitor.mjs\";\nimport JSONSchemaVisitor from \"./visitors/json-schema/index.mjs\";\nimport JSONSchemaItemsVisitor from \"./visitors/json-schema/ItemsVisitor.mjs\";\nimport JSONSchemaRequiredVisitor from \"./visitors/json-schema/RequiredVisitor.mjs\";\nimport JSONSchemaPropertiesVisitor from \"./visitors/json-schema/PropertiesVisitor.mjs\";\nimport JSONSchemaPatternPropertiesVisitor from \"./visitors/json-schema/PatternPropertiesVisitor.mjs\";\nimport JSONSchemaDependenciesVisitor from \"./visitors/json-schema/DependenciesVisitor.mjs\";\nimport JSONSchemaEnumVisitor from \"./visitors/json-schema/EnumVisitor.mjs\";\nimport JSONSchemaTypeVisitor from \"./visitors/json-schema/TypeVisitor.mjs\";\nimport JSONSchemaAllOfVisitor from \"./visitors/json-schema/AllOfVisitor.mjs\";\nimport JSONSchemaAnyOfVisitor from \"./visitors/json-schema/AnyOfVisitor.mjs\";\nimport JSONSchemaOneOfVisitor from \"./visitors/json-schema/OneOfVisitor.mjs\";\nimport JSONSchemaDefinitionsVisitor from \"./visitors/json-schema/DefinitionsVisitor.mjs\";\nimport JSONSchemaLinksVisitor from \"./visitors/json-schema/LinksVisitor.mjs\";\nimport JSONReferenceVisitor from \"./visitors/json-schema/json-reference/index.mjs\";\nimport JSONReference$RefVisitor from \"./visitors/json-schema/json-reference/$RefVisitor.mjs\";\nimport JSONSchemaOrJSONReferenceVisitor from \"./visitors/json-schema/JSONSchemaOrJSONReferenceVisitor.mjs\";\nimport MediaVisitor from \"./visitors/json-schema/media/index.mjs\";\nimport LinkDescriptionVisitor from \"./visitors/json-schema/link-description/index.mjs\";\n/**\n * Specification object allows us to have complete control over visitors\n * when traversing the ApiDOM.\n * Specification also allows us to create amended refractors from\n * existing ones by manipulating it.\n *\n * Note: Specification object allows to use absolute internal JSON pointers.\n * @public\n */\nconst specification = {\n visitors: {\n value: FallbackVisitor,\n JSONSchemaOrJSONReferenceVisitor,\n document: {\n objects: {\n JSONSchema: {\n $visitor: JSONSchemaVisitor,\n fixedFields: {\n // core vocabulary\n id: {\n $ref: '#/visitors/value'\n },\n $schema: {\n $ref: '#/visitors/value'\n },\n // validation vocabulary\n // validation keywords for numeric instances (number and integer)\n multipleOf: {\n $ref: '#/visitors/value'\n },\n maximum: {\n $ref: '#/visitors/value'\n },\n exclusiveMaximum: {\n $ref: '#/visitors/value'\n },\n minimum: {\n $ref: '#/visitors/value'\n },\n exclusiveMinimum: {\n $ref: '#/visitors/value'\n },\n // validation keywords for strings\n maxLength: {\n $ref: '#/visitors/value'\n },\n minLength: {\n $ref: '#/visitors/value'\n },\n pattern: {\n $ref: '#/visitors/value'\n },\n // validation keywords for arrays\n additionalItems: JSONSchemaOrJSONReferenceVisitor,\n items: JSONSchemaItemsVisitor,\n maxItems: {\n $ref: '#/visitors/value'\n },\n minItems: {\n $ref: '#/visitors/value'\n },\n uniqueItems: {\n $ref: '#/visitors/value'\n },\n // validation keywords for objects\n maxProperties: {\n $ref: '#/visitors/value'\n },\n minProperties: {\n $ref: '#/visitors/value'\n },\n required: JSONSchemaRequiredVisitor,\n properties: JSONSchemaPropertiesVisitor,\n additionalProperties: JSONSchemaOrJSONReferenceVisitor,\n patternProperties: JSONSchemaPatternPropertiesVisitor,\n dependencies: JSONSchemaDependenciesVisitor,\n // validation keywords for any instance type\n enum: JSONSchemaEnumVisitor,\n type: JSONSchemaTypeVisitor,\n allOf: JSONSchemaAllOfVisitor,\n anyOf: JSONSchemaAnyOfVisitor,\n oneOf: JSONSchemaOneOfVisitor,\n not: JSONSchemaOrJSONReferenceVisitor,\n definitions: JSONSchemaDefinitionsVisitor,\n // metadata keywords\n title: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n default: {\n $ref: '#/visitors/value'\n },\n // semantic validation with \"format\"\n format: {\n $ref: '#/visitors/value'\n },\n // JSON Hyper-Schema\n base: {\n $ref: '#/visitors/value'\n },\n links: JSONSchemaLinksVisitor,\n media: {\n $ref: '#/visitors/document/objects/Media'\n },\n readOnly: {\n $ref: '#/visitors/value'\n }\n }\n },\n JSONReference: {\n $visitor: JSONReferenceVisitor,\n fixedFields: {\n $ref: JSONReference$RefVisitor\n }\n },\n Media: {\n $visitor: MediaVisitor,\n fixedFields: {\n binaryEncoding: {\n $ref: '#/visitors/value'\n },\n type: {\n $ref: '#/visitors/value'\n }\n }\n },\n LinkDescription: {\n $visitor: LinkDescriptionVisitor,\n fixedFields: {\n href: {\n $ref: '#/visitors/value'\n },\n rel: {\n $ref: '#/visitors/value'\n },\n title: {\n $ref: '#/visitors/value'\n },\n targetSchema: JSONSchemaOrJSONReferenceVisitor,\n mediaType: {\n $ref: '#/visitors/value'\n },\n method: {\n $ref: '#/visitors/value'\n },\n encType: {\n $ref: '#/visitors/value'\n },\n schema: JSONSchemaOrJSONReferenceVisitor\n }\n }\n }\n }\n }\n};\nexport default specification;","import { createNamespace, isStringElement } from '@swagger-api/apidom-core';\nimport * as jsonSchemaDraft4Predicates from \"../predicates.mjs\";\nimport jsonSchemaDraft4Namespace from \"../namespace.mjs\";\nconst createToolbox = () => {\n const namespace = createNamespace(jsonSchemaDraft4Namespace);\n const predicates = {\n ...jsonSchemaDraft4Predicates,\n isStringElement\n };\n return {\n predicates,\n namespace\n };\n};\nexport default createToolbox;","import { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';\nimport { path } from 'ramda';\nimport specification from \"./specification.mjs\";\nimport { keyMap, getNodeType } from \"../traversal/visitor.mjs\";\nimport createToolbox from \"./toolbox.mjs\";\n/**\n * @public\n */\nconst refract = (value, {\n specPath = ['visitors', 'document', 'objects', 'JSONSchema', '$visitor'],\n plugins = [],\n specificationObj = specification\n} = {}) => {\n const element = baseRefract(value);\n const resolvedSpec = dereference(specificationObj);\n\n /**\n * This is where generic ApiDOM becomes semantic (namespace applied).\n * We don't allow consumers to hook into this translation.\n * Though we allow consumers to define their onw plugins on already transformed ApiDOM.\n */\n const RootVisitorClass = path(specPath, resolvedSpec);\n const rootVisitor = new RootVisitorClass({\n specObj: resolvedSpec\n });\n visit(element, rootVisitor);\n\n /**\n * Running plugins visitors means extra single traversal === performance hit.\n */\n return dispatchRefractorPlugins(rootVisitor.element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n keyMap,\n nodeTypeGetter: getNodeType\n }\n });\n};\n\n/**\n * @public\n */\nexport const createRefractor = specPath => (value, options = {}) => refract(value, {\n specPath,\n ...options\n});\nexport default refract;","import JSONSchemaElement from \"../elements/JSONSchema.mjs\";\nimport JSONReferenceElement from \"../elements/JSONReference.mjs\";\nimport MediaElement from \"../elements/Media.mjs\";\nimport LinkDescriptionElement from \"../elements/LinkDescription.mjs\";\nimport { createRefractor } from \"./index.mjs\"; // register refractors specific to element types\nJSONSchemaElement.refract = createRefractor(['visitors', 'document', 'objects', 'JSONSchema', '$visitor']);\nJSONReferenceElement.refract = createRefractor(['visitors', 'document', 'objects', 'JSONReference', '$visitor']);\nMediaElement.refract = createRefractor(['visitors', 'document', 'objects', 'Media', '$visitor']);\nLinkDescriptionElement.refract = createRefractor(['visitors', 'document', 'objects', 'LinkDescription', '$visitor']);\nexport { JSONSchemaElement, JSONReferenceElement, MediaElement, LinkDescriptionElement };","import { UnsupportedOperationError } from '@swagger-api/apidom-error';\nimport { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';\n/* eslint-disable class-methods-use-this */\n/**\n * @public\n */\nclass Schema extends JSONSchemaElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'schema';\n this.classes.push('json-schema-draft-4');\n }\n\n /**\n * Core vocabulary\n *\n * URI: https://tools.ietf.org/html/draft-wright-json-schema-00\n */\n get idProp() {\n throw new UnsupportedOperationError('idProp getter in Schema class is not not supported.');\n }\n set idProp(idProps) {\n throw new UnsupportedOperationError('idProp setter in Schema class is not not supported.');\n }\n get $schema() {\n throw new UnsupportedOperationError('$schema getter in Schema class is not not supported.');\n }\n set $schema($schema) {\n throw new UnsupportedOperationError('$schema setter in Schema class is not not supported.');\n }\n\n /**\n * Validation keywords for arrays\n */\n\n get additionalItems() {\n return this.get('additionalItems');\n }\n set additionalItems(additionalItems) {\n this.set('additionalItems', additionalItems);\n }\n get items() {\n return this.get('items');\n }\n set items(items) {\n this.set('items', items);\n }\n\n /**\n * Validation keywords for objects\n */\n\n get additionalProperties() {\n return this.get('additionalProperties');\n }\n set additionalProperties(additionalProperties) {\n this.set('additionalProperties', additionalProperties);\n }\n get patternProperties() {\n throw new UnsupportedOperationError('patternProperties getter in Schema class is not not supported.');\n }\n set patternProperties(patternProperties) {\n throw new UnsupportedOperationError('patternProperties setter in Schema class is not not supported.');\n }\n get dependencies() {\n throw new UnsupportedOperationError('dependencies getter in Schema class is not not supported.');\n }\n set dependencies(dependencies) {\n throw new UnsupportedOperationError('dependencies setter in Schema class is not not supported.');\n }\n\n /**\n * Validation keywords for any instance type\n */\n\n get type() {\n return this.get('type');\n }\n set type(type) {\n this.set('type', type);\n }\n get not() {\n return this.get('not');\n }\n set not(not) {\n this.set('not', not);\n }\n get definitions() {\n throw new UnsupportedOperationError('definitions getter in Schema class is not not supported.');\n }\n set definitions(definitions) {\n throw new UnsupportedOperationError('definitions setter in Schema class is not not supported.');\n }\n\n /**\n * JSON Hyper-Schema\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-00\n */\n\n get base() {\n throw new UnsupportedOperationError('base getter in Schema class is not not supported.');\n }\n set base(base) {\n throw new UnsupportedOperationError('base setter in Schema class is not not supported.');\n }\n get links() {\n throw new UnsupportedOperationError('links getter in Schema class is not not supported.');\n }\n set links(links) {\n throw new UnsupportedOperationError('links setter in Schema class is not not supported.');\n }\n get media() {\n throw new UnsupportedOperationError('media getter in Schema class is not not supported.');\n }\n set media(media) {\n throw new UnsupportedOperationError('media setter in Schema class is not not supported.');\n }\n\n /**\n * OpenAPI vocabulary\n */\n\n get nullable() {\n return this.get('nullable');\n }\n set nullable(nullable) {\n this.set('nullable', nullable);\n }\n get discriminator() {\n return this.get('discriminator');\n }\n set discriminator(discriminator) {\n this.set('discriminator', discriminator);\n }\n get writeOnly() {\n return this.get('writeOnly');\n }\n set writeOnly(writeOnly) {\n this.set('writeOnly', writeOnly);\n }\n get xml() {\n return this.get('xml');\n }\n set xml(xml) {\n this.set('xml', xml);\n }\n get externalDocs() {\n return this.get('externalDocs');\n }\n set externalDocs(externalDocs) {\n this.set('externalDocs', externalDocs);\n }\n get example() {\n return this.get('example');\n }\n set example(example) {\n this.set('example', example);\n }\n get deprecated() {\n return this.get('deprecated');\n }\n set deprecated(deprecated) {\n this.set('deprecated', deprecated);\n }\n}\n/* eslint-disable class-methods-use-this */\n\nexport default Schema;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass SecurityRequirement extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'securityRequirement';\n }\n}\nexport default SecurityRequirement;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass SecurityScheme extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'securityScheme';\n }\n get type() {\n return this.get('type');\n }\n set type(type) {\n this.set('type', type);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get name() {\n return this.get('name');\n }\n set name(name) {\n this.set('name', name);\n }\n get in() {\n return this.get('in');\n }\n set in(inVal) {\n this.set('in', inVal);\n }\n get scheme() {\n return this.get('scheme');\n }\n set scheme(scheme) {\n this.set('scheme', scheme);\n }\n get bearerFormat() {\n return this.get('bearerFormat');\n }\n set bearerFormat(bearerFormat) {\n this.set('bearerFormat', bearerFormat);\n }\n get flows() {\n return this.get('flows');\n }\n set flows(flows) {\n this.set('flows', flows);\n }\n get openIdConnectUrl() {\n return this.get('openIdConnectUrl');\n }\n set openIdConnectUrl(openIdConnectUrl) {\n this.set('openIdConnectUrl', openIdConnectUrl);\n }\n}\nexport default SecurityScheme;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Server extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'server';\n }\n get url() {\n return this.get('url');\n }\n set url(url) {\n this.set('url', url);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get variables() {\n return this.get('variables');\n }\n set variables(variables) {\n this.set('variables', variables);\n }\n}\nexport default Server;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass ServerVariable extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'serverVariable';\n }\n get enum() {\n return this.get('enum');\n }\n set enum(value) {\n this.set('enum', value);\n }\n get default() {\n return this.get('default');\n }\n set default(value) {\n this.set('default', value);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n}\nexport default ServerVariable;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\nclass Tag extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'tag';\n }\n get name() {\n return this.get('name');\n }\n set name(name) {\n this.set('name', name);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get externalDocs() {\n return this.get('externalDocs');\n }\n set externalDocs(externalDocs) {\n this.set('externalDocs', externalDocs);\n }\n}\nexport default Tag;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass Xml extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'xml';\n }\n get name() {\n return this.get('name');\n }\n set name(name) {\n this.set('name', name);\n }\n get namespace() {\n return this.get('namespace');\n }\n set namespace(namespace) {\n this.set('namespace', namespace);\n }\n get prefix() {\n return this.get('prefix');\n }\n set prefix(prefix) {\n this.set('prefix', prefix);\n }\n get attribute() {\n return this.get('attribute');\n }\n set attribute(attribute) {\n this.set('attribute', attribute);\n }\n get wrapped() {\n return this.get('wrapped');\n }\n set wrapped(wrapped) {\n this.set('wrapped', wrapped);\n }\n}\nexport default Xml;","import CallbackElement from \"./elements/Callback.mjs\";\nimport ComponentsElement from \"./elements/Components.mjs\";\nimport ContactElement from \"./elements/Contact.mjs\";\nimport DiscriminatorElement from \"./elements/Discriminator.mjs\";\nimport EncodingElement from \"./elements/Encoding.mjs\";\nimport ExampleElement from \"./elements/Example.mjs\";\nimport ExternalDocumentationElement from \"./elements/ExternalDocumentation.mjs\";\nimport HeaderElement from \"./elements/Header.mjs\";\nimport InfoElement from \"./elements/Info.mjs\";\nimport LicenseElement from \"./elements/License.mjs\";\nimport LinkElement from \"./elements/Link.mjs\";\nimport MediaTypeElement from \"./elements/MediaType.mjs\";\nimport OAuthFlowElement from \"./elements/OAuthFlow.mjs\";\nimport OAuthFlowsElement from \"./elements/OAuthFlows.mjs\";\nimport OpenapiElement from \"./elements/Openapi.mjs\";\nimport OpenApi3_0Element from \"./elements/OpenApi3-0.mjs\";\nimport OperationElement from \"./elements/Operation.mjs\";\nimport ParameterElement from \"./elements/Parameter.mjs\";\nimport PathItemElement from \"./elements/PathItem.mjs\";\nimport PathsElement from \"./elements/Paths.mjs\";\nimport ReferenceElement from \"./elements/Reference.mjs\";\nimport RequestBodyElement from \"./elements/RequestBody.mjs\";\nimport ResponseElement from \"./elements/Response.mjs\";\nimport ResponsesElement from \"./elements/Responses.mjs\";\nimport SchemaElement from \"./elements/Schema.mjs\";\nimport SecurityRequirementElement from \"./elements/SecurityRequirement.mjs\";\nimport SecuritySchemeElement from \"./elements/SecurityScheme.mjs\";\nimport ServerElement from \"./elements/Server.mjs\";\nimport ServerVariableElement from \"./elements/ServerVariable.mjs\";\nimport TagElement from \"./elements/Tag.mjs\";\nimport XmlElement from \"./elements/Xml.mjs\";\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst openApi3_0 = {\n namespace: options => {\n const {\n base\n } = options;\n base.register('callback', CallbackElement);\n base.register('components', ComponentsElement);\n base.register('contact', ContactElement);\n base.register('discriminator', DiscriminatorElement);\n base.register('encoding', EncodingElement);\n base.register('example', ExampleElement);\n base.register('externalDocumentation', ExternalDocumentationElement);\n base.register('header', HeaderElement);\n base.register('info', InfoElement);\n base.register('license', LicenseElement);\n base.register('link', LinkElement);\n base.register('mediaType', MediaTypeElement);\n base.register('oAuthFlow', OAuthFlowElement);\n base.register('oAuthFlows', OAuthFlowsElement);\n base.register('openapi', OpenapiElement);\n base.register('openApi3_0', OpenApi3_0Element);\n base.register('operation', OperationElement);\n base.register('parameter', ParameterElement);\n base.register('pathItem', PathItemElement);\n base.register('paths', PathsElement);\n base.register('reference', ReferenceElement);\n base.register('requestBody', RequestBodyElement);\n base.register('response', ResponseElement);\n base.register('responses', ResponsesElement);\n base.register('schema', SchemaElement);\n base.register('securityRequirement', SecurityRequirementElement);\n base.register('securityScheme', SecuritySchemeElement);\n base.register('server', ServerElement);\n base.register('serverVariable', ServerVariableElement);\n base.register('tag', TagElement);\n base.register('xml', XmlElement);\n return base;\n }\n};\nexport default openApi3_0;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet Servers = /*#__PURE__*/(() => {\n class Servers extends ArrayElement {\n static primaryClass = 'servers';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(Servers.primaryClass);\n }\n }\n return Servers;\n})();\nexport default Servers;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet Security = /*#__PURE__*/(() => {\n class Security extends ArrayElement {\n static primaryClass = 'security';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(Security.primaryClass);\n }\n }\n return Security;\n})();\nexport default Security;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet Tags = /*#__PURE__*/(() => {\n class Tags extends ArrayElement {\n static primaryClass = 'tags';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(Tags.primaryClass);\n }\n }\n return Tags;\n})();\nexport default Tags;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ServerVariables = /*#__PURE__*/(() => {\n class ServerVariables extends ObjectElement {\n static primaryClass = 'server-variables';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ServerVariables.primaryClass);\n }\n }\n return ServerVariables;\n})();\nexport default ServerVariables;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsSchemas = /*#__PURE__*/(() => {\n class ComponentsSchemas extends ObjectElement {\n static primaryClass = 'components-schemas';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsSchemas.primaryClass);\n }\n }\n return ComponentsSchemas;\n})();\nexport default ComponentsSchemas;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsResponses = /*#__PURE__*/(() => {\n class ComponentsResponses extends ObjectElement {\n static primaryClass = 'components-responses';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsResponses.primaryClass);\n }\n }\n return ComponentsResponses;\n})();\nexport default ComponentsResponses;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsParameters = /*#__PURE__*/(() => {\n class ComponentsParameters extends ObjectElement {\n static primaryClass = 'components-parameters';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsParameters.primaryClass);\n this.classes.push('parameters');\n }\n }\n return ComponentsParameters;\n})();\nexport default ComponentsParameters;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsExamples = /*#__PURE__*/(() => {\n class ComponentsExamples extends ObjectElement {\n static primaryClass = 'components-examples';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsExamples.primaryClass);\n this.classes.push('examples');\n }\n }\n return ComponentsExamples;\n})();\nexport default ComponentsExamples;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsRequestBodies = /*#__PURE__*/(() => {\n class ComponentsRequestBodies extends ObjectElement {\n static primaryClass = 'components-request-bodies';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsRequestBodies.primaryClass);\n }\n }\n return ComponentsRequestBodies;\n})();\nexport default ComponentsRequestBodies;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsHeaders = /*#__PURE__*/(() => {\n class ComponentsHeaders extends ObjectElement {\n static primaryClass = 'components-headers';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsHeaders.primaryClass);\n }\n }\n return ComponentsHeaders;\n})();\nexport default ComponentsHeaders;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsSecuritySchemes = /*#__PURE__*/(() => {\n class ComponentsSecuritySchemes extends ObjectElement {\n static primaryClass = 'components-security-schemes';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsSecuritySchemes.primaryClass);\n }\n }\n return ComponentsSecuritySchemes;\n})();\nexport default ComponentsSecuritySchemes;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsLinks = /*#__PURE__*/(() => {\n class ComponentsLinks extends ObjectElement {\n static primaryClass = 'components-links';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsLinks.primaryClass);\n }\n }\n return ComponentsLinks;\n})();\nexport default ComponentsLinks;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsCallbacks = /*#__PURE__*/(() => {\n class ComponentsCallbacks extends ObjectElement {\n static primaryClass = 'components-callbacks';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsCallbacks.primaryClass);\n }\n }\n return ComponentsCallbacks;\n})();\nexport default ComponentsCallbacks;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet PathItemServers = /*#__PURE__*/(() => {\n class PathItemServers extends ArrayElement {\n static primaryClass = 'path-item-servers';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(PathItemServers.primaryClass);\n this.classes.push('servers');\n }\n }\n return PathItemServers;\n})();\nexport default PathItemServers;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet PathItemParameters = /*#__PURE__*/(() => {\n class PathItemParameters extends ArrayElement {\n static primaryClass = 'path-item-parameters';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(PathItemParameters.primaryClass);\n this.classes.push('parameters');\n }\n }\n return PathItemParameters;\n})();\nexport default PathItemParameters;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet OperationParameters = /*#__PURE__*/(() => {\n class OperationParameters extends ArrayElement {\n static primaryClass = 'operation-parameters';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(OperationParameters.primaryClass);\n this.classes.push('parameters');\n }\n }\n return OperationParameters;\n})();\nexport default OperationParameters;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ParameterExamples = /*#__PURE__*/(() => {\n class ParameterExamples extends ObjectElement {\n static primaryClass = 'parameter-examples';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ParameterExamples.primaryClass);\n this.classes.push('examples');\n }\n }\n return ParameterExamples;\n})();\nexport default ParameterExamples;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ParameterContent = /*#__PURE__*/(() => {\n class ParameterContent extends ObjectElement {\n static primaryClass = 'parameter-content';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ParameterContent.primaryClass);\n this.classes.push('content');\n }\n }\n return ParameterContent;\n})();\nexport default ParameterContent;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet OperationTags = /*#__PURE__*/(() => {\n class OperationTags extends ArrayElement {\n static primaryClass = 'operation-tags';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(OperationTags.primaryClass);\n }\n }\n return OperationTags;\n})();\nexport default OperationTags;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet OperationCallbacks = /*#__PURE__*/(() => {\n class OperationCallbacks extends ObjectElement {\n static primaryClass = 'operation-callbacks';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(OperationCallbacks.primaryClass);\n }\n }\n return OperationCallbacks;\n})();\nexport default OperationCallbacks;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet OperationSecurity = /*#__PURE__*/(() => {\n class OperationSecurity extends ArrayElement {\n static primaryClass = 'operation-security';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(OperationSecurity.primaryClass);\n this.classes.push('security');\n }\n }\n return OperationSecurity;\n})();\nexport default OperationSecurity;","import { ArrayElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet OperationServers = /*#__PURE__*/(() => {\n class OperationServers extends ArrayElement {\n static primaryClass = 'operation-servers';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(OperationServers.primaryClass);\n this.classes.push('servers');\n }\n }\n return OperationServers;\n})();\nexport default OperationServers;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet RequestBodyContent = /*#__PURE__*/(() => {\n class RequestBodyContent extends ObjectElement {\n static primaryClass = 'request-body-content';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(RequestBodyContent.primaryClass);\n this.classes.push('content');\n }\n }\n return RequestBodyContent;\n})();\nexport default RequestBodyContent;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet MediaTypeExamples = /*#__PURE__*/(() => {\n class MediaTypeExamples extends ObjectElement {\n static primaryClass = 'media-type-examples';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(MediaTypeExamples.primaryClass);\n this.classes.push('examples');\n }\n }\n return MediaTypeExamples;\n})();\nexport default MediaTypeExamples;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet MediaTypeEncoding = /*#__PURE__*/(() => {\n class MediaTypeEncoding extends ObjectElement {\n static primaryClass = 'media-type-encoding';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(MediaTypeEncoding.primaryClass);\n }\n }\n return MediaTypeEncoding;\n})();\nexport default MediaTypeEncoding;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet EncodingHeaders = /*#__PURE__*/(() => {\n class EncodingHeaders extends ObjectElement {\n static primaryClass = 'encoding-headers';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(EncodingHeaders.primaryClass);\n }\n }\n return EncodingHeaders;\n})();\nexport default EncodingHeaders;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ResponseHeaders = /*#__PURE__*/(() => {\n class ResponseHeaders extends ObjectElement {\n static primaryClass = 'response-headers';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ResponseHeaders.primaryClass);\n }\n }\n return ResponseHeaders;\n})();\nexport default ResponseHeaders;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ResponseContent = /*#__PURE__*/(() => {\n class ResponseContent extends ObjectElement {\n static primaryClass = 'response-content';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ResponseContent.primaryClass);\n this.classes.push('content');\n }\n }\n return ResponseContent;\n})();\nexport default ResponseContent;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ResponseLinks = /*#__PURE__*/(() => {\n class ResponseLinks extends ObjectElement {\n static primaryClass = 'response-links';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ResponseLinks.primaryClass);\n }\n }\n return ResponseLinks;\n})();\nexport default ResponseLinks;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet DiscriminatorMapping = /*#__PURE__*/(() => {\n class DiscriminatorMapping extends ObjectElement {\n static primaryClass = 'discriminator-mapping';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(DiscriminatorMapping.primaryClass);\n }\n }\n return DiscriminatorMapping;\n})();\nexport default DiscriminatorMapping;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet OAuthFlowScopes = /*#__PURE__*/(() => {\n class OAuthFlowScopes extends ObjectElement {\n static primaryClass = 'oauth-flow-scopes';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(OAuthFlowScopes.primaryClass);\n }\n }\n return OAuthFlowScopes;\n})();\nexport default OAuthFlowScopes;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet LinkParameters = /*#__PURE__*/(() => {\n class LinkParameters extends ObjectElement {\n static primaryClass = 'link-parameters';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(LinkParameters.primaryClass);\n }\n }\n return LinkParameters;\n})();\nexport default LinkParameters;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet HeaderExamples = /*#__PURE__*/(() => {\n class HeaderExamples extends ObjectElement {\n static primaryClass = 'header-examples';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(HeaderExamples.primaryClass);\n this.classes.push('examples');\n }\n }\n return HeaderExamples;\n})();\nexport default HeaderExamples;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet HeaderContent = /*#__PURE__*/(() => {\n class HeaderContent extends ObjectElement {\n static primaryClass = 'header-content';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(HeaderContent.primaryClass);\n this.classes.push('content');\n }\n }\n return HeaderContent;\n})();\nexport default HeaderContent;","import { keyMap as keyMapBase, isElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nexport const getNodeType = element => {\n if (!isElement(element)) {\n return undefined;\n }\n return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;\n};\n\n/**\n * There are unfortunately two `LinkElement` types. One is from base namespace\n * and the other one if from this namespace. `LinkElement` from base namespace\n * is used extremely rarely, so it's almost always safe during traversing\n * to assume that `LinkElement` is element from this namespace.\n *\n * To be 100% sure that currently visiting `LinkElement` is from this namespace\n * use `isLinkElement` predicate from this namespace to assert for it.\n * @public\n */\n\nexport const keyMap = {\n CallbackElement: ['content'],\n ComponentsElement: ['content'],\n ContactElement: ['content'],\n DiscriminatorElement: ['content'],\n Encoding: ['content'],\n Example: ['content'],\n ExternalDocumentationElement: ['content'],\n HeaderElement: ['content'],\n InfoElement: ['content'],\n LicenseElement: ['content'],\n MediaTypeElement: ['content'],\n OAuthFlowElement: ['content'],\n OAuthFlowsElement: ['content'],\n OpenApi3_0Element: ['content'],\n OperationElement: ['content'],\n ParameterElement: ['content'],\n PathItemElement: ['content'],\n PathsElement: ['content'],\n ReferenceElement: ['content'],\n RequestBodyElement: ['content'],\n ResponseElement: ['content'],\n ResponsesElement: ['content'],\n SchemaElement: ['content'],\n SecurityRequirementElement: ['content'],\n SecuritySchemeElement: ['content'],\n ServerElement: ['content'],\n ServerVariableElement: ['content'],\n TagElement: ['content'],\n ...keyMapBase\n};","import { deepmerge, hasElementSourceMap } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass Visitor {\n element;\n constructor(options = {}) {\n Object.assign(this, options);\n }\n\n /* eslint-disable class-methods-use-this, no-param-reassign */\n copyMetaAndAttributes(from, to) {\n if (from.meta.length > 0 || to.meta.length > 0) {\n to.meta = deepmerge(to.meta, from.meta);\n if (hasElementSourceMap(from)) {\n // avoid deep merging of source maps\n to.meta.set('sourceMap', from.meta.get('sourceMap'));\n }\n }\n if (from.attributes.length > 0 || from.meta.length > 0) {\n to.attributes = deepmerge(to.attributes, from.attributes); // eslint-disable-line no-param-reassign\n }\n }\n /* eslint-enable class-methods-use-this, no-param-reassign */\n}\nexport default Visitor;","import { BREAK, cloneDeep } from '@swagger-api/apidom-core';\nimport Visitor from \"./Visitor.mjs\";\n/**\n * This visitor is responsible for falling back to current traversed element\n * Given OpenApi3_0Visitor expects ObjectElement to be traversed. If\n * different Element is provided FallBackVisitor is responsible to assigning\n * this Element as current element.\n */\n/**\n * @public\n */\nclass FallbackVisitor extends Visitor {\n enter(element) {\n this.element = cloneDeep(element);\n return BREAK;\n }\n}\nexport default FallbackVisitor;","import { pathSatisfies, path, pick } from 'ramda';\nimport { isFunction } from 'ramda-adjunct';\nimport { visit, cloneDeep } from '@swagger-api/apidom-core';\nimport Visitor from \"./Visitor.mjs\";\nimport FallbackVisitor from \"./FallbackVisitor.mjs\";\n/**\n * This is a base Type for every visitor that does\n * internal look-ups to retrieve other child visitors.\n * @public\n */\n/**\n * @public\n */\nclass SpecificationVisitor extends Visitor {\n specObj;\n passingOptionsNames = ['specObj', 'openApiGenericElement', 'openApiSemanticElement'];\n openApiGenericElement;\n openApiSemanticElement;\n constructor({\n specObj,\n passingOptionsNames,\n openApiGenericElement,\n openApiSemanticElement,\n ...rest\n }) {\n super({\n ...rest\n });\n this.specObj = specObj;\n this.openApiGenericElement = openApiGenericElement;\n this.openApiSemanticElement = openApiSemanticElement;\n if (Array.isArray(passingOptionsNames)) {\n this.passingOptionsNames = passingOptionsNames;\n }\n }\n retrievePassingOptions() {\n return pick(this.passingOptionsNames, this);\n }\n retrieveFixedFields(specPath) {\n const fixedFields = path(['visitors', ...specPath, 'fixedFields'], this.specObj);\n if (typeof fixedFields === 'object' && fixedFields !== null) {\n return Object.keys(fixedFields);\n }\n return [];\n }\n retrieveVisitor(specPath) {\n if (pathSatisfies(isFunction, ['visitors', ...specPath], this.specObj)) {\n return path(['visitors', ...specPath], this.specObj);\n }\n return path(['visitors', ...specPath, '$visitor'], this.specObj);\n }\n retrieveVisitorInstance(specPath, options = {}) {\n const passingOpts = this.retrievePassingOptions();\n const VisitorClz = this.retrieveVisitor(specPath);\n const visitorOpts = {\n ...passingOpts,\n ...options\n };\n return new VisitorClz(visitorOpts);\n }\n toRefractedElement(specPath, element, options = {}) {\n /**\n * This is `Visitor shortcut`: mechanism for short-circuiting the traversal and replacing\n * it by basic node cloning.\n *\n * Visiting the element is equivalent to cloning it if the prototype of a visitor\n * is the same as the prototype of FallbackVisitor. If that's the case, we can avoid\n * bootstrapping the traversal cycle for fields that don't require any special visiting.\n */\n const visitor = this.retrieveVisitorInstance(specPath, options);\n if (visitor instanceof FallbackVisitor && (visitor === null || visitor === void 0 ? void 0 : visitor.constructor) === FallbackVisitor) {\n return cloneDeep(element);\n }\n visit(element, visitor, options);\n return visitor.element;\n }\n}\nexport default SpecificationVisitor;","import { startsWith } from 'ramda';\nimport { isStringElement, isObjectElement, toValue } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nexport const isReferenceLikeElement = element => {\n return isObjectElement(element) && element.hasKey('$ref');\n};\n\n/**\n * @public\n */\nexport const isServerLikeElement = isObjectElement;\n\n/**\n * @public\n */\nexport const isTagLikeElement = isObjectElement;\n\n/**\n * @public\n */\nexport const isOpenApiExtension = element => {\n // @ts-ignore\n return isStringElement(element.key) && startsWith('x-', toValue(element.key));\n};","import { isStringElement, MemberElement, BREAK, cloneDeep, toValue } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport { isOpenApiExtension } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nclass FixedFieldsVisitor extends SpecificationVisitor {\n specPath;\n ignoredFields;\n canSupportSpecificationExtensions = true;\n specificationExtensionPredicate = isOpenApiExtension;\n constructor({\n specPath,\n ignoredFields,\n canSupportSpecificationExtensions,\n specificationExtensionPredicate,\n ...rest\n }) {\n super({\n ...rest\n });\n this.specPath = specPath;\n this.ignoredFields = ignoredFields || [];\n if (typeof canSupportSpecificationExtensions === 'boolean') {\n this.canSupportSpecificationExtensions = canSupportSpecificationExtensions;\n }\n if (typeof specificationExtensionPredicate === 'function') {\n this.specificationExtensionPredicate = specificationExtensionPredicate;\n }\n }\n ObjectElement(objectElement) {\n const specPath = this.specPath(objectElement);\n const fields = this.retrieveFixedFields(specPath);\n\n // @ts-ignore\n objectElement.forEach((value, key, memberElement) => {\n if (isStringElement(key) && fields.includes(toValue(key)) && !this.ignoredFields.includes(toValue(key))) {\n const fixedFieldElement = this.toRefractedElement([...specPath, 'fixedFields', toValue(key)], value);\n const newMemberElement = new MemberElement(cloneDeep(key), fixedFieldElement);\n this.copyMetaAndAttributes(memberElement, newMemberElement);\n newMemberElement.classes.push('fixed-field');\n this.element.content.push(newMemberElement);\n } else if (this.canSupportSpecificationExtensions && this.specificationExtensionPredicate(memberElement)) {\n const extensionElement = this.toRefractedElement(['document', 'extension'], memberElement);\n this.element.content.push(extensionElement);\n } else if (!this.ignoredFields.includes(toValue(key))) {\n this.element.content.push(cloneDeep(memberElement));\n }\n });\n this.copyMetaAndAttributes(objectElement, this.element);\n return BREAK;\n }\n}\nexport default FixedFieldsVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport FixedFieldsVisitor from \"../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport OpenApi3_0Element from \"../../../elements/OpenApi3-0.mjs\";\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass OpenApi3_0Visitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new OpenApi3_0Element();\n this.specPath = always(['document', 'objects', 'OpenApi']);\n this.canSupportSpecificationExtensions = true;\n }\n ObjectElement(objectElement) {\n return FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n }\n}\nexport default OpenApi3_0Visitor;","import { Mixin } from 'ts-mixer';\nimport { BREAK, toValue } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport OpenapiElement from \"../../../elements/Openapi.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass OpenapiVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) {\n StringElement(stringElement) {\n const openapiElement = new OpenapiElement(toValue(stringElement));\n this.copyMetaAndAttributes(stringElement, openapiElement);\n this.element = openapiElement;\n return BREAK;\n }\n}\nexport default OpenapiVisitor;","import { BREAK, cloneDeep } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"./SpecificationVisitor.mjs\";\n/**\n * @public\n */\nclass SpecificationExtensionVisitor extends SpecificationVisitor {\n MemberElement(memberElement) {\n this.element = cloneDeep(memberElement);\n this.element.classes.push('specification-extension');\n return BREAK;\n }\n}\nexport default SpecificationExtensionVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport InfoElement from \"../../../../elements/Info.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass InfoVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new InfoElement();\n this.specPath = always(['document', 'objects', 'Info']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default InfoVisitor;","import FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass VersionVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = super.enter(stringElement);\n this.element.classes.push('api-version');\n this.element.classes.push('version');\n return result;\n }\n}\nexport default VersionVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport ContactElement from \"../../../../elements/Contact.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ContactVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ContactElement();\n this.specPath = always(['document', 'objects', 'Contact']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default ContactVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport LicenseElement from \"../../../../elements/License.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass LicenseVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new LicenseElement();\n this.specPath = always(['document', 'objects', 'License']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default LicenseVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isStringElement } from '@swagger-api/apidom-core';\nimport LinkElement from \"../../../../elements/Link.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass LinkVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new LinkElement();\n this.specPath = always(['document', 'objects', 'Link']);\n this.canSupportSpecificationExtensions = true;\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // mark this LinkElement with reference metadata\n if (isStringElement(this.element.operationId) || isStringElement(this.element.operationRef)) {\n this.element.classes.push('reference-element');\n }\n return result;\n }\n}\nexport default LinkVisitor;","import FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass OperationRefVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = super.enter(stringElement);\n this.element.classes.push('reference-value');\n return result;\n }\n}\nexport default OperationRefVisitor;","import FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass OperationIdVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = super.enter(stringElement);\n this.element.classes.push('reference-value');\n return result;\n }\n}\nexport default OperationIdVisitor;","import { F as stubFalse } from 'ramda';\nimport { MemberElement, BREAK, cloneDeep, toValue } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport { isOpenApiExtension } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass PatternedFieldsVisitor extends SpecificationVisitor {\n specPath;\n ignoredFields;\n fieldPatternPredicate = stubFalse;\n canSupportSpecificationExtensions = false;\n specificationExtensionPredicate = isOpenApiExtension;\n constructor({\n specPath,\n ignoredFields,\n fieldPatternPredicate,\n canSupportSpecificationExtensions,\n specificationExtensionPredicate,\n ...rest\n }) {\n super({\n ...rest\n });\n this.specPath = specPath;\n this.ignoredFields = ignoredFields || [];\n if (typeof fieldPatternPredicate === 'function') {\n this.fieldPatternPredicate = fieldPatternPredicate;\n }\n if (typeof canSupportSpecificationExtensions === 'boolean') {\n this.canSupportSpecificationExtensions = canSupportSpecificationExtensions;\n }\n if (typeof specificationExtensionPredicate === 'function') {\n this.specificationExtensionPredicate = specificationExtensionPredicate;\n }\n }\n ObjectElement(objectElement) {\n // @ts-ignore\n objectElement.forEach((value, key, memberElement) => {\n if (this.canSupportSpecificationExtensions && this.specificationExtensionPredicate(memberElement)) {\n const extensionElement = this.toRefractedElement(['document', 'extension'], memberElement);\n this.element.content.push(extensionElement);\n } else if (!this.ignoredFields.includes(toValue(key)) && this.fieldPatternPredicate(toValue(key))) {\n const specPath = this.specPath(value);\n const patternedFieldElement = this.toRefractedElement(specPath, value);\n const newMemberElement = new MemberElement(cloneDeep(key), patternedFieldElement);\n this.copyMetaAndAttributes(memberElement, newMemberElement);\n newMemberElement.classes.push('patterned-field');\n this.element.content.push(newMemberElement);\n } else if (!this.ignoredFields.includes(toValue(key))) {\n this.element.content.push(cloneDeep(memberElement));\n }\n });\n this.copyMetaAndAttributes(objectElement, this.element);\n return BREAK;\n }\n}\nexport default PatternedFieldsVisitor;","import { isNonEmptyString } from 'ramda-adjunct';\nimport PatternedFieldsVisitor from \"./PatternedFieldsVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass MapVisitor extends PatternedFieldsVisitor {\n constructor(options) {\n super(options);\n this.fieldPatternPredicate = isNonEmptyString;\n }\n}\nexport default MapVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport LinkParametersElement from \"../../../../elements/nces/LinkParameters.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ParametersVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new LinkParametersElement();\n this.specPath = always(['value']);\n }\n}\nexport default ParametersVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport ServerElement from \"../../../../elements/Server.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ServerVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ServerElement();\n this.specPath = always(['document', 'objects', 'Server']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default ServerVisitor;","import FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass UrlVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = super.enter(stringElement);\n this.element.classes.push('server-url');\n return result;\n }\n}\nexport default UrlVisitor;","import { Mixin } from 'ts-mixer';\nimport { BREAK } from '@swagger-api/apidom-core';\nimport ServersElement from \"../../../elements/nces/Servers.mjs\";\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport { isServerLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ServersVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ServersElement();\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const specPath = isServerLikeElement(item) ? ['document', 'objects', 'Server'] : ['value'];\n const element = this.toRefractedElement(specPath, item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default ServersVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport ServerVariableElement from \"../../../../elements/ServerVariable.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ServerVariableVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ServerVariableElement();\n this.specPath = always(['document', 'objects', 'ServerVariable']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default ServerVariableVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport ServerVariablesElement from \"../../../../elements/nces/ServerVariables.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass VariablesVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ServerVariablesElement();\n this.specPath = always(['document', 'objects', 'ServerVariable']);\n }\n}\nexport default VariablesVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport MediaTypeElement from \"../../../../elements/MediaType.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass MediaTypeVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new MediaTypeElement();\n this.specPath = always(['document', 'objects', 'MediaType']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default MediaTypeVisitor;","import { ifElse, always } from 'ramda';\nimport { dispatch, stubUndefined } from 'ramda-adjunct';\nimport { BREAK } from '@swagger-api/apidom-core';\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nclass AlternatingVisitor extends SpecificationVisitor {\n alternator;\n constructor({\n alternator,\n ...rest\n }) {\n super({\n ...rest\n });\n this.alternator = alternator || [];\n }\n enter(element) {\n const functions = this.alternator.map(({\n predicate,\n specPath\n }) => ifElse(predicate, always(specPath), stubUndefined));\n const specPath = dispatch(functions)(element);\n this.element = this.toRefractedElement(specPath, element);\n return BREAK;\n }\n}\nexport default AlternatingVisitor;","import { createPredicate, isBooleanElement } from '@swagger-api/apidom-core';\nimport CallbackElement from \"./elements/Callback.mjs\";\nimport ComponentsElement from \"./elements/Components.mjs\";\nimport ContactElement from \"./elements/Contact.mjs\";\nimport ExampleElement from \"./elements/Example.mjs\";\nimport ExternalDocumentationElement from \"./elements/ExternalDocumentation.mjs\";\nimport HeaderElement from \"./elements/Header.mjs\";\nimport InfoElement from \"./elements/Info.mjs\";\nimport LicenseElement from \"./elements/License.mjs\";\nimport LinkElement from \"./elements/Link.mjs\";\nimport OpenapiElement from \"./elements/Openapi.mjs\";\nimport OpenApi3_0Element from \"./elements/OpenApi3-0.mjs\";\nimport OperationElement from \"./elements/Operation.mjs\";\nimport ParameterElement from \"./elements/Parameter.mjs\";\nimport PathItemElement from \"./elements/PathItem.mjs\";\nimport PathsElement from \"./elements/Paths.mjs\";\nimport ReferenceElement from \"./elements/Reference.mjs\";\nimport RequestBodyElement from \"./elements/RequestBody.mjs\";\nimport ResponseElement from \"./elements/Response.mjs\";\nimport ResponsesElement from \"./elements/Responses.mjs\";\nimport SchemaElement from \"./elements/Schema.mjs\";\nimport SecurityRequirementElement from \"./elements/SecurityRequirement.mjs\";\nimport SecuritySchemeElement from \"./elements/SecurityScheme.mjs\";\nimport ServerElement from \"./elements/Server.mjs\";\nimport ServerVariableElement from \"./elements/ServerVariable.mjs\";\nimport MediaTypeElement from \"./elements/MediaType.mjs\"; // NCE types\nimport ServersElement from \"./elements/nces/Servers.mjs\";\n/**\n * @public\n */\nexport const isCallbackElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof CallbackElement || hasBasicElementProps(element) && isElementType('callback', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isComponentsElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ComponentsElement || hasBasicElementProps(element) && isElementType('components', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isContactElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ContactElement || hasBasicElementProps(element) && isElementType('contact', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isExampleElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ExampleElement || hasBasicElementProps(element) && isElementType('example', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isExternalDocumentationElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ExternalDocumentationElement || hasBasicElementProps(element) && isElementType('externalDocumentation', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isHeaderElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof HeaderElement || hasBasicElementProps(element) && isElementType('header', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isInfoElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof InfoElement || hasBasicElementProps(element) && isElementType('info', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isLicenseElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LicenseElement || hasBasicElementProps(element) && isElementType('license', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isLinkElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LinkElement || hasBasicElementProps(element) && isElementType('link', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isOpenapiElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof OpenapiElement || hasBasicElementProps(element) && isElementType('openapi', element) && primitiveEq('string', element);\n});\n\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const isOpenApi3_0Element = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq,\n hasClass\n}) => {\n return element => element instanceof OpenApi3_0Element || hasBasicElementProps(element) && isElementType('openApi3_0', element) && primitiveEq('object', element) && hasClass('api', element);\n});\n\n/**\n * @public\n */\nexport const isOperationElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof OperationElement || hasBasicElementProps(element) && isElementType('operation', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isParameterElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ParameterElement || hasBasicElementProps(element) && isElementType('parameter', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isPathItemElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof PathItemElement || hasBasicElementProps(element) && isElementType('pathItem', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isPathsElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof PathsElement || hasBasicElementProps(element) && isElementType('paths', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isReferenceElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ReferenceElement || hasBasicElementProps(element) && isElementType('reference', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isRequestBodyElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof RequestBodyElement || hasBasicElementProps(element) && isElementType('requestBody', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isResponseElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ResponseElement || hasBasicElementProps(element) && isElementType('response', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isResponsesElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ResponsesElement || hasBasicElementProps(element) && isElementType('responses', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isSchemaElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof SchemaElement || hasBasicElementProps(element) && isElementType('schema', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isBooleanJsonSchemaElement = element => {\n return isBooleanElement(element) && element.classes.includes('boolean-json-schema');\n};\n\n/**\n * @public\n */\nexport const isSecurityRequirementElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof SecurityRequirementElement || hasBasicElementProps(element) && isElementType('securityRequirement', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isSecuritySchemeElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof SecuritySchemeElement || hasBasicElementProps(element) && isElementType('securityScheme', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isServerElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ServerElement || hasBasicElementProps(element) && isElementType('server', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isServerVariableElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ServerVariableElement || hasBasicElementProps(element) && isElementType('serverVariable', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isMediaTypeElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof MediaTypeElement || hasBasicElementProps(element) && isElementType('mediaType', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isServersElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq,\n hasClass\n}) => {\n return element => element instanceof ServersElement || hasBasicElementProps(element) && isElementType('array', element) && primitiveEq('array', element) && hasClass('servers', element);\n});","import { Mixin } from 'ts-mixer';\nimport { T as stubTrue } from 'ramda';\nimport AlternatingVisitor from \"../../generics/AlternatingVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SchemaVisitor extends Mixin(AlternatingVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.alternator = [{\n predicate: isReferenceLikeElement,\n specPath: ['document', 'objects', 'Reference']\n }, {\n predicate: stubTrue,\n specPath: ['document', 'objects', 'Schema']\n }];\n }\n ObjectElement(objectElement) {\n const result = AlternatingVisitor.prototype.enter.call(this, objectElement);\n if (isReferenceElement(this.element)) {\n this.element.setMetaProperty('referenced-element', 'schema');\n }\n return result;\n }\n}\nexport default SchemaVisitor;","import { Mixin } from 'ts-mixer';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport MapVisitor from \"../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ExamplesVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('examples');\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Example'];\n this.canSupportSpecificationExtensions = true;\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'example');\n });\n return result;\n }\n}\nexport default ExamplesVisitor;","import BaseExamplesVisitor from \"../ExamplesVisitor.mjs\";\nimport MediaTypeExamples from \"../../../../elements/nces/MediaTypeExamples.mjs\";\n/**\n * @public\n */\nclass ExamplesVisitor extends BaseExamplesVisitor {\n constructor(options) {\n super(options);\n this.element = new MediaTypeExamples();\n }\n}\nexport default ExamplesVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport MediaTypeEncodingElement from \"../../../../elements/nces/MediaTypeEncoding.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass EncodingVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new MediaTypeEncodingElement();\n this.specPath = always(['document', 'objects', 'Encoding']);\n }\n}\nexport default EncodingVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport SecurityRequirementElement from \"../../../../elements/SecurityRequirement.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SecurityRequirementVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new SecurityRequirementElement();\n this.specPath = always(['value']);\n }\n}\nexport default SecurityRequirementVisitor;","import { Mixin } from 'ts-mixer';\nimport { isObjectElement, BREAK, cloneDeep } from '@swagger-api/apidom-core';\nimport SecurityElement from \"../../../elements/nces/Security.mjs\";\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SecurityVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new SecurityElement();\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n if (isObjectElement(item)) {\n const element = this.toRefractedElement(['document', 'objects', 'SecurityRequirement'], item);\n this.element.push(element);\n } else {\n this.element.push(cloneDeep(item));\n }\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default SecurityVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport ComponentsElement from \"../../../../elements/Components.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ComponentsVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsElement();\n this.specPath = always(['document', 'objects', 'Components']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default ComponentsVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport TagElement from \"../../../../elements/Tag.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass TagVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new TagElement();\n this.specPath = always(['document', 'objects', 'Tag']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default TagVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isStringElement } from '@swagger-api/apidom-core';\nimport ReferenceElement from \"../../../../elements/Reference.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ReferenceVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ReferenceElement();\n this.specPath = always(['document', 'objects', 'Reference']);\n this.canSupportSpecificationExtensions = false;\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // mark this ReferenceElement with reference metadata\n if (isStringElement(this.element.$ref)) {\n this.element.classes.push('reference-element');\n }\n return result;\n }\n}\nexport default ReferenceVisitor;","import FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass $RefVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = super.enter(stringElement);\n this.element.classes.push('reference-value');\n return result;\n }\n}\nexport default $RefVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isObjectElement, toValue } from '@swagger-api/apidom-core';\nimport ParameterElement from \"../../../../elements/Parameter.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isMediaTypeElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ParameterVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ParameterElement();\n this.specPath = always(['document', 'objects', 'Parameter']);\n this.canSupportSpecificationExtensions = true;\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every MediaTypeElement with media type metadata\n if (isObjectElement(this.element.contentProp)) {\n this.element.contentProp.filter(isMediaTypeElement)\n // @ts-ignore\n .forEach((mediaTypeElement, key) => {\n mediaTypeElement.setMetaProperty('media-type', toValue(key));\n });\n }\n return result;\n }\n}\nexport default ParameterVisitor;","import { Mixin } from 'ts-mixer';\nimport { T as stubTrue } from 'ramda';\nimport AlternatingVisitor from \"../../generics/AlternatingVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SchemaVisitor extends Mixin(AlternatingVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.alternator = [{\n predicate: isReferenceLikeElement,\n specPath: ['document', 'objects', 'Reference']\n }, {\n predicate: stubTrue,\n specPath: ['document', 'objects', 'Schema']\n }];\n }\n ObjectElement(objectElement) {\n const result = AlternatingVisitor.prototype.enter.call(this, objectElement);\n if (isReferenceElement(this.element)) {\n this.element.setMetaProperty('referenced-element', 'schema');\n }\n return result;\n }\n}\nexport default SchemaVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport HeaderElement from \"../../../../elements/Header.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass HeaderVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new HeaderElement();\n this.specPath = always(['document', 'objects', 'Header']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default HeaderVisitor;","import { Mixin } from 'ts-mixer';\nimport { T as stubTrue } from 'ramda';\nimport AlternatingVisitor from \"../../generics/AlternatingVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SchemaVisitor extends Mixin(AlternatingVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.alternator = [{\n predicate: isReferenceLikeElement,\n specPath: ['document', 'objects', 'Reference']\n }, {\n predicate: stubTrue,\n specPath: ['document', 'objects', 'Schema']\n }];\n }\n ObjectElement(objectElement) {\n const result = AlternatingVisitor.prototype.enter.call(this, objectElement);\n if (isReferenceElement(this.element)) {\n this.element.setMetaProperty('referenced-element', 'schema');\n }\n return result;\n }\n}\nexport default SchemaVisitor;","import BaseExamplesVisitor from \"../ExamplesVisitor.mjs\";\nimport HeaderExamplesElement from \"../../../../elements/nces/HeaderExamples.mjs\";\n/**\n * @public\n */\nclass ExamplesVisitor extends BaseExamplesVisitor {\n constructor(options) {\n super(options);\n this.element = new HeaderExamplesElement();\n }\n}\nexport default ExamplesVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport MapVisitor from \"../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ContentVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('content');\n this.specPath = always(['document', 'objects', 'MediaType']);\n }\n}\nexport default ContentVisitor;","import BaseContentVisitor from \"../ContentVisitor.mjs\";\nimport HeaderContentElement from \"../../../../elements/nces/HeaderContent.mjs\";\n/**\n * @public\n */\nclass ContentVisitor extends BaseContentVisitor {\n constructor(options) {\n super(options);\n this.element = new HeaderContentElement();\n }\n}\nexport default ContentVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport SchemaElement from \"../../../../elements/Schema.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SchemaVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new SchemaElement();\n this.specPath = always(['document', 'objects', 'Schema']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default SchemaVisitor;","import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\nexport const JSONSchemaAllOfVisitor = JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.allOf;\n\n/**\n * @public\n */\nclass AllOfVisitor extends JSONSchemaAllOfVisitor {\n ArrayElement(arrayElement) {\n const result = JSONSchemaAllOfVisitor.prototype.ArrayElement.call(this, arrayElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'schema');\n });\n return result;\n }\n}\nexport default AllOfVisitor;","import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\nexport const JSONSchemaAnyOfVisitor = JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.anyOf;\n\n/**\n * @public\n */\nclass AnyOfVisitor extends JSONSchemaAnyOfVisitor {\n ArrayElement(arrayElement) {\n const result = JSONSchemaAnyOfVisitor.prototype.ArrayElement.call(this, arrayElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'schema');\n });\n return result;\n }\n}\nexport default AnyOfVisitor;","import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\nexport const JSONSchemaOneOfVisitor = JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.oneOf;\n\n/**\n * @public\n */\nclass OneOfVisitor extends JSONSchemaOneOfVisitor {\n ArrayElement(arrayElement) {\n const result = JSONSchemaOneOfVisitor.prototype.ArrayElement.call(this, arrayElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'schema');\n });\n return result;\n }\n}\nexport default OneOfVisitor;","import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\nexport const JSONSchemaItemsVisitor = JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.items;\n\n/**\n * @public\n */\nclass ItemsVisitor extends JSONSchemaItemsVisitor {\n ObjectElement(objectElement) {\n const result = JSONSchemaItemsVisitor.prototype.ObjectElement.call(this, objectElement);\n if (isReferenceElement(this.element)) {\n this.element.setMetaProperty('referenced-element', 'schema');\n }\n return result;\n }\n ArrayElement(arrayElement) {\n const result = this.enter(arrayElement);\n return result;\n }\n}\nexport default ItemsVisitor;","import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\nexport const JSONSchemaPropertiesVisitor = JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.properties;\n\n/**\n * @public\n */\nclass PropertiesVisitor extends JSONSchemaPropertiesVisitor {\n ObjectElement(objectElement) {\n const result = JSONSchemaPropertiesVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'schema');\n });\n return result;\n }\n}\nexport default PropertiesVisitor;","import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/apidom-ns-json-schema-draft-4';\n/**\n * @public\n */\nexport const JSONSchemaTypeVisitor = JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.type;\n\n/**\n * @public\n */\nclass TypeVisitor extends JSONSchemaTypeVisitor {\n ArrayElement(arrayElement) {\n const result = this.enter(arrayElement);\n return result;\n }\n}\nexport default TypeVisitor;","import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n// eslint-disable-next-line prefer-destructuring\nexport const JSONSchemaOrJSONReferenceVisitor = JSONSchemaDraft4Specification.visitors.JSONSchemaOrJSONReferenceVisitor;\n\n/**\n * @public\n */\nclass SchemaOrReferenceVisitor extends JSONSchemaOrJSONReferenceVisitor {\n ObjectElement(objectElement) {\n const result = JSONSchemaOrJSONReferenceVisitor.prototype.enter.call(this, objectElement);\n if (isReferenceElement(this.element)) {\n this.element.setMetaProperty('referenced-element', 'schema');\n }\n return result;\n }\n}\nexport default SchemaOrReferenceVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport DiscriminatorElement from \"../../../../elements/Discriminator.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass DiscriminatorVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new DiscriminatorElement();\n this.specPath = always(['document', 'objects', 'Discriminator']);\n this.canSupportSpecificationExtensions = false;\n }\n}\nexport default DiscriminatorVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport DiscriminatorMappingElement from \"../../../../elements/nces/DiscriminatorMapping.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass MappingVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new DiscriminatorMappingElement();\n this.specPath = always(['value']);\n }\n}\nexport default MappingVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport XmlElement from \"../../../../elements/Xml.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass XmlVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new XmlElement();\n this.specPath = always(['document', 'objects', 'XML']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default XmlVisitor;","import BaseExamplesVisitor from \"../ExamplesVisitor.mjs\";\nimport ParameterExamplesElement from \"../../../../elements/nces/ParameterExamples.mjs\";\n/**\n * @public\n */\nclass ExamplesVisitor extends BaseExamplesVisitor {\n constructor(options) {\n super(options);\n this.element = new ParameterExamplesElement();\n }\n}\nexport default ExamplesVisitor;","import BaseContentVisitor from \"../ContentVisitor.mjs\";\nimport ParameterContentElement from \"../../../../elements/nces/ParameterContent.mjs\";\n/**\n * @public\n */\nclass ContentVisitor extends BaseContentVisitor {\n constructor(options) {\n super(options);\n this.element = new ParameterContentElement();\n }\n}\nexport default ContentVisitor;","import { Mixin } from 'ts-mixer';\nimport ComponentsSchemasElement from \"../../../../elements/nces/ComponentsSchemas.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SchemasVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsSchemasElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Schema'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'schema');\n });\n return result;\n }\n}\nexport default SchemasVisitor;","import { Mixin } from 'ts-mixer';\nimport { toValue } from '@swagger-api/apidom-core';\nimport ComponentsResponsesElement from \"../../../../elements/nces/ComponentsResponses.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement, isResponseElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ResponsesVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsResponsesElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Response'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'response');\n });\n\n // decorate every ResponseElement with metadata about their status code\n // @ts-ignore\n this.element.filter(isResponseElement).forEach((value, key) => {\n value.setMetaProperty('http-status-code', toValue(key));\n });\n return result;\n }\n}\nexport default ResponsesVisitor;","import { Mixin } from 'ts-mixer';\nimport ComponentsParametersElement from \"../../../../elements/nces/ComponentsParameters.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ParametersVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsParametersElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Parameter'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'parameter');\n });\n return result;\n }\n}\nexport default ParametersVisitor;","import { Mixin } from 'ts-mixer';\nimport ComponentsExamplesElement from \"../../../../elements/nces/ComponentsExamples.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ExamplesVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsExamplesElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Example'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'example');\n });\n return result;\n }\n}\nexport default ExamplesVisitor;","import { Mixin } from 'ts-mixer';\nimport ComponentsRequestBodiesElement from \"../../../../elements/nces/ComponentsRequestBodies.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass RequestBodiesVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsRequestBodiesElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'RequestBody'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'requestBody');\n });\n return result;\n }\n}\nexport default RequestBodiesVisitor;","import { Mixin } from 'ts-mixer';\nimport { toValue } from '@swagger-api/apidom-core';\nimport ComponentsHeadersElement from \"../../../../elements/nces/ComponentsHeaders.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement, isHeaderElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass HeadersVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsHeadersElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Header'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'header');\n });\n\n // decorate every HeaderElement with metadata about their name\n // @ts-ignore\n this.element.filter(isHeaderElement).forEach((value, key) => {\n value.setMetaProperty('header-name', toValue(key));\n });\n return result;\n }\n}\nexport default HeadersVisitor;","import { Mixin } from 'ts-mixer';\nimport ComponentsSecuritySchemesElement from \"../../../../elements/nces/ComponentsSecuritySchemes.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SecuritySchemesVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsSecuritySchemesElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'SecurityScheme'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'securityScheme');\n });\n return result;\n }\n}\nexport default SecuritySchemesVisitor;","import { Mixin } from 'ts-mixer';\nimport ComponentsLinksElement from \"../../../../elements/nces/ComponentsLinks.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass LinksVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsLinksElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Link'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'link');\n });\n return result;\n }\n}\nexport default LinksVisitor;","import { Mixin } from 'ts-mixer';\nimport ComponentsCallbacksElement from \"../../../../elements/nces/ComponentsCallbacks.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass CallbacksVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsCallbacksElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Callback'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'callback');\n });\n return result;\n }\n}\nexport default CallbacksVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isStringElement } from '@swagger-api/apidom-core';\nimport ExampleElement from \"../../../../elements/Example.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ExampleVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ExampleElement();\n this.specPath = always(['document', 'objects', 'Example']);\n this.canSupportSpecificationExtensions = true;\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // mark this ExampleElement with reference metadata\n if (isStringElement(this.element.externalValue)) {\n this.element.classes.push('reference-element');\n }\n return result;\n }\n}\nexport default ExampleVisitor;","import FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass ExternalValueVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = super.enter(stringElement);\n this.element.classes.push('reference-value');\n return result;\n }\n}\nexport default ExternalValueVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport ExternalDocumentationElement from \"../../../../elements/ExternalDocumentation.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ExternalDocumentationVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ExternalDocumentationElement();\n this.specPath = always(['document', 'objects', 'ExternalDocumentation']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default ExternalDocumentationVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isObjectElement, toValue } from '@swagger-api/apidom-core';\nimport EncodingElement from \"../../../../elements/Encoding.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isHeaderElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass EncodingVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new EncodingElement();\n this.specPath = always(['document', 'objects', 'Encoding']);\n this.canSupportSpecificationExtensions = true;\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every Header with media type metadata\n if (isObjectElement(this.element.headers)) {\n this.element.headers.filter(isHeaderElement)\n // @ts-ignore\n .forEach((headerElement, key) => {\n headerElement.setMetaProperty('header-name', toValue(key));\n });\n }\n return result;\n }\n}\nexport default EncodingVisitor;","import { Mixin } from 'ts-mixer';\nimport { toValue } from '@swagger-api/apidom-core';\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isHeaderElement, isReferenceElement } from \"../../../../predicates.mjs\";\nimport EncodingHeadersElement from \"../../../../elements/nces/EncodingHeaders.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass HeadersVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new EncodingHeadersElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Header'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'header');\n });\n\n // decorate every HeaderElement with metadata about their name\n this.element.forEach((value, key) => {\n if (!isHeaderElement(value)) return;\n const headerName = toValue(key);\n value.setMetaProperty('headerName', headerName);\n });\n return result;\n }\n}\nexport default HeadersVisitor;","import { Mixin } from 'ts-mixer';\nimport { T as stubTrue, always } from 'ramda';\nimport { cloneDeep } from '@swagger-api/apidom-core';\nimport PathsElement from \"../../../../elements/Paths.mjs\";\nimport PatternedFieldsVisitor from \"../../generics/PatternedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isPathItemElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass PathsVisitor extends Mixin(PatternedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new PathsElement();\n this.specPath = always(['document', 'objects', 'PathItem']);\n this.canSupportSpecificationExtensions = true;\n this.fieldPatternPredicate = stubTrue;\n }\n ObjectElement(objectElement) {\n const result = PatternedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every PathItemElement with path metadata\n this.element.filter(isPathItemElement)\n // @ts-ignore\n .forEach((pathItemElement, key) => {\n key.classes.push('openapi-path-template');\n key.classes.push('path-template');\n pathItemElement.setMetaProperty('path', cloneDeep(key));\n });\n return result;\n }\n}\nexport default PathsVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isObjectElement, toValue } from '@swagger-api/apidom-core';\nimport RequestBodyElement from \"../../../../elements/RequestBody.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isMediaTypeElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass RequestBodyVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new RequestBodyElement();\n this.specPath = always(['document', 'objects', 'RequestBody']);\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every MediaTypeElement with media type metadata\n if (isObjectElement(this.element.contentProp)) {\n this.element.contentProp.filter(isMediaTypeElement)\n // @ts-ignore\n .forEach((mediaTypeElement, key) => {\n mediaTypeElement.setMetaProperty('media-type', toValue(key));\n });\n }\n return result;\n }\n}\nexport default RequestBodyVisitor;","import RequestBodyContentElement from \"../../../../elements/nces/RequestBodyContent.mjs\";\nimport BaseContentVisitor from \"../ContentVisitor.mjs\";\n/**\n * @public\n */\nclass ContentVisitor extends BaseContentVisitor {\n constructor(options) {\n super(options);\n this.element = new RequestBodyContentElement();\n }\n}\nexport default ContentVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { toValue } from '@swagger-api/apidom-core';\nimport CallbackElement from \"../../../../elements/Callback.mjs\";\nimport PatternedFieldsVisitor from \"../../generics/PatternedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport { isPathItemElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass CallbackVisitor extends Mixin(PatternedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new CallbackElement();\n this.specPath = always(['document', 'objects', 'PathItem']);\n this.canSupportSpecificationExtensions = true;\n this.fieldPatternPredicate = value => /{(?[^}]{1,2083})}/.test(String(value)); // 2,083 characters is the maximum length of a URL in Chrome\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every PathItemElement with Callback Object expression metadata\n this.element.filter(isPathItemElement)\n // @ts-ignore\n .forEach((pathItemElement, key) => {\n pathItemElement.setMetaProperty('runtime-expression', toValue(key));\n });\n return result;\n }\n}\nexport default CallbackVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isObjectElement, toValue } from '@swagger-api/apidom-core';\nimport ResponseElement from \"../../../../elements/Response.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isHeaderElement, isMediaTypeElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ResponseVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ResponseElement();\n this.specPath = always(['document', 'objects', 'Response']);\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every MediaTypeElement with media type metadata\n if (isObjectElement(this.element.contentProp)) {\n this.element.contentProp.filter(isMediaTypeElement)\n // @ts-ignore\n .forEach((mediaTypeElement, key) => {\n mediaTypeElement.setMetaProperty('media-type', toValue(key));\n });\n }\n\n // decorate every MediaTypeElement with media type metadata\n if (isObjectElement(this.element.headers)) {\n this.element.headers.filter(isHeaderElement)\n // @ts-ignore\n .forEach((headerElement, key) => {\n headerElement.setMetaProperty('header-name', toValue(key));\n });\n }\n return result;\n }\n}\nexport default ResponseVisitor;","import { Mixin } from 'ts-mixer';\nimport { toValue } from '@swagger-api/apidom-core';\nimport ResponseHeadersElement from \"../../../../elements/nces/ResponseHeaders.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isHeaderElement, isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass HeadersVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ResponseHeadersElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Header'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'header');\n });\n\n // decorate every HeaderElement with metadata about their name\n this.element.forEach((value, key) => {\n if (!isHeaderElement(value)) return;\n const headerName = toValue(key);\n value.setMetaProperty('header-name', headerName);\n });\n return result;\n }\n}\nexport default HeadersVisitor;","import ResponseContentElement from \"../../../../elements/nces/ResponseContent.mjs\";\nimport BaseContentVisitor from \"../ContentVisitor.mjs\";\n/**\n * @public\n */\nclass ContentVisitor extends BaseContentVisitor {\n constructor(options) {\n super(options);\n this.element = new ResponseContentElement();\n }\n}\nexport default ContentVisitor;","import { Mixin } from 'ts-mixer';\nimport ResponseLinksElement from \"../../../../elements/nces/ResponseLinks.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass LinksVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ResponseLinksElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Link'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'link');\n });\n return result;\n }\n}\nexport default LinksVisitor;","import { Mixin } from 'ts-mixer';\nimport { difference } from 'ramda';\nimport { BREAK } from '@swagger-api/apidom-core';\nimport FixedFieldsVisitor from \"./FixedFieldsVisitor.mjs\";\nimport PatternedFieldsVisitor from \"./PatternedFieldsVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass MixedFieldsVisitor extends Mixin(FixedFieldsVisitor, PatternedFieldsVisitor) {\n specPathFixedFields;\n specPathPatternedFields;\n constructor({\n specPathFixedFields,\n specPathPatternedFields,\n ...rest\n }) {\n super({\n ...rest\n });\n this.specPathFixedFields = specPathFixedFields;\n this.specPathPatternedFields = specPathPatternedFields;\n }\n ObjectElement(objectElement) {\n const {\n specPath,\n ignoredFields\n } = this;\n try {\n this.specPath = this.specPathFixedFields;\n const fixedFields = this.retrieveFixedFields(this.specPath(objectElement));\n // let FixedFieldsVisitor only process fixed fields and leave rest to PatternedFieldsVisitor\n // @ts-ignore\n this.ignoredFields = [...ignoredFields, ...difference(objectElement.keys(), fixedFields)];\n FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n this.specPath = this.specPathPatternedFields;\n this.ignoredFields = fixedFields;\n PatternedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n } catch (e) {\n this.specPath = specPath;\n throw e;\n }\n return BREAK;\n }\n}\nexport default MixedFieldsVisitor;","import { Mixin } from 'ts-mixer';\nimport { always, range } from 'ramda';\nimport { cloneDeep, toValue } from '@swagger-api/apidom-core';\nimport ResponsesElement from \"../../../../elements/Responses.mjs\";\nimport MixedFieldsVisitor from \"../../generics/MixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement, isResponseElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ResponsesVisitor extends Mixin(MixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ResponsesElement();\n this.specPathFixedFields = always(['document', 'objects', 'Responses']);\n this.canSupportSpecificationExtensions = true;\n this.specPathPatternedFields = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Response'];\n this.fieldPatternPredicate = value => new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${range(100, 600).join('|')})$`).test(String(value));\n }\n ObjectElement(objectElement) {\n const result = MixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'response');\n });\n\n // decorate every ResponseElement with metadata about their status code\n // @ts-ignore\n this.element.filter(isResponseElement).forEach((value, key) => {\n const httpStatusCode = cloneDeep(key);\n if (!this.fieldPatternPredicate(toValue(httpStatusCode))) return;\n value.setMetaProperty('http-status-code', httpStatusCode);\n });\n return result;\n }\n}\nexport default ResponsesVisitor;","import { Mixin } from 'ts-mixer';\nimport { T as stubTrue } from 'ramda';\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement, isResponseElement } from \"../../../../predicates.mjs\";\nimport AlternatingVisitor from \"../../generics/AlternatingVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass DefaultVisitor extends Mixin(AlternatingVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.alternator = [{\n predicate: isReferenceLikeElement,\n specPath: ['document', 'objects', 'Reference']\n }, {\n predicate: stubTrue,\n specPath: ['document', 'objects', 'Response']\n }];\n }\n ObjectElement(objectElement) {\n const result = AlternatingVisitor.prototype.enter.call(this, objectElement);\n\n // decorate ReferenceElement with type of referencing element\n if (isReferenceElement(this.element)) {\n this.element.setMetaProperty('referenced-element', 'response');\n } else if (isResponseElement(this.element)) {\n this.element.setMetaProperty('http-status-code', 'default');\n }\n return result;\n }\n}\nexport default DefaultVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport OperationElement from \"../../../../elements/Operation.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass OperationVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new OperationElement();\n this.specPath = always(['document', 'objects', 'Operation']);\n }\n}\nexport default OperationVisitor;","import { BREAK, cloneDeep } from '@swagger-api/apidom-core';\nimport OperationTagsElement from \"../../../../elements/nces/OperationTags.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass TagsVisitor extends FallbackVisitor {\n constructor(options) {\n super(options);\n this.element = new OperationTagsElement();\n }\n ArrayElement(arrayElement) {\n this.element = this.element.concat(cloneDeep(arrayElement));\n return BREAK;\n }\n}\nexport default TagsVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport { isReferenceLikeElement } from \"../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ParametersVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('parameters');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const specPath = isReferenceLikeElement(item) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Parameter'];\n const element = this.toRefractedElement(specPath, item);\n if (isReferenceElement(element)) {\n element.setMetaProperty('referenced-element', 'parameter');\n }\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default ParametersVisitor;","import OperationParametersElement from \"../../../../elements/nces/OperationParameters.mjs\";\nimport BaseParametersVisitor from \"../ParametersVisitor.mjs\";\n/**\n * @public\n */\nclass ParametersVisitor extends BaseParametersVisitor {\n constructor(options) {\n super(options);\n this.element = new OperationParametersElement();\n }\n}\nexport default ParametersVisitor;","import { T as stubTrue } from 'ramda';\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport AlternatingVisitor from \"../../generics/AlternatingVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass RequestBodyVisitor extends AlternatingVisitor {\n constructor(options) {\n super(options);\n this.alternator = [{\n predicate: isReferenceLikeElement,\n specPath: ['document', 'objects', 'Reference']\n }, {\n predicate: stubTrue,\n specPath: ['document', 'objects', 'RequestBody']\n }];\n }\n ObjectElement(objectElement) {\n const result = AlternatingVisitor.prototype.enter.call(this, objectElement);\n if (isReferenceElement(this.element)) {\n this.element.setMetaProperty('referenced-element', 'requestBody');\n }\n return result;\n }\n}\nexport default RequestBodyVisitor;","import { Mixin } from 'ts-mixer';\nimport { isReferenceLikeElement } from \"../../../predicates.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\nimport OperationCallbacksElement from \"../../../../elements/nces/OperationCallbacks.mjs\";\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass CallbacksVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n specPath;\n constructor(options) {\n super(options);\n this.element = new OperationCallbacksElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'Callback'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n referenceElement.setMetaProperty('referenced-element', 'callback');\n });\n return result;\n }\n}\nexport default CallbacksVisitor;","import { Mixin } from 'ts-mixer';\nimport { isObjectElement, BREAK } from '@swagger-api/apidom-core';\nimport OperationSecurityElement from \"../../../../elements/nces/OperationSecurity.mjs\";\nimport SpecificationVisitor from \"../../SpecificationVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SecurityVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new OperationSecurityElement();\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const specPath = isObjectElement(item) ? ['document', 'objects', 'SecurityRequirement'] : ['value'];\n const element = this.toRefractedElement(specPath, item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default SecurityVisitor;","import OperationServersElement from \"../../../../elements/nces/OperationServers.mjs\";\nimport BaseServersVisitor from \"../ServersVisitor.mjs\";\n/**\n * @public\n */\nclass ServersVisitor extends BaseServersVisitor {\n constructor(options) {\n super(options);\n this.element = new OperationServersElement();\n }\n}\nexport default ServersVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isStringElement, cloneDeep, toValue } from '@swagger-api/apidom-core';\nimport PathItemElement from \"../../../../elements/PathItem.mjs\";\nimport { isOperationElement } from \"../../../../predicates.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass PathItemVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new PathItemElement();\n this.specPath = always(['document', 'objects', 'PathItem']);\n }\n ObjectElement(objectElement) {\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate Operation elements with HTTP method\n this.element.filter(isOperationElement)\n // @ts-ignore\n .forEach((operationElement, httpMethodElementCI) => {\n const httpMethodElementCS = cloneDeep(httpMethodElementCI);\n httpMethodElementCS.content = toValue(httpMethodElementCS).toUpperCase();\n operationElement.setMetaProperty('http-method', httpMethodElementCS);\n });\n\n // mark this PathItemElement with reference metadata\n if (isStringElement(this.element.$ref)) {\n this.element.classes.push('reference-element');\n }\n return result;\n }\n}\nexport default PathItemVisitor;","import FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\nclass $RefVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = super.enter(stringElement);\n this.element.classes.push('reference-value');\n return result;\n }\n}\nexport default $RefVisitor;","import PathItemServersElement from \"../../../../elements/nces/PathItemServers.mjs\";\nimport BaseServersVisitor from \"../ServersVisitor.mjs\";\n/**\n * @public\n */\nclass ServersVisitor extends BaseServersVisitor {\n constructor(options) {\n super(options);\n this.element = new PathItemServersElement();\n }\n}\nexport default ServersVisitor;","import PathItemParametersElement from \"../../../../elements/nces/PathItemParameters.mjs\";\nimport BaseParametersVisitor from \"../ParametersVisitor.mjs\";\n/**\n * @public\n */\nclass ParametersVisitor extends BaseParametersVisitor {\n constructor(options) {\n super(options);\n this.element = new PathItemParametersElement();\n }\n}\nexport default ParametersVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport SecuritySchemeElement from \"../../../../elements/SecurityScheme.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SecuritySchemeVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new SecuritySchemeElement();\n this.specPath = always(['document', 'objects', 'SecurityScheme']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default SecuritySchemeVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport OAuthFlowsElement from \"../../../../elements/OAuthFlows.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass OAuthFlowsVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new OAuthFlowsElement();\n this.specPath = always(['document', 'objects', 'OAuthFlows']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default OAuthFlowsVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport OAuthFlowElement from \"../../../../elements/OAuthFlow.mjs\";\nimport FixedFieldsVisitor from \"../../generics/FixedFieldsVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass OAuthFlowVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new OAuthFlowElement();\n this.specPath = always(['document', 'objects', 'OAuthFlow']);\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default OAuthFlowVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport MapVisitor from \"../../generics/MapVisitor.mjs\";\nimport FallbackVisitor from \"../../FallbackVisitor.mjs\";\nimport OAuthFlowScopesElement from \"../../../../elements/nces/OAuthFlowScopes.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass ScopesVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new OAuthFlowScopesElement();\n this.specPath = always(['value']);\n }\n}\nexport default ScopesVisitor;","import { Mixin } from 'ts-mixer';\nimport { BREAK } from '@swagger-api/apidom-core';\nimport TagsElement from \"../../../elements/nces/Tags.mjs\";\nimport SpecificationVisitor from \"../SpecificationVisitor.mjs\";\nimport FallbackVisitor from \"../FallbackVisitor.mjs\";\nimport { isTagLikeElement } from \"../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass TagsVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new TagsElement();\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const specPath = isTagLikeElement(item) ? ['document', 'objects', 'Tag'] : ['value'];\n const element = this.toRefractedElement(specPath, item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default TagsVisitor;","import { specificationObj as JSONSchemaDraft4Specification } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport OpenApi3_0Visitor from \"./visitors/open-api-3-0/index.mjs\";\nimport OpenapiVisitor from \"./visitors/open-api-3-0/OpenapiVisitor.mjs\";\nimport SpecificationExtensionVisitor from \"./visitors/SpecificationExtensionVisitor.mjs\";\nimport InfoVisitor from \"./visitors/open-api-3-0/info/index.mjs\";\nimport InfoVersionVisitor from \"./visitors/open-api-3-0/info/VersionVisitor.mjs\";\nimport ContactVisitor from \"./visitors/open-api-3-0/contact/index.mjs\";\nimport LicenseVisitor from \"./visitors/open-api-3-0/license/index.mjs\";\nimport LinkVisitor from \"./visitors/open-api-3-0/link/index.mjs\";\nimport LinkOperationRefVisitor from \"./visitors/open-api-3-0/link/OperationRefVisitor.mjs\";\nimport LinkOperationIdVisitor from \"./visitors/open-api-3-0/link/OperationIdVisitor.mjs\";\nimport LinkParametersVisitor from \"./visitors/open-api-3-0/link/ParametersVisitor.mjs\";\nimport ServerVisitor from \"./visitors/open-api-3-0/server/index.mjs\";\nimport ServerUrlVisitor from \"./visitors/open-api-3-0/server/UrlVisitor.mjs\";\nimport ServersVisitor from \"./visitors/open-api-3-0/ServersVisitor.mjs\";\nimport ServerVariableVisitor from \"./visitors/open-api-3-0/server-variable/index.mjs\";\nimport ServerVariablesVisitor from \"./visitors/open-api-3-0/server/VariablesVisitor.mjs\";\nimport FallbackVisitor from \"./visitors/FallbackVisitor.mjs\";\nimport MediaTypeVisitor from \"./visitors/open-api-3-0/media-type/index.mjs\";\nimport MediaTypeSchemaVisitor from \"./visitors/open-api-3-0/media-type/SchemaVisitor.mjs\";\nimport MediaTypeExamplesVisitor from \"./visitors/open-api-3-0/media-type/ExamplesVisitor.mjs\";\nimport MediaTypeEncodingVisitor from \"./visitors/open-api-3-0/media-type/EncodingVisitor.mjs\";\nimport SecurityRequirementVisitor from \"./visitors/open-api-3-0/security-requirement/index.mjs\";\nimport SecurityVisitor from \"./visitors/open-api-3-0/SecurityVisitor.mjs\";\nimport ComponentsVisitor from \"./visitors/open-api-3-0/components/index.mjs\";\nimport TagVisitor from \"./visitors/open-api-3-0/tag/index.mjs\";\nimport ReferenceVisitor from \"./visitors/open-api-3-0/reference/index.mjs\";\nimport Reference$RefVisitor from \"./visitors/open-api-3-0/reference/$RefVisitor.mjs\";\nimport ParameterVisitor from \"./visitors/open-api-3-0/parameter/index.mjs\";\nimport ParameterSchemaVisitor from \"./visitors/open-api-3-0/parameter/SchemaVisitor.mjs\";\nimport HeaderVisitor from \"./visitors/open-api-3-0/header/index.mjs\";\nimport HeaderSchemaVisitor from \"./visitors/open-api-3-0/header/SchemaVisitor.mjs\";\nimport HeaderExamplesVisitor from \"./visitors/open-api-3-0/header/ExamplesVisitor.mjs\";\nimport HeaderContentVisitor from \"./visitors/open-api-3-0/header/ContentVisitor.mjs\";\nimport SchemaVisitor from \"./visitors/open-api-3-0/schema/index.mjs\";\nimport SchemaAllOfVisitor from \"./visitors/open-api-3-0/schema/AllOfVisitor.mjs\";\nimport SchemaAnyOfVisitor from \"./visitors/open-api-3-0/schema/AnyOfVisitor.mjs\";\nimport SchemaOneOfVisitor from \"./visitors/open-api-3-0/schema/OneOfVisitor.mjs\";\nimport SchemaItemsVisitor from \"./visitors/open-api-3-0/schema/ItemsVisitor.mjs\";\nimport SchemaPropertiesVisitor from \"./visitors/open-api-3-0/schema/PropertiesVisitor.mjs\";\nimport SchemaTypeVisitor from \"./visitors/open-api-3-0/schema/TypeVisitor.mjs\";\nimport SchemaOrReferenceVisitor from \"./visitors/open-api-3-0/schema/SchemaOrReferenceVisitor.mjs\";\nimport DiscriminatorVisitor from \"./visitors/open-api-3-0/distriminator/index.mjs\";\nimport DiscriminatorMappingVisitor from \"./visitors/open-api-3-0/distriminator/MappingVisitor.mjs\";\nimport XmlVisitor from \"./visitors/open-api-3-0/xml/index.mjs\";\nimport ParameterExamplesVisitor from \"./visitors/open-api-3-0/parameter/ExamplesVisitor.mjs\";\nimport ParameterContentVisitor from \"./visitors/open-api-3-0/parameter/ContentVisitor.mjs\";\nimport ComponentsSchemasVisitor from \"./visitors/open-api-3-0/components/SchemasVisitor.mjs\";\nimport ComponentsResponsesVisitor from \"./visitors/open-api-3-0/components/ResponsesVisitor.mjs\";\nimport ComponentsParametersVisitor from \"./visitors/open-api-3-0/components/ParametersVisitor.mjs\";\nimport ComponentsExamplesVisitor from \"./visitors/open-api-3-0/components/ExamplesVisitor.mjs\";\nimport ComponentsRequestBodiesVisitor from \"./visitors/open-api-3-0/components/RequestBodiesVisitor.mjs\";\nimport ComponentsHeadersVisitor from \"./visitors/open-api-3-0/components/HeadersVisitor.mjs\";\nimport ComponentsSecuritySchemesVisitor from \"./visitors/open-api-3-0/components/SecuritySchemesVisitor.mjs\";\nimport ComponentsLinksVisitor from \"./visitors/open-api-3-0/components/LinksVisitor.mjs\";\nimport ComponentsCallbacksVisitor from \"./visitors/open-api-3-0/components/CallbacksVisitor.mjs\";\nimport ExampleVisitor from \"./visitors/open-api-3-0/example/index.mjs\";\nimport ExampleExternalValueVisitor from \"./visitors/open-api-3-0/example/ExternalValueVisitor.mjs\";\nimport ExternalDocumentationVisitor from \"./visitors/open-api-3-0/external-documentation/index.mjs\";\nimport EncodingVisitor from \"./visitors/open-api-3-0/encoding/index.mjs\";\nimport EncodingHeadersVisitor from \"./visitors/open-api-3-0/encoding/HeadersVisitor.mjs\";\nimport PathsVisitor from \"./visitors/open-api-3-0/paths/index.mjs\";\nimport RequestBodyVisitor from \"./visitors/open-api-3-0/request-body/index.mjs\";\nimport RequestBodyContentVisitor from \"./visitors/open-api-3-0/request-body/ContentVisitor.mjs\";\nimport CallbackVisitor from \"./visitors/open-api-3-0/callback/index.mjs\";\nimport ResponseVisitor from \"./visitors/open-api-3-0/response/index.mjs\";\nimport ResponseHeadersVisitor from \"./visitors/open-api-3-0/response/HeadersVisitor.mjs\";\nimport ResponseContentVisitor from \"./visitors/open-api-3-0/response/ContentVisitor.mjs\";\nimport ResponseLinksVisitor from \"./visitors/open-api-3-0/response/LinksVisitor.mjs\";\nimport ResponsesVisitor from \"./visitors/open-api-3-0/responses/index.mjs\";\nimport ResponsesDefaultVisitor from \"./visitors/open-api-3-0/responses/DefaultVisitor.mjs\";\nimport OperationVisitor from \"./visitors/open-api-3-0/operation/index.mjs\";\nimport OperationTagsVisitor from \"./visitors/open-api-3-0/operation/TagsVisitor.mjs\";\nimport OperationParametersVisitor from \"./visitors/open-api-3-0/operation/ParametersVisitor.mjs\";\nimport OperationRequestBodyVisitor from \"./visitors/open-api-3-0/operation/RequestBodyVisitor.mjs\";\nimport OperationCallbacksVisitor from \"./visitors/open-api-3-0/operation/CallbacksVisitor.mjs\";\nimport OperationSecurityVisitor from \"./visitors/open-api-3-0/operation/SecurityVisitor.mjs\";\nimport OperationServersVisitor from \"./visitors/open-api-3-0/operation/ServersVisitor.mjs\";\nimport PathItemVisitor from \"./visitors/open-api-3-0/path-item/index.mjs\";\nimport PathItem$RefVisitor from \"./visitors/open-api-3-0/path-item/$RefVisitor.mjs\";\nimport PathItemServersVisitor from \"./visitors/open-api-3-0/path-item/ServersVisitor.mjs\";\nimport PathItemParametersVisitor from \"./visitors/open-api-3-0/path-item/ParametersVisitor.mjs\";\nimport SecuritySchemeVisitor from \"./visitors/open-api-3-0/security-scheme/index.mjs\";\nimport OAuthFlowsVisitor from \"./visitors/open-api-3-0/oauth-flows/index.mjs\";\nimport OAuthFlowVisitor from \"./visitors/open-api-3-0/oauth-flow/index.mjs\";\nimport OAuthFlowScopesVisitor from \"./visitors/open-api-3-0/oauth-flow/ScopesVisitor.mjs\";\nimport TagsVisitor from \"./visitors/open-api-3-0/TagsVisitor.mjs\";\n/**\n * Specification object allows us to have complete control over visitors\n * when traversing the ApiDOM.\n * Specification also allows us to create amended refractors from\n * existing ones by manipulating it.\n *\n * Note: Specification object allows to use absolute internal JSON pointers.\n */\nconst {\n fixedFields: jsonSchemaFixedFields\n} = JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema;\n\n/**\n * @public\n */\nconst specification = {\n visitors: {\n value: FallbackVisitor,\n document: {\n objects: {\n OpenApi: {\n $visitor: OpenApi3_0Visitor,\n fixedFields: {\n openapi: OpenapiVisitor,\n info: {\n $ref: '#/visitors/document/objects/Info'\n },\n servers: ServersVisitor,\n paths: {\n $ref: '#/visitors/document/objects/Paths'\n },\n components: {\n $ref: '#/visitors/document/objects/Components'\n },\n security: SecurityVisitor,\n tags: TagsVisitor,\n externalDocs: {\n $ref: '#/visitors/document/objects/ExternalDocumentation'\n }\n }\n },\n Info: {\n $visitor: InfoVisitor,\n fixedFields: {\n title: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n termsOfService: {\n $ref: '#/visitors/value'\n },\n contact: {\n $ref: '#/visitors/document/objects/Contact'\n },\n license: {\n $ref: '#/visitors/document/objects/License'\n },\n version: InfoVersionVisitor\n }\n },\n Contact: {\n $visitor: ContactVisitor,\n fixedFields: {\n name: {\n $ref: '#/visitors/value'\n },\n url: {\n $ref: '#/visitors/value'\n },\n email: {\n $ref: '#/visitors/value'\n }\n }\n },\n License: {\n $visitor: LicenseVisitor,\n fixedFields: {\n name: {\n $ref: '#/visitors/value'\n },\n url: {\n $ref: '#/visitors/value'\n }\n }\n },\n Server: {\n $visitor: ServerVisitor,\n fixedFields: {\n url: ServerUrlVisitor,\n description: {\n $ref: '#/visitors/value'\n },\n variables: ServerVariablesVisitor\n }\n },\n ServerVariable: {\n $visitor: ServerVariableVisitor,\n fixedFields: {\n enum: {\n $ref: '#/visitors/value'\n },\n default: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n }\n }\n },\n Components: {\n $visitor: ComponentsVisitor,\n fixedFields: {\n schemas: ComponentsSchemasVisitor,\n responses: ComponentsResponsesVisitor,\n parameters: ComponentsParametersVisitor,\n examples: ComponentsExamplesVisitor,\n requestBodies: ComponentsRequestBodiesVisitor,\n headers: ComponentsHeadersVisitor,\n securitySchemes: ComponentsSecuritySchemesVisitor,\n links: ComponentsLinksVisitor,\n callbacks: ComponentsCallbacksVisitor\n }\n },\n Paths: {\n $visitor: PathsVisitor\n },\n PathItem: {\n $visitor: PathItemVisitor,\n fixedFields: {\n $ref: PathItem$RefVisitor,\n summary: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n get: {\n $ref: '#/visitors/document/objects/Operation'\n },\n put: {\n $ref: '#/visitors/document/objects/Operation'\n },\n post: {\n $ref: '#/visitors/document/objects/Operation'\n },\n delete: {\n $ref: '#/visitors/document/objects/Operation'\n },\n options: {\n $ref: '#/visitors/document/objects/Operation'\n },\n head: {\n $ref: '#/visitors/document/objects/Operation'\n },\n patch: {\n $ref: '#/visitors/document/objects/Operation'\n },\n trace: {\n $ref: '#/visitors/document/objects/Operation'\n },\n servers: PathItemServersVisitor,\n parameters: PathItemParametersVisitor\n }\n },\n Operation: {\n $visitor: OperationVisitor,\n fixedFields: {\n tags: OperationTagsVisitor,\n summary: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n externalDocs: {\n $ref: '#/visitors/document/objects/ExternalDocumentation'\n },\n operationId: {\n $ref: '#/visitors/value'\n },\n parameters: OperationParametersVisitor,\n requestBody: OperationRequestBodyVisitor,\n responses: {\n $ref: '#/visitors/document/objects/Responses'\n },\n callbacks: OperationCallbacksVisitor,\n deprecated: {\n $ref: '#/visitors/value'\n },\n security: OperationSecurityVisitor,\n servers: OperationServersVisitor\n }\n },\n ExternalDocumentation: {\n $visitor: ExternalDocumentationVisitor,\n fixedFields: {\n description: {\n $ref: '#/visitors/value'\n },\n url: {\n $ref: '#/visitors/value'\n }\n }\n },\n Parameter: {\n $visitor: ParameterVisitor,\n fixedFields: {\n name: {\n $ref: '#/visitors/value'\n },\n in: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n required: {\n $ref: '#/visitors/value'\n },\n deprecated: {\n $ref: '#/visitors/value'\n },\n allowEmptyValue: {\n $ref: '#/visitors/value'\n },\n style: {\n $ref: '#/visitors/value'\n },\n explode: {\n $ref: '#/visitors/value'\n },\n allowReserved: {\n $ref: '#/visitors/value'\n },\n schema: ParameterSchemaVisitor,\n example: {\n $ref: '#/visitors/value'\n },\n examples: ParameterExamplesVisitor,\n content: ParameterContentVisitor\n }\n },\n RequestBody: {\n $visitor: RequestBodyVisitor,\n fixedFields: {\n description: {\n $ref: '#/visitors/value'\n },\n content: RequestBodyContentVisitor,\n required: {\n $ref: '#/visitors/value'\n }\n }\n },\n MediaType: {\n $visitor: MediaTypeVisitor,\n fixedFields: {\n schema: MediaTypeSchemaVisitor,\n example: {\n $ref: '#/visitors/value'\n },\n examples: MediaTypeExamplesVisitor,\n encoding: MediaTypeEncodingVisitor\n }\n },\n Encoding: {\n $visitor: EncodingVisitor,\n fixedFields: {\n contentType: {\n $ref: '#/visitors/value'\n },\n headers: EncodingHeadersVisitor,\n style: {\n $ref: '#/visitors/value'\n },\n explode: {\n $ref: '#/visitors/value'\n },\n allowReserved: {\n $ref: '#/visitors/value'\n }\n }\n },\n Responses: {\n $visitor: ResponsesVisitor,\n fixedFields: {\n default: ResponsesDefaultVisitor\n }\n },\n Response: {\n $visitor: ResponseVisitor,\n fixedFields: {\n description: {\n $ref: '#/visitors/value'\n },\n headers: ResponseHeadersVisitor,\n content: ResponseContentVisitor,\n links: ResponseLinksVisitor\n }\n },\n Callback: {\n $visitor: CallbackVisitor\n },\n Example: {\n $visitor: ExampleVisitor,\n fixedFields: {\n summary: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n value: {\n $ref: '#/visitors/value'\n },\n externalValue: ExampleExternalValueVisitor\n }\n },\n Link: {\n $visitor: LinkVisitor,\n fixedFields: {\n operationRef: LinkOperationRefVisitor,\n operationId: LinkOperationIdVisitor,\n parameters: LinkParametersVisitor,\n requestBody: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n server: {\n $ref: '#/visitors/document/objects/Server'\n }\n }\n },\n Header: {\n $visitor: HeaderVisitor,\n fixedFields: {\n description: {\n $ref: '#/visitors/value'\n },\n required: {\n $ref: '#/visitors/value'\n },\n deprecated: {\n $ref: '#/visitors/value'\n },\n allowEmptyValue: {\n $ref: '#/visitors/value'\n },\n style: {\n $ref: '#/visitors/value'\n },\n explode: {\n $ref: '#/visitors/value'\n },\n allowReserved: {\n $ref: '#/visitors/value'\n },\n schema: HeaderSchemaVisitor,\n example: {\n $ref: '#/visitors/value'\n },\n examples: HeaderExamplesVisitor,\n content: HeaderContentVisitor\n }\n },\n Tag: {\n $visitor: TagVisitor,\n fixedFields: {\n name: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n externalDocs: {\n $ref: '#/visitors/document/objects/ExternalDocumentation'\n }\n }\n },\n Reference: {\n $visitor: ReferenceVisitor,\n fixedFields: {\n $ref: Reference$RefVisitor\n }\n },\n JSONSchema: {\n $ref: '#/visitors/document/objects/Schema'\n },\n JSONReference: {\n $ref: '#/visitors/document/objects/Reference'\n },\n Schema: {\n $visitor: SchemaVisitor,\n fixedFields: {\n // the following properties are taken directly from the JSON Schema definition and follow the same specifications\n title: jsonSchemaFixedFields.title,\n multipleOf: jsonSchemaFixedFields.multipleOf,\n maximum: jsonSchemaFixedFields.maximum,\n exclusiveMaximum: jsonSchemaFixedFields.exclusiveMaximum,\n minimum: jsonSchemaFixedFields.minimum,\n exclusiveMinimum: jsonSchemaFixedFields.exclusiveMinimum,\n maxLength: jsonSchemaFixedFields.maxLength,\n minLength: jsonSchemaFixedFields.minLength,\n pattern: jsonSchemaFixedFields.pattern,\n maxItems: jsonSchemaFixedFields.maxItems,\n minItems: jsonSchemaFixedFields.minItems,\n uniqueItems: jsonSchemaFixedFields.uniqueItems,\n maxProperties: jsonSchemaFixedFields.maxProperties,\n minProperties: jsonSchemaFixedFields.minProperties,\n required: jsonSchemaFixedFields.required,\n enum: jsonSchemaFixedFields.enum,\n // the following properties are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification\n type: SchemaTypeVisitor,\n allOf: SchemaAllOfVisitor,\n anyOf: SchemaAnyOfVisitor,\n oneOf: SchemaOneOfVisitor,\n not: SchemaOrReferenceVisitor,\n items: SchemaItemsVisitor,\n properties: SchemaPropertiesVisitor,\n additionalProperties: SchemaOrReferenceVisitor,\n description: jsonSchemaFixedFields.description,\n format: jsonSchemaFixedFields.format,\n default: jsonSchemaFixedFields.default,\n // OpenAPI vocabulary\n nullable: {\n $ref: '#/visitors/value'\n },\n discriminator: {\n $ref: '#/visitors/document/objects/Discriminator'\n },\n writeOnly: {\n $ref: '#/visitors/value'\n },\n xml: {\n $ref: '#/visitors/document/objects/XML'\n },\n externalDocs: {\n $ref: '#/visitors/document/objects/ExternalDocumentation'\n },\n example: {\n $ref: '#/visitors/value'\n },\n deprecated: {\n $ref: '#/visitors/value'\n }\n }\n },\n Discriminator: {\n $visitor: DiscriminatorVisitor,\n fixedFields: {\n propertyName: {\n $ref: '#/visitors/value'\n },\n mapping: DiscriminatorMappingVisitor\n }\n },\n XML: {\n $visitor: XmlVisitor,\n fixedFields: {\n name: {\n $ref: '#/visitors/value'\n },\n namespace: {\n $ref: '#/visitors/value'\n },\n prefix: {\n $ref: '#/visitors/value'\n },\n attribute: {\n $ref: '#/visitors/value'\n },\n wrapped: {\n $ref: '#/visitors/value'\n }\n }\n },\n SecurityScheme: {\n $visitor: SecuritySchemeVisitor,\n fixedFields: {\n type: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n },\n name: {\n $ref: '#/visitors/value'\n },\n in: {\n $ref: '#/visitors/value'\n },\n scheme: {\n $ref: '#/visitors/value'\n },\n bearerFormat: {\n $ref: '#/visitors/value'\n },\n flows: {\n $ref: '#/visitors/document/objects/OAuthFlows'\n },\n openIdConnectUrl: {\n $ref: '#/visitors/value'\n }\n }\n },\n OAuthFlows: {\n $visitor: OAuthFlowsVisitor,\n fixedFields: {\n implicit: {\n $ref: '#/visitors/document/objects/OAuthFlow'\n },\n password: {\n $ref: '#/visitors/document/objects/OAuthFlow'\n },\n clientCredentials: {\n $ref: '#/visitors/document/objects/OAuthFlow'\n },\n authorizationCode: {\n $ref: '#/visitors/document/objects/OAuthFlow'\n }\n }\n },\n OAuthFlow: {\n $visitor: OAuthFlowVisitor,\n fixedFields: {\n authorizationUrl: {\n $ref: '#/visitors/value'\n },\n tokenUrl: {\n $ref: '#/visitors/value'\n },\n refreshUrl: {\n $ref: '#/visitors/value'\n },\n scopes: OAuthFlowScopesVisitor\n }\n },\n SecurityRequirement: {\n $visitor: SecurityRequirementVisitor\n }\n },\n extension: {\n $visitor: SpecificationExtensionVisitor\n }\n }\n }\n};\nexport default specification;","import { isElement, isStringElement, isArrayElement, isObjectElement, isMemberElement, createNamespace, includesClasses, hasElementSourceMap } from '@swagger-api/apidom-core';\nimport * as openApi3_0Predicates from \"../predicates.mjs\";\nimport openApi3_0Namespace from \"../namespace.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\nconst createToolbox = () => {\n const namespace = createNamespace(openApi3_0Namespace);\n const predicates = {\n ...openApi3_0Predicates,\n isElement,\n isStringElement,\n isArrayElement,\n isObjectElement,\n isMemberElement,\n includesClasses,\n hasElementSourceMap\n };\n return {\n predicates,\n namespace\n };\n};\nexport default createToolbox;","import { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';\nimport { path } from 'ramda';\nimport specification from \"./specification.mjs\";\nimport { keyMap, getNodeType } from \"../traversal/visitor.mjs\";\nimport createToolbox from \"./toolbox.mjs\";\n/**\n * @public\n */\nconst refract = (value, {\n specPath = ['visitors', 'document', 'objects', 'OpenApi', '$visitor'],\n plugins = []\n} = {}) => {\n const element = baseRefract(value);\n const resolvedSpec = dereference(specification);\n\n /**\n * This is where generic ApiDOM becomes semantic (namespace applied).\n * We don't allow consumers to hook into this translation.\n * Though we allow consumers to define their onw plugins on already transformed ApiDOM.\n */\n const RootVisitorClass = path(specPath, resolvedSpec);\n const rootVisitor = new RootVisitorClass({\n specObj: resolvedSpec\n });\n visit(element, rootVisitor);\n\n /**\n * Running plugins visitors means extra single traversal === performance hit.\n */\n return dispatchRefractorPlugins(rootVisitor.element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n keyMap,\n nodeTypeGetter: getNodeType\n }\n });\n};\n\n/**\n * @public\n */\nexport const createRefractor = specPath => (value, options = {}) => refract(value, {\n specPath,\n ...options\n});\nexport default refract;","import CallbackElement from \"../elements/Callback.mjs\";\nimport ComponentsElement from \"../elements/Components.mjs\";\nimport ContactElement from \"../elements/Contact.mjs\";\nimport DiscriminatorElement from \"../elements/Discriminator.mjs\";\nimport EncodingElement from \"../elements/Encoding.mjs\";\nimport ExampleElement from \"../elements/Example.mjs\";\nimport ExternalDocumentationElement from \"../elements/ExternalDocumentation.mjs\";\nimport HeaderElement from \"../elements/Header.mjs\";\nimport InfoElement from \"../elements/Info.mjs\";\nimport LicenseElement from \"../elements/License.mjs\";\nimport LinkElement from \"../elements/Link.mjs\";\nimport MediaTypeElement from \"../elements/MediaType.mjs\";\nimport OAuthFlowElement from \"../elements/OAuthFlow.mjs\";\nimport OAuthFlowsElement from \"../elements/OAuthFlows.mjs\";\nimport OpenapiElement from \"../elements/Openapi.mjs\";\nimport OpenApi3_0Element from \"../elements/OpenApi3-0.mjs\";\nimport OperationElement from \"../elements/Operation.mjs\";\nimport ParameterElement from \"../elements/Parameter.mjs\";\nimport PathItemElement from \"../elements/PathItem.mjs\";\nimport PathsElement from \"../elements/Paths.mjs\";\nimport ReferenceElement from \"../elements/Reference.mjs\";\nimport RequestBodyElement from \"../elements/RequestBody.mjs\";\nimport ResponseElement from \"../elements/Response.mjs\";\nimport ResponsesElement from \"../elements/Responses.mjs\";\nimport SchemaElement from \"../elements/Schema.mjs\";\nimport SecurityRequirementElement from \"../elements/SecurityRequirement.mjs\";\nimport SecuritySchemeElement from \"../elements/SecurityScheme.mjs\";\nimport ServerElement from \"../elements/Server.mjs\";\nimport ServerVariableElement from \"../elements/ServerVariable.mjs\";\nimport TagElement from \"../elements/Tag.mjs\";\nimport XmlElement from \"../elements/Xml.mjs\";\nimport { createRefractor } from \"./index.mjs\"; // register refractors specific to element types\nCallbackElement.refract = createRefractor(['visitors', 'document', 'objects', 'Callback', '$visitor']);\nComponentsElement.refract = createRefractor(['visitors', 'document', 'objects', 'Components', '$visitor']);\nContactElement.refract = createRefractor(['visitors', 'document', 'objects', 'Contact', '$visitor']);\nExampleElement.refract = createRefractor(['visitors', 'document', 'objects', 'Example', '$visitor']);\nDiscriminatorElement.refract = createRefractor(['visitors', 'document', 'objects', 'Discriminator', '$visitor']);\nEncodingElement.refract = createRefractor(['visitors', 'document', 'objects', 'Encoding', '$visitor']);\nExternalDocumentationElement.refract = createRefractor(['visitors', 'document', 'objects', 'ExternalDocumentation', '$visitor']);\nHeaderElement.refract = createRefractor(['visitors', 'document', 'objects', 'Header', '$visitor']);\nInfoElement.refract = createRefractor(['visitors', 'document', 'objects', 'Info', '$visitor']);\nLicenseElement.refract = createRefractor(['visitors', 'document', 'objects', 'License', '$visitor']);\nLinkElement.refract = createRefractor(['visitors', 'document', 'objects', 'Link', '$visitor']);\nMediaTypeElement.refract = createRefractor(['visitors', 'document', 'objects', 'MediaType', '$visitor']);\nOAuthFlowElement.refract = createRefractor(['visitors', 'document', 'objects', 'OAuthFlow', '$visitor']);\nOAuthFlowsElement.refract = createRefractor(['visitors', 'document', 'objects', 'OAuthFlows', '$visitor']);\nOpenapiElement.refract = createRefractor(['visitors', 'document', 'objects', 'OpenApi', 'fixedFields', 'openapi']);\nOpenApi3_0Element.refract = createRefractor(['visitors', 'document', 'objects', 'OpenApi', '$visitor']);\nOperationElement.refract = createRefractor(['visitors', 'document', 'objects', 'Operation', '$visitor']);\nParameterElement.refract = createRefractor(['visitors', 'document', 'objects', 'Parameter', '$visitor']);\nPathItemElement.refract = createRefractor(['visitors', 'document', 'objects', 'PathItem', '$visitor']);\nPathsElement.refract = createRefractor(['visitors', 'document', 'objects', 'Paths', '$visitor']);\nReferenceElement.refract = createRefractor(['visitors', 'document', 'objects', 'Reference', '$visitor']);\nRequestBodyElement.refract = createRefractor(['visitors', 'document', 'objects', 'RequestBody', '$visitor']);\nResponseElement.refract = createRefractor(['visitors', 'document', 'objects', 'Response', '$visitor']);\nResponsesElement.refract = createRefractor(['visitors', 'document', 'objects', 'Responses', '$visitor']);\nSchemaElement.refract = createRefractor(['visitors', 'document', 'objects', 'Schema', '$visitor']);\nSecurityRequirementElement.refract = createRefractor(['visitors', 'document', 'objects', 'SecurityRequirement', '$visitor']);\nSecuritySchemeElement.refract = createRefractor(['visitors', 'document', 'objects', 'SecurityScheme', '$visitor']);\nServerElement.refract = createRefractor(['visitors', 'document', 'objects', 'Server', '$visitor']);\nServerVariableElement.refract = createRefractor(['visitors', 'document', 'objects', 'ServerVariable', '$visitor']);\nTagElement.refract = createRefractor(['visitors', 'document', 'objects', 'Tag', '$visitor']);\nXmlElement.refract = createRefractor(['visitors', 'document', 'objects', 'XML', '$visitor']);\nexport { CallbackElement, ComponentsElement, ContactElement, DiscriminatorElement, EncodingElement, ExampleElement, ExternalDocumentationElement, HeaderElement, InfoElement, LicenseElement, LinkElement, MediaTypeElement, OAuthFlowElement, OAuthFlowsElement, OpenapiElement, OpenApi3_0Element, OperationElement, ParameterElement, PathItemElement, PathsElement, ReferenceElement, RequestBodyElement, ResponseElement, ResponsesElement, SchemaElement, SecurityRequirementElement, SecuritySchemeElement, ServerElement, ServerVariableElement, TagElement, XmlElement };","import { CallbackElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Callback extends CallbackElement {}\nexport default Callback;","import { ComponentsElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Components extends ComponentsElement {\n get pathItems() {\n return this.get('pathItems');\n }\n set pathItems(pathItems) {\n this.set('pathItems', pathItems);\n }\n}\nexport default Components;","import { ContactElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Contact extends ContactElement {}\nexport default Contact;","import { DiscriminatorElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Discriminator extends DiscriminatorElement {}\nexport default Discriminator;","import { EncodingElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Encoding extends EncodingElement {}\nexport default Encoding;","import { ExampleElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Example extends ExampleElement {}\nexport default Example;","import { ExternalDocumentationElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass ExternalDocumentation extends ExternalDocumentationElement {}\nexport default ExternalDocumentation;","import { HeaderElement } from '@swagger-api/apidom-ns-openapi-3-0';\n/**\n * @public\n */\nclass Header extends HeaderElement {\n get schema() {\n return this.get('schema');\n }\n set schema(schema) {\n this.set('schema', schema);\n }\n}\nexport default Header;","import { InfoElement } from '@swagger-api/apidom-ns-openapi-3-0';\n/**\n * @public\n */\nclass Info extends InfoElement {\n get license() {\n return this.get('license');\n }\n set license(licenseElement) {\n this.set('license', licenseElement);\n }\n get summary() {\n return this.get('summary');\n }\n set summary(summary) {\n this.set('summary', summary);\n }\n}\nexport default Info;","import { StringElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nclass JsonSchemaDialect extends StringElement {\n static default = new JsonSchemaDialect('https://spec.openapis.org/oas/3.1/dialect/base');\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'jsonSchemaDialect';\n }\n}\nexport default JsonSchemaDialect;","import { LicenseElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass License extends LicenseElement {\n get identifier() {\n return this.get('identifier');\n }\n set identifier(name) {\n this.set('identifier', name);\n }\n}\nexport default License;","import { LinkElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Link extends LinkElement {}\nexport default Link;","import { MediaTypeElement } from '@swagger-api/apidom-ns-openapi-3-0';\n/**\n * @public\n */\nclass MediaType extends MediaTypeElement {\n get schema() {\n return this.get('schema');\n }\n set schema(schema) {\n this.set('schema', schema);\n }\n}\nexport default MediaType;","import { OAuthFlowElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass OAuthFlow extends OAuthFlowElement {}\nexport default OAuthFlow;","import { OAuthFlowsElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass OAuthFlows extends OAuthFlowsElement {}\nexport default OAuthFlows;","import { OpenapiElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Openapi extends OpenapiElement {}\nexport default Openapi;","import { ObjectElement } from '@swagger-api/apidom-core';\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass OpenApi3_1 extends ObjectElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'openApi3_1';\n this.classes.push('api');\n }\n get openapi() {\n return this.get('openapi');\n }\n set openapi(openapi) {\n this.set('openapi', openapi);\n }\n get info() {\n return this.get('info');\n }\n set info(info) {\n this.set('info', info);\n }\n get jsonSchemaDialect() {\n return this.get('jsonSchemaDialect');\n }\n set jsonSchemaDialect(jsonSchemaDialect) {\n this.set('jsonSchemaDialect', jsonSchemaDialect);\n }\n get servers() {\n return this.get('servers');\n }\n set servers(servers) {\n this.set('servers', servers);\n }\n get paths() {\n return this.get('paths');\n }\n set paths(paths) {\n this.set('paths', paths);\n }\n get components() {\n return this.get('components');\n }\n set components(components) {\n this.set('components', components);\n }\n get security() {\n return this.get('security');\n }\n set security(security) {\n this.set('security', security);\n }\n get tags() {\n return this.get('tags');\n }\n set tags(tags) {\n this.set('tags', tags);\n }\n get externalDocs() {\n return this.get('externalDocs');\n }\n set externalDocs(externalDocs) {\n this.set('externalDocs', externalDocs);\n }\n get webhooks() {\n return this.get('webhooks');\n }\n set webhooks(webhooks) {\n this.set('webhooks', webhooks);\n }\n}\nexport default OpenApi3_1;","import { OperationElement } from '@swagger-api/apidom-ns-openapi-3-0';\n/**\n * @public\n */\nclass Operation extends OperationElement {\n get requestBody() {\n return this.get('requestBody');\n }\n set requestBody(requestBody) {\n this.set('requestBody', requestBody);\n }\n}\nexport default Operation;","import { ParameterElement } from '@swagger-api/apidom-ns-openapi-3-0';\n/**\n * @public\n */\nclass Parameter extends ParameterElement {\n get schema() {\n return this.get('schema');\n }\n set schema(schema) {\n this.set('schema', schema);\n }\n}\nexport default Parameter;","import { PathItemElement } from '@swagger-api/apidom-ns-openapi-3-0';\n/**\n * @public\n */\nclass PathItem extends PathItemElement {\n get GET() {\n return this.get('get');\n }\n set GET(operation) {\n this.set('GET', operation);\n }\n get PUT() {\n return this.get('put');\n }\n set PUT(operation) {\n this.set('PUT', operation);\n }\n get POST() {\n return this.get('post');\n }\n set POST(operation) {\n this.set('POST', operation);\n }\n get DELETE() {\n return this.get('delete');\n }\n set DELETE(operation) {\n this.set('DELETE', operation);\n }\n get OPTIONS() {\n return this.get('options');\n }\n set OPTIONS(operation) {\n this.set('OPTIONS', operation);\n }\n get HEAD() {\n return this.get('head');\n }\n set HEAD(operation) {\n this.set('HEAD', operation);\n }\n get PATCH() {\n return this.get('patch');\n }\n set PATCH(operation) {\n this.set('PATCH', operation);\n }\n get TRACE() {\n return this.get('trace');\n }\n set TRACE(operation) {\n this.set('TRACE', operation);\n }\n}\nexport default PathItem;","import { PathsElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Paths extends PathsElement {}\nexport default Paths;","import { ReferenceElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Reference extends ReferenceElement {}\nObject.defineProperty(Reference.prototype, 'description', {\n get() {\n return this.get('description');\n },\n set(description) {\n this.set('description', description);\n },\n enumerable: true\n});\nObject.defineProperty(Reference.prototype, 'summary', {\n get() {\n return this.get('summary');\n },\n set(description) {\n this.set('summary', description);\n },\n enumerable: true\n});\nexport default Reference;","import { RequestBodyElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass RequestBody extends RequestBodyElement {}\nexport default RequestBody;","import { ResponseElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Response extends ResponseElement {}\nexport default Response;","import { ResponsesElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Responses extends ResponsesElement {}\nexport default Responses;","import { UnsupportedOperationError } from '@swagger-api/apidom-error';\nimport { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';\n\n/* eslint-disable class-methods-use-this */\n\n/**\n * @public\n */\nclass JSONSchema extends JSONSchemaElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'JSONSchemaDraft6';\n }\n\n /**\n * Core vocabulary\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-01\n */\n\n get idProp() {\n throw new UnsupportedOperationError('id keyword from Core vocabulary has been renamed to $id.');\n }\n set idProp(id) {\n throw new UnsupportedOperationError('id keyword from Core vocabulary has been renamed to $id.');\n }\n get $id() {\n return this.get('$id');\n }\n set $id($id) {\n this.set('$id', $id);\n }\n\n /**\n * Validation vocabulary\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01\n */\n\n /**\n * Validation keywords for numeric instances (number and integer)\n */\n\n get exclusiveMaximum() {\n return this.get('exclusiveMaximum');\n }\n set exclusiveMaximum(exclusiveMaximum) {\n this.set('exclusiveMaximum', exclusiveMaximum);\n }\n get exclusiveMinimum() {\n return this.get('exclusiveMinimum');\n }\n set exclusiveMinimum(exclusiveMinimum) {\n this.set('exclusiveMinimum', exclusiveMinimum);\n }\n\n /**\n * Validation keywords for arrays\n */\n\n get containsProp() {\n return this.get('contains');\n }\n set containsProp(contains) {\n this.set('contains', contains);\n }\n get items() {\n return this.get('items');\n }\n set items(items) {\n this.set('items', items);\n }\n\n /**\n * Validation keywords for objects\n */\n\n get propertyNames() {\n return this.get('propertyNames');\n }\n set propertyNames(propertyNames) {\n this.set('propertyNames', propertyNames);\n }\n\n /**\n * Validation keywords for any instance type\n */\n\n get const() {\n return this.get('const');\n }\n set const(constValue) {\n this.set('const', constValue);\n }\n get not() {\n return this.get('not');\n }\n set not(not) {\n this.set('not', not);\n }\n\n /**\n * Metadata keywords\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-01#section-7\n */\n\n get examples() {\n return this.get('examples');\n }\n set examples(examples) {\n this.set('examples', examples);\n }\n}\nexport default JSONSchema;","import { UnsupportedOperationError } from '@swagger-api/apidom-error';\nimport { LinkDescriptionElement } from '@swagger-api/apidom-ns-json-schema-draft-4';\n/* eslint-disable class-methods-use-this */\n\n/**\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6\n * @public\n */\n\nclass LinkDescription extends LinkDescriptionElement {\n get hrefSchema() {\n return this.get('hrefSchema');\n }\n set hrefSchema(hrefSchema) {\n this.set('hrefSchema', hrefSchema);\n }\n get targetSchema() {\n return this.get('targetSchema');\n }\n set targetSchema(targetSchema) {\n this.set('targetSchema', targetSchema);\n }\n get schema() {\n throw new UnsupportedOperationError('schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.');\n }\n set schema(schema) {\n throw new UnsupportedOperationError('schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.');\n }\n get submissionSchema() {\n return this.get('submissionSchema');\n }\n set submissionSchema(submissionSchema) {\n this.set('submissionSchema', submissionSchema);\n }\n get method() {\n throw new UnsupportedOperationError('method keyword from Hyper-Schema vocabulary has been removed.');\n }\n set method(method) {\n throw new UnsupportedOperationError('method keyword from Hyper-Schema vocabulary has been removed.');\n }\n get encType() {\n throw new UnsupportedOperationError('encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.');\n }\n set encType(encType) {\n throw new UnsupportedOperationError('encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.');\n }\n get submissionEncType() {\n return this.get('submissionEncType');\n }\n set submissionEncType(submissionEncType) {\n this.set('submissionEncType', submissionEncType);\n }\n}\nexport default LinkDescription;","import { JSONReferenceElement, MediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\n/**\n * @public\n */\nconst jsonSchemaDraft6 = {\n namespace: options => {\n const {\n base\n } = options;\n base.register('jSONSchemaDraft6', JSONSchemaElement);\n base.register('jSONReference', JSONReferenceElement);\n base.register('media', MediaElement);\n base.register('linkDescription', LinkDescriptionElement);\n return base;\n }\n};\nexport default jsonSchemaDraft6;","import { keyMap as keyMapBase } from '@swagger-api/apidom-core';\nexport { getNodeType } from '@swagger-api/apidom-ns-json-schema-draft-4';\n\n/**\n * @public\n */\nexport const keyMap = {\n JSONSchemaDraft6Element: ['content'],\n JSONReferenceElement: ['content'],\n MediaElement: ['content'],\n LinkDescriptionElement: ['content'],\n ...keyMapBase\n};","import { JSONSchemaVisitor as JSONSchemaDraft4Visitor } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport JSONSchemaElement from \"../../../elements/JSONSchema.mjs\";\n/**\n * @public\n */\nclass JSONSchemaVisitor extends JSONSchemaDraft4Visitor {\n constructor(options) {\n super(options);\n this.element = new JSONSchemaElement();\n }\n\n // eslint-disable-next-line class-methods-use-this\n get defaultDialectIdentifier() {\n return 'http://json-schema.org/draft-06/schema#';\n }\n BooleanElement(booleanElement) {\n const result = this.enter(booleanElement);\n this.element.classes.push('boolean-json-schema');\n return result;\n }\n handleSchemaIdentifier(objectElement, identifierKeyword = '$id') {\n return super.handleSchemaIdentifier(objectElement, identifierKeyword);\n }\n}\nexport default JSONSchemaVisitor;","import { BREAK } from '@swagger-api/apidom-core';\nimport { ItemsVisitor as JSONSchemaDraft4ItemsVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';\n/**\n * @public\n */\nclass ItemsVisitor extends JSONSchemaDraft4ItemsVisitor {\n BooleanElement(booleanElement) {\n this.element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], booleanElement);\n return BREAK;\n }\n}\nexport default ItemsVisitor;","import { FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';\n/**\n * @public\n */\nclass ExamplesVisitor extends FallbackVisitor {\n ArrayElement(arrayElement) {\n const result = this.enter(arrayElement);\n this.element.classes.push('json-schema-examples');\n return result;\n }\n}\nexport default ExamplesVisitor;","import { LinkDescriptionVisitor as JSONSchemaDraft4LinkDescriptionVisitor } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport LinkDescriptionElement from \"../../../../elements/LinkDescription.mjs\";\n/**\n * @public\n */\nclass LinkDescriptionVisitor extends JSONSchemaDraft4LinkDescriptionVisitor {\n constructor(options) {\n super(options);\n this.element = new LinkDescriptionElement();\n }\n}\nexport default LinkDescriptionVisitor;","import { pipe, assocPath, dissocPath } from 'ramda';\nimport { specificationObj } from '@swagger-api/apidom-ns-json-schema-draft-4';\nimport JSONSchemaVisitor from \"./visitors/json-schema/index.mjs\";\nimport JSONSchemaItemsVisitor from \"./visitors/json-schema/ItemsVisitor.mjs\";\nimport JSONSchemaExamplesVisitor from \"./visitors/json-schema/ExamplesVisitor.mjs\";\nimport LinkDescriptionVisitor from \"./visitors/json-schema/link-description/index.mjs\";\nconst specification = pipe(\n// JSON Schema object modifications\nassocPath(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], JSONSchemaVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'id']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$id'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contains'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'items'], JSONSchemaItemsVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'propertyNames'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'const'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'examples'], JSONSchemaExamplesVisitor),\n// Link Description object modifications\nassocPath(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], LinkDescriptionVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'hrefSchema'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'schema']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionSchema'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'method']), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'encType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionEncType'], specificationObj.visitors.value))(specificationObj);\nexport default specification;","import { createPredicate } from '@swagger-api/apidom-core';\nimport JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\nexport { isJSONReferenceElement, isMediaElement } from '@swagger-api/apidom-ns-json-schema-draft-4';\n\n/**\n * @public\n */\nexport const isJSONSchemaElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof JSONSchemaElement || hasBasicElementProps(element) && isElementType('JSONSchemaDraft6', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isLinkDescriptionElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LinkDescriptionElement || hasBasicElementProps(element) && isElementType('linkDescription', element) && primitiveEq('object', element);\n});","import { createNamespace, isStringElement } from '@swagger-api/apidom-core';\nimport * as jsonSchemaDraft6Predicates from \"../predicates.mjs\";\nimport jsonSchemaDraft6Namespace from \"../namespace.mjs\";\nconst createToolbox = () => {\n const namespace = createNamespace(jsonSchemaDraft6Namespace);\n const predicates = {\n ...jsonSchemaDraft6Predicates,\n isStringElement\n };\n return {\n predicates,\n namespace\n };\n};\nexport default createToolbox;","import { path } from 'ramda';\nimport { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';\nimport specification from \"./specification.mjs\";\nimport { keyMap, getNodeType } from \"../traversal/visitor.mjs\";\nimport createToolbox from \"./toolbox.mjs\";\n/**\n * @public\n */\nconst refract = (value, {\n specPath = ['visitors', 'document', 'objects', 'JSONSchema', '$visitor'],\n plugins = [],\n specificationObj = specification\n} = {}) => {\n const element = baseRefract(value);\n const resolvedSpec = dereference(specificationObj);\n\n /**\n * This is where generic ApiDOM becomes semantic (namespace applied).\n * We don't allow consumers to hook into this translation.\n * Though we allow consumers to define their onw plugins on already transformed ApiDOM.\n */\n const RootVisitorClass = path(specPath, resolvedSpec);\n const rootVisitor = new RootVisitorClass({\n specObj: resolvedSpec\n });\n visit(element, rootVisitor);\n\n /**\n * Running plugins visitors means extra single traversal === performance hit.\n */\n return dispatchRefractorPlugins(rootVisitor.element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n keyMap,\n nodeTypeGetter: getNodeType\n }\n });\n};\n\n/**\n * @public\n */\nexport const createRefractor = specPath => (value, options = {}) => refract(value, {\n specPath,\n ...options\n});\nexport default refract;","import JSONSchemaElement from \"../elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"../elements/LinkDescription.mjs\";\nimport { createRefractor } from \"./index.mjs\"; // register refractors specific to element types\nJSONSchemaElement.refract = createRefractor(['visitors', 'document', 'objects', 'JSONSchema', '$visitor']);\nLinkDescriptionElement.refract = createRefractor(['visitors', 'document', 'objects', 'LinkDescription', '$visitor']);\nexport { JSONSchemaElement, LinkDescriptionElement };","import { UnsupportedOperationError } from '@swagger-api/apidom-error';\nimport { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-6';\n\n/* eslint-disable class-methods-use-this */\n/**\n * @public\n */\nclass JSONSchema extends JSONSchemaElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'JSONSchemaDraft7';\n }\n\n /**\n * Core vocabulary\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-01\n */\n\n get $comment() {\n return this.get('$comment');\n }\n set $comment($comment) {\n this.set('$comment', $comment);\n }\n\n /**\n * Validation vocabulary\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01\n */\n\n /**\n * Validation keywords for arrays\n */\n get items() {\n return this.get('items');\n }\n set items(items) {\n this.set('items', items);\n }\n\n /**\n * Keywords for Applying Subschemas Conditionally\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.6\n */\n\n get if() {\n return this.get('if');\n }\n set if(ifValue) {\n this.set('if', ifValue);\n }\n get then() {\n return this.get('then');\n }\n set then(then) {\n this.set('then', then);\n }\n get else() {\n return this.get('else');\n }\n set else(elseValue) {\n this.set('else', elseValue);\n }\n\n /**\n * Keywords for Applying Subschemas With Boolean Logic\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-6.7\n */\n\n get not() {\n return this.get('not');\n }\n set not(not) {\n this.set('not', not);\n }\n\n /**\n * String-Encoding Non-JSON Data\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-00#section-8\n */\n\n get contentEncoding() {\n return this.get('contentEncoding');\n }\n set contentEncoding(contentEncoding) {\n this.set('contentEncoding', contentEncoding);\n }\n get contentMediaType() {\n return this.get('contentMediaType');\n }\n set contentMediaType(contentMediaType) {\n this.set('contentMediaType', contentMediaType);\n }\n get media() {\n throw new UnsupportedOperationError('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as \"contentMediaType\" / \"contentEncoding\"');\n }\n set media(media) {\n throw new UnsupportedOperationError('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as \"contentMediaType\" / \"contentEncoding\"');\n }\n\n /**\n * Schema annotations\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-10\n */\n\n get writeOnly() {\n return this.get('writeOnly');\n }\n set writeOnly(writeOnly) {\n this.set('writeOnly', writeOnly);\n }\n}\nexport default JSONSchema;","import { UnsupportedOperationError } from '@swagger-api/apidom-error';\nimport { LinkDescriptionElement } from '@swagger-api/apidom-ns-json-schema-draft-6';\n/* eslint-disable class-methods-use-this */\n\n/**\n * URI: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-hyperschema-01#section-6\n * @public\n */\n\nclass LinkDescription extends LinkDescriptionElement {\n /**\n * Link context.\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.1\n */\n\n get anchor() {\n return this.get('anchor');\n }\n set anchor(anchor) {\n this.set('anchor', anchor);\n }\n get anchorPointer() {\n return this.get('anchorPointer');\n }\n set anchorPointer(anchorPointer) {\n this.set('anchorPointer', anchorPointer);\n }\n\n /**\n * Adjusting URI Template Resolution.\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.4\n */\n\n get templatePointers() {\n return this.get('templatePointers');\n }\n set templatePointers(templatePointers) {\n this.set('templatePointers', templatePointers);\n }\n get templateRequired() {\n return this.get('templateRequired');\n }\n set templateRequired(templateRequired) {\n this.set('templateRequired', templateRequired);\n }\n\n /**\n * Link Target Attributes.\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.5\n */\n\n get targetSchema() {\n return this.get('targetSchema');\n }\n set targetSchema(targetSchema) {\n this.set('targetSchema', targetSchema);\n }\n get mediaType() {\n throw new UnsupportedOperationError('mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.');\n }\n set mediaType(mediaType) {\n throw new UnsupportedOperationError('mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.');\n }\n get targetMediaType() {\n return this.get('targetMediaType');\n }\n set targetMediaType(targetMediaType) {\n this.set('targetMediaType', targetMediaType);\n }\n get targetHints() {\n return this.get('targetHints');\n }\n set targetHints(targetHints) {\n this.set('targetHints', targetHints);\n }\n get description() {\n return this.get('description');\n }\n set description(description) {\n this.set('description', description);\n }\n get $comment() {\n return this.get('$comment');\n }\n set $comment($comment) {\n this.set('$comment', $comment);\n }\n\n /**\n * Link Input.\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6\n */\n\n get hrefSchema() {\n return this.get('hrefSchema');\n }\n set hrefSchema(hrefSchema) {\n this.set('hrefSchema', hrefSchema);\n }\n get headerSchema() {\n return this.get('headerSchema');\n }\n set headerSchema(headerSchema) {\n this.set('headerSchema', headerSchema);\n }\n\n /**\n * Submitting Data for Processing.\n *\n * URI: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-01#section-6.6.4\n */\n\n get submissionSchema() {\n return this.get('submissionSchema');\n }\n set submissionSchema(submissionSchema) {\n this.set('submissionSchema', submissionSchema);\n }\n get submissionEncType() {\n throw new UnsupportedOperationError('submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.');\n }\n set submissionEncType(submissionEncType) {\n throw new UnsupportedOperationError('submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.');\n }\n get submissionMediaType() {\n return this.get('submissionMediaType');\n }\n set submissionMediaType(submissionMediaType) {\n this.set('submissionMediaType', submissionMediaType);\n }\n}\nexport default LinkDescription;","import { JSONReferenceElement } from '@swagger-api/apidom-ns-json-schema-draft-6';\nimport JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\n/**\n * @public\n */\nconst jsonSchemaDraft7 = {\n namespace: options => {\n const {\n base\n } = options;\n base.register('jSONSchemaDraft7', JSONSchemaElement);\n base.register('jSONReference', JSONReferenceElement);\n base.register('linkDescription', LinkDescriptionElement);\n return base;\n }\n};\nexport default jsonSchemaDraft7;","import { keyMap as keyMapBase } from '@swagger-api/apidom-core';\nexport { getNodeType } from '@swagger-api/apidom-ns-json-schema-draft-6';\n\n/**\n * @public\n */\nexport const keyMap = {\n JSONSchemaDraft7Element: ['content'],\n JSONReferenceElement: ['content'],\n LinkDescriptionElement: ['content'],\n ...keyMapBase\n};","import { JSONSchemaVisitor as JSONSchemaDraft6Visitor } from '@swagger-api/apidom-ns-json-schema-draft-6';\nimport JSONSchemaElement from \"../../../elements/JSONSchema.mjs\";\n/**\n * @public\n */\nclass JSONSchemaVisitor extends JSONSchemaDraft6Visitor {\n constructor(options) {\n super(options);\n this.element = new JSONSchemaElement();\n }\n\n // eslint-disable-next-line class-methods-use-this\n get defaultDialectIdentifier() {\n return 'http://json-schema.org/draft-07/schema#';\n }\n}\nexport default JSONSchemaVisitor;","import { LinkDescriptionVisitor as JSONSchemaDraft6LinkDescriptionVisitor } from '@swagger-api/apidom-ns-json-schema-draft-6';\nimport LinkDescriptionElement from \"../../../../elements/LinkDescription.mjs\";\n/**\n * @public\n */\nclass LinkDescriptionVisitor extends JSONSchemaDraft6LinkDescriptionVisitor {\n constructor(options) {\n super(options);\n this.element = new LinkDescriptionElement();\n }\n}\nexport default LinkDescriptionVisitor;","import { pipe, assocPath, dissocPath } from 'ramda';\nimport { specificationObj } from '@swagger-api/apidom-ns-json-schema-draft-6';\nimport JSONSchemaVisitor from \"./visitors/json-schema/index.mjs\";\nimport LinkDescriptionVisitor from \"./visitors/json-schema/link-description/index.mjs\";\nconst specification = pipe(\n// JSON Schema object modifications\nassocPath(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$comment'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'if'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'then'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'else'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'media']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentEncoding'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentMediaType'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'writeOnly'], specificationObj.visitors.value),\n// Link Description object modifications\nassocPath(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], LinkDescriptionVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchor'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'anchorPointer'], specificationObj.visitors.value), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'mediaType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetMediaType'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetHints'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'description'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', '$comment'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'headerSchema'], specificationObj.visitors.JSONSchemaOrJSONReferenceVisitor), dissocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionEncType']), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionMediaType'], specificationObj.visitors.value))(specificationObj);\nexport default specification;","import { createPredicate } from '@swagger-api/apidom-core';\nimport JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\nexport { isJSONReferenceElement } from '@swagger-api/apidom-ns-json-schema-draft-6';\n\n/**\n * @public\n */\nexport const isJSONSchemaElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof JSONSchemaElement || hasBasicElementProps(element) && isElementType('JSONSchemaDraft7', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isLinkDescriptionElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LinkDescriptionElement || hasBasicElementProps(element) && isElementType('linkDescription', element) && primitiveEq('object', element);\n});","import { createNamespace, isStringElement } from '@swagger-api/apidom-core';\nimport * as jsonSchemaDraft7Predicates from \"../predicates.mjs\";\nimport jsonSchemaDraft7Namespace from \"../namespace.mjs\";\nconst createToolbox = () => {\n const namespace = createNamespace(jsonSchemaDraft7Namespace);\n const predicates = {\n ...jsonSchemaDraft7Predicates,\n isStringElement\n };\n return {\n predicates,\n namespace\n };\n};\nexport default createToolbox;","import { path } from 'ramda';\nimport { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';\nimport specification from \"./specification.mjs\";\nimport { keyMap, getNodeType } from \"../traversal/visitor.mjs\";\nimport createToolbox from \"./toolbox.mjs\";\n/**\n * @public\n */\nconst refract = (value, {\n specPath = ['visitors', 'document', 'objects', 'JSONSchema', '$visitor'],\n plugins = [],\n specificationObj = specification\n} = {}) => {\n const element = baseRefract(value);\n const resolvedSpec = dereference(specificationObj);\n\n /**\n * This is where generic ApiDOM becomes semantic (namespace applied).\n * We don't allow consumers to hook into this translation.\n * Though we allow consumers to define their onw plugins on already transformed ApiDOM.\n */\n const RootVisitorClass = path(specPath, resolvedSpec);\n const rootVisitor = new RootVisitorClass({\n specObj: resolvedSpec\n });\n visit(element, rootVisitor);\n\n /**\n * Run plugins only when necessary.\n * Running plugins visitors means extra single traversal === performance hit.\n */\n return dispatchRefractorPlugins(rootVisitor.element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n keyMap,\n nodeTypeGetter: getNodeType\n }\n });\n};\n\n/**\n * @public\n */\nexport const createRefractor = specPath => (value, options = {}) => refract(value, {\n specPath,\n ...options\n});\nexport default refract;","import JSONSchemaElement from \"../elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"../elements/LinkDescription.mjs\";\nimport { createRefractor } from \"./index.mjs\"; // register refractors specific to element types\nJSONSchemaElement.refract = createRefractor(['visitors', 'document', 'objects', 'JSONSchema', '$visitor']);\nLinkDescriptionElement.refract = createRefractor(['visitors', 'document', 'objects', 'LinkDescription', '$visitor']);\nexport { JSONSchemaElement, LinkDescriptionElement };","import { UnsupportedOperationError } from '@swagger-api/apidom-error';\nimport { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/* eslint-disable class-methods-use-this */\n\n/**\n * @public\n */\nclass JSONSchema extends JSONSchemaElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'JSONSchema201909';\n }\n\n /**\n * Core vocabulary\n *\n * URI: https://json-schema.org/draft/2019-09/vocab/core\n */\n\n get $vocabulary() {\n return this.get('$vocabulary');\n }\n set $vocabulary($vocabulary) {\n this.set('$vocabulary', $vocabulary);\n }\n get $anchor() {\n return this.get('$anchor');\n }\n set $anchor($anchor) {\n this.set('$anchor', $anchor);\n }\n get $recursiveAnchor() {\n return this.get('$recursiveAnchor');\n }\n set $recursiveAnchor($recursiveAnchor) {\n this.set('$recursiveAnchor', $recursiveAnchor);\n }\n get $recursiveRef() {\n return this.get('$recursiveRef');\n }\n set $recursiveRef($recursiveRef) {\n this.set('$recursiveRef', $recursiveRef);\n }\n get $ref() {\n return this.get('$ref');\n }\n set $ref($ref) {\n this.set('$ref', $ref);\n }\n get $defs() {\n return this.get('$defs');\n }\n set $defs($defs) {\n this.set('$defs', $defs);\n }\n get definitions() {\n throw new UnsupportedOperationError('definitions keyword from Validation vocabulary has been renamed to $defs.');\n }\n set definitions(definitions) {\n throw new UnsupportedOperationError('definitions keyword from Validation vocabulary has been renamed to $defs.');\n }\n\n /**\n * Applicator vocabulary\n *\n * URI: https://json-schema.org/draft/2019-09/vocab/applicator\n */\n\n get not() {\n return this.get('not');\n }\n set not(not) {\n this.set('not', not);\n }\n get if() {\n return this.get('if');\n }\n set if(ifSchema) {\n this.set('if', ifSchema);\n }\n get then() {\n return this.get('then');\n }\n set then(thenSchema) {\n this.set('then', thenSchema);\n }\n get else() {\n return this.get('else');\n }\n set else(elseSchema) {\n this.set('else', elseSchema);\n }\n get dependentSchemas() {\n return this.get('dependentSchemas');\n }\n set dependentSchemas(dependentSchemas) {\n this.set('dependentSchemas', dependentSchemas);\n }\n get dependencies() {\n throw new UnsupportedOperationError('dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.');\n }\n set dependencies(dependencies) {\n throw new UnsupportedOperationError('dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.');\n }\n get items() {\n return this.get('items');\n }\n set items(items) {\n this.set('items', items);\n }\n get containsProp() {\n return this.get('contains');\n }\n set containsProp(containsProp) {\n this.set('contains', containsProp);\n }\n get additionalProperties() {\n return this.get('additionalProperties');\n }\n set additionalProperties(additionalProperties) {\n this.set('additionalProperties', additionalProperties);\n }\n get additionalItems() {\n return this.get('additionalItems');\n }\n set additionalItems(additionalItems) {\n this.set('additionalItems', additionalItems);\n }\n get propertyNames() {\n return this.get('propertyNames');\n }\n set propertyNames(propertyNames) {\n this.set('propertyNames', propertyNames);\n }\n get unevaluatedItems() {\n return this.get('unevaluatedItems');\n }\n set unevaluatedItems(unevaluatedItems) {\n this.set('unevaluatedItems', unevaluatedItems);\n }\n get unevaluatedProperties() {\n return this.get('unevaluatedProperties');\n }\n set unevaluatedProperties(unevaluatedProperties) {\n this.set('unevaluatedProperties', unevaluatedProperties);\n }\n\n /**\n * Validation vocabulary\n *\n * URI: https://json-schema.org/draft/2019-09/json-schema-validation#rfc.section.6\n */\n\n /**\n * Validation Keywords for Arrays\n *\n * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.6.4\n */\n\n get maxContains() {\n return this.get('maxContains');\n }\n set maxContains(maxContains) {\n this.set('maxContains', maxContains);\n }\n get minContains() {\n return this.get('minContains');\n }\n set minContains(minContains) {\n this.set('minContains', minContains);\n }\n\n /**\n * Validation Keywords for Objects\n *\n * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-validation-02#rfc.section.6.5\n */\n\n get dependentRequired() {\n return this.get('dependentRequired');\n }\n set dependentRequired(dependentRequired) {\n this.set('dependentRequired', dependentRequired);\n }\n\n /**\n * Vocabulary for Basic Meta-Data Annotations\n *\n * URI: https://json-schema.org/draft/2019-09/vocab/meta-data\n */\n\n get deprecated() {\n return this.get('deprecated');\n }\n set deprecated(deprecated) {\n this.set('deprecated', deprecated);\n }\n\n /**\n * Vocabulary for the Contents of String-Encoded Data\n *\n * URI: https://json-schema.org/draft/2019-09/vocab/content\n */\n\n get contentSchema() {\n return this.get('contentSchema');\n }\n set contentSchema(contentSchema) {\n this.set('contentSchema', contentSchema);\n }\n}\nexport default JSONSchema;","import { LinkDescriptionElement } from '@swagger-api/apidom-ns-json-schema-draft-7';\n/* eslint-disable class-methods-use-this */\n\n/**\n * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6\n * @public\n */\n\nclass LinkDescription extends LinkDescriptionElement {\n /**\n * Link Target Attributes.\n *\n * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6.5\n */\n get targetSchema() {\n return this.get('targetSchema');\n }\n set targetSchema(targetSchema) {\n this.set('targetSchema', targetSchema);\n }\n\n /**\n * Link Input.\n *\n * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#input\n */\n get hrefSchema() {\n return this.get('hrefSchema');\n }\n set hrefSchema(hrefSchema) {\n this.set('hrefSchema', hrefSchema);\n }\n get headerSchema() {\n return this.get('headerSchema');\n }\n set headerSchema(headerSchema) {\n this.set('headerSchema', headerSchema);\n }\n get submissionSchema() {\n return this.get('submissionSchema');\n }\n set submissionSchema(submissionSchema) {\n this.set('submissionSchema', submissionSchema);\n }\n}\nexport default LinkDescription;","import JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\n/**\n * @public\n */\nconst jsonSchema201909 = {\n namespace: options => {\n const {\n base\n } = options;\n base.register('jSONSchema201909', JSONSchemaElement);\n base.register('linkDescription', LinkDescriptionElement);\n return base;\n }\n};\nexport default jsonSchema201909;","import { keyMap as keyMapBase } from '@swagger-api/apidom-core';\nexport { getNodeType } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\nexport const keyMap = {\n JSONSchema201909Element: ['content'],\n LinkDescriptionElement: ['content'],\n ...keyMapBase\n};","import { isStringElement } from '@swagger-api/apidom-core';\nimport { FixedFieldsVisitor, JSONSchemaVisitor as JSONSchemaDraft7Visitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\nimport JSONSchemaElement from \"../../../elements/JSONSchema.mjs\";\n/**\n * @public\n */\nclass JSONSchemaVisitor extends JSONSchemaDraft7Visitor {\n constructor(options) {\n super(options);\n this.element = new JSONSchemaElement();\n }\n\n // eslint-disable-next-line class-methods-use-this\n get defaultDialectIdentifier() {\n return 'https://json-schema.org/draft/2019-09/schema';\n }\n ObjectElement(objectElement) {\n this.handleDialectIdentifier(objectElement);\n this.handleSchemaIdentifier(objectElement);\n\n // for further processing consider this Schema Element as parent for all embedded Schema Elements\n this.parent = this.element;\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // mark this SchemaElement with reference metadata\n if (isStringElement(this.element.$ref)) {\n this.element.classes.push('reference-element');\n this.element.setMetaProperty('referenced-element', 'schema');\n }\n return result;\n }\n}\nexport default JSONSchemaVisitor;","import { FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n/**\n * @public\n */\nclass $vocabularyVisitor extends FallbackVisitor {\n ObjectElement(objectElement) {\n const result = super.enter(objectElement);\n this.element.classes.push('json-schema-$vocabulary');\n return result;\n }\n}\nexport default $vocabularyVisitor;","import { FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n/**\n * @public\n */\nclass $refVisitor extends FallbackVisitor {\n StringElement(stringElement) {\n const result = super.enter(stringElement);\n this.element.classes.push('reference-value');\n return result;\n }\n}\nexport default $refVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, MapVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass $defsVisitor extends Mixin(MapVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('json-schema-$defs');\n this.specPath = always(['document', 'objects', 'JSONSchema']);\n }\n}\nexport default $defsVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, SpecificationVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass AllOfVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-allOf');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default AllOfVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, SpecificationVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass AnyOfVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-anyOf');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default AnyOfVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, SpecificationVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass OneOfVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-oneOf');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default OneOfVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, MapVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass DependentSchemasVisitor extends Mixin(MapVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('json-schema-dependentSchemas');\n this.specPath = always(['document', 'objects', 'JSONSchema']);\n }\n}\nexport default DependentSchemasVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport { SpecificationVisitor, FallbackVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass ItemsVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n ObjectElement(objectElement) {\n this.element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], objectElement);\n return BREAK;\n }\n ArrayElement(arrayElement) {\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-items');\n arrayElement.forEach(item => {\n const element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n BooleanElement(booleanElement) {\n this.element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], booleanElement);\n return BREAK;\n }\n}\nexport default ItemsVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, MapVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass PropertiesVisitor extends Mixin(MapVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('json-schema-properties');\n this.specPath = always(['document', 'objects', 'JSONSchema']);\n }\n}\nexport default PropertiesVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, MapVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass PatternPropertiesVisitor extends Mixin(MapVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ObjectElement();\n this.element.classes.push('json-schema-patternProperties');\n this.specPath = always(['document', 'objects', 'JSONSchema']);\n }\n}\nexport default PatternPropertiesVisitor;","import { FallbackVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\n/**\n * @public\n */\nclass DependentRequiredVisitor extends FallbackVisitor {\n ObjectElement(objectElement) {\n const result = super.enter(objectElement);\n this.element.classes.push('json-schema-dependentRequired');\n return result;\n }\n}\nexport default DependentRequiredVisitor;","import { LinkDescriptionVisitor as JSONSchemaDraft7LinkDescriptionVisitor } from '@swagger-api/apidom-ns-json-schema-draft-7';\nimport LinkDescriptionElement from \"../../../../elements/LinkDescription.mjs\";\n/**\n * @public\n */\nclass LinkDescriptionVisitor extends JSONSchemaDraft7LinkDescriptionVisitor {\n constructor(options) {\n super(options);\n this.element = new LinkDescriptionElement();\n }\n}\nexport default LinkDescriptionVisitor;","import { pipe, assocPath, dissocPath } from 'ramda';\nimport { specificationObj } from '@swagger-api/apidom-ns-json-schema-draft-7';\nimport JSONSchemaVisitor from \"./visitors/json-schema/index.mjs\";\nimport JSONSchema$vocabularyVisitor from \"./visitors/json-schema/$vocabularyVisitor.mjs\";\nimport JSONSchema$refVisitor from \"./visitors/json-schema/$refVisitor.mjs\";\nimport JSONSchema$defsVisitor from \"./visitors/json-schema/$defsVisitor.mjs\";\nimport JSONSchemaAllOfVisitor from \"./visitors/json-schema/AllOfVisitor.mjs\";\nimport JSONSchemaAnyOfVisitor from \"./visitors/json-schema/AnyOfVisitor.mjs\";\nimport JSONSchemaOneOfVisitor from \"./visitors/json-schema/OneOfVisitor.mjs\";\nimport JSONSchemaDependentSchemasVisitor from \"./visitors/json-schema/DependentSchemasVisitor.mjs\";\nimport JSONSchemaItemsVisitor from \"./visitors/json-schema/ItemsVisitor.mjs\";\nimport JSONSchemaPropertiesVisitor from \"./visitors/json-schema/PropertiesVisitor.mjs\";\nimport JSONSchemaPatternPropertiesVisitor from \"./visitors/json-schema/PatternPropertiesVisitor.mjs\";\nimport JSONSchemaDependentRequiredVisitor from \"./visitors/json-schema/DependentRequiredVisitor.mjs\";\nimport JSONSchemaLinkDescriptionVisitor from \"./visitors/json-schema/link-description/index.mjs\";\nconst specification = pipe(\n// JSON Schema object modifications\nassocPath(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$vocabulary'], JSONSchema$vocabularyVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$anchor'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$recursiveAnchor'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$recursiveRef'], specificationObj.visitors.value), dissocPath(['visitors', 'document', 'objects', 'JSONReference', '$visitor']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$ref'], JSONSchema$refVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'definitions']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$defs'], JSONSchema$defsVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'allOf'], JSONSchemaAllOfVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'anyOf'], JSONSchemaAnyOfVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'oneOf'], JSONSchemaOneOfVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'not'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'if'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'then'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'else'], JSONSchemaVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'dependencies']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'dependentSchemas'], JSONSchemaDependentSchemasVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'items'], JSONSchemaItemsVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contains'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'properties'], JSONSchemaPropertiesVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'patternProperties'], JSONSchemaPatternPropertiesVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'additionalProperties'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'additionalItems'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'propertyNames'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'unevaluatedItems'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'unevaluatedProperties'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'maxContains'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'minContains'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'dependentRequired'], JSONSchemaDependentRequiredVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'deprecated'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentSchema'], JSONSchemaVisitor),\n// Link Description object modifications\nassocPath(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], JSONSchemaLinkDescriptionVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetSchema'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'hrefSchema'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'headerSchema'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionSchema'], JSONSchemaVisitor))(specificationObj);\nexport default specification;","import { createPredicate } from '@swagger-api/apidom-core';\nimport JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\n/**\n * @public\n */\nexport const isJSONSchemaElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof JSONSchemaElement || hasBasicElementProps(element) && isElementType('JSONSchema201909', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isLinkDescriptionElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LinkDescriptionElement || hasBasicElementProps(element) && isElementType('linkDescription', element) && primitiveEq('object', element);\n});","import { createNamespace, isStringElement } from '@swagger-api/apidom-core';\nimport * as jsonSchema201909Predicates from \"../predicates.mjs\";\nimport jsonSchema201909Namespace from \"../namespace.mjs\";\nconst createToolbox = () => {\n const namespace = createNamespace(jsonSchema201909Namespace);\n const predicates = {\n ...jsonSchema201909Predicates,\n isStringElement\n };\n return {\n predicates,\n namespace\n };\n};\nexport default createToolbox;","import { path } from 'ramda';\nimport { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';\nimport specification from \"./specification.mjs\";\nimport { keyMap, getNodeType } from \"../traversal/visitor.mjs\";\nimport createToolbox from \"./toolbox.mjs\";\n/**\n * @public\n */\nconst refract = (value, {\n specPath = ['visitors', 'document', 'objects', 'JSONSchema', '$visitor'],\n plugins = [],\n specificationObj = specification\n} = {}) => {\n const element = baseRefract(value);\n const resolvedSpec = dereference(specificationObj);\n\n /**\n * This is where generic ApiDOM becomes semantic (namespace applied).\n * We don't allow consumers to hook into this translation.\n * Though we allow consumers to define their onw plugins on already transformed ApiDOM.\n */\n const RootVisitorClass = path(specPath, resolvedSpec);\n const rootVisitor = new RootVisitorClass({\n specObj: resolvedSpec\n });\n visit(element, rootVisitor);\n\n /**\n * Run plugins only when necessary.\n * Running plugins visitors means extra single traversal === performance hit.\n */\n return dispatchRefractorPlugins(rootVisitor.element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n keyMap,\n nodeTypeGetter: getNodeType\n }\n });\n};\n\n/**\n * @public\n */\nexport const createRefractor = specPath => (value, options = {}) => refract(value, {\n specPath,\n ...options\n});\nexport default refract;","import JSONSchemaElement from \"../elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"../elements/LinkDescription.mjs\";\nimport { createRefractor } from \"./index.mjs\"; // register refractors specific to element types\nJSONSchemaElement.refract = createRefractor(['visitors', 'document', 'objects', 'JSONSchema', '$visitor']);\nLinkDescriptionElement.refract = createRefractor(['visitors', 'document', 'objects', 'LinkDescription', '$visitor']);\nexport { JSONSchemaElement, LinkDescriptionElement };","import { UnsupportedOperationError } from '@swagger-api/apidom-error';\nimport { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-2019-09';\n\n/* eslint-disable class-methods-use-this */\n\n/**\n * @public\n */\nclass JSONSchema extends JSONSchemaElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'JSONSchema202012';\n }\n\n /**\n * Core vocabulary\n *\n * URI: https://json-schema.org/draft/2020-12/vocab/core\n */\n\n get $dynamicAnchor() {\n return this.get('$dynamicAnchor');\n }\n set $dynamicAnchor($dynamicAnchor) {\n this.set('$dynamicAnchor', $dynamicAnchor);\n }\n get $recursiveAnchor() {\n throw new UnsupportedOperationError('$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.');\n }\n set $recursiveAnchor($recursiveAnchor) {\n throw new UnsupportedOperationError('$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.');\n }\n get $dynamicRef() {\n return this.get('$dynamicRef');\n }\n set $dynamicRef($dynamicRef) {\n this.set('$dynamicRef', $dynamicRef);\n }\n get $recursiveRef() {\n throw new UnsupportedOperationError('$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.');\n }\n set $recursiveRef($recursiveRef) {\n throw new UnsupportedOperationError('$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.');\n }\n\n /**\n * Applicator vocabulary\n *\n * URI: https://json-schema.org/draft/2020-12/vocab/applicator\n */\n\n get prefixItems() {\n return this.get('prefixItems');\n }\n set prefixItems(prefixItems) {\n this.set('prefixItems', prefixItems);\n }\n}\nexport default JSONSchema;","import { LinkDescriptionElement } from '@swagger-api/apidom-ns-json-schema-2019-09';\n/* eslint-disable class-methods-use-this */\n\n/**\n * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6\n * @public\n */\n\nclass LinkDescription extends LinkDescriptionElement {\n /**\n * Link Target Attributes.\n *\n * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6.5\n */\n get targetSchema() {\n return this.get('targetSchema');\n }\n set targetSchema(targetSchema) {\n this.set('targetSchema', targetSchema);\n }\n\n /**\n * Link Input.\n *\n * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#input\n */\n get hrefSchema() {\n return this.get('hrefSchema');\n }\n set hrefSchema(hrefSchema) {\n this.set('hrefSchema', hrefSchema);\n }\n get headerSchema() {\n return this.get('headerSchema');\n }\n set headerSchema(headerSchema) {\n this.set('headerSchema', headerSchema);\n }\n get submissionSchema() {\n return this.get('submissionSchema');\n }\n set submissionSchema(submissionSchema) {\n this.set('submissionSchema', submissionSchema);\n }\n}\nexport default LinkDescription;","import JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\n/**\n * @public\n */\nconst jsonSchema202012 = {\n namespace: options => {\n const {\n base\n } = options;\n base.register('jSONSchema202012', JSONSchemaElement);\n base.register('linkDescription', LinkDescriptionElement);\n return base;\n }\n};\nexport default jsonSchema202012;","import { keyMap as keyMapBase } from '@swagger-api/apidom-core';\nexport { getNodeType } from '@swagger-api/apidom-ns-json-schema-2019-09';\n/**\n * @public\n */\nexport const keyMap = {\n JSONSchema202012Element: ['content'],\n LinkDescriptionElement: ['content'],\n ...keyMapBase\n};","import { JSONSchemaVisitor as JSONSchema201909Visitor } from '@swagger-api/apidom-ns-json-schema-2019-09';\nimport JSONSchemaElement from \"../../../elements/JSONSchema.mjs\";\n/**\n * @public\n */\nclass JSONSchemaVisitor extends JSONSchema201909Visitor {\n constructor(options) {\n super(options);\n this.element = new JSONSchemaElement();\n }\n\n // eslint-disable-next-line class-methods-use-this\n get defaultDialectIdentifier() {\n return 'https://json-schema.org/draft/2020-12/schema';\n }\n}\nexport default JSONSchemaVisitor;","import { Mixin } from 'ts-mixer';\nimport { ArrayElement, BREAK } from '@swagger-api/apidom-core';\nimport { SpecificationVisitor, FallbackVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass PrefixItemsVisitor extends Mixin(SpecificationVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ArrayElement();\n this.element.classes.push('json-schema-prefixItems');\n }\n ArrayElement(arrayElement) {\n arrayElement.forEach(item => {\n const element = this.toRefractedElement(['document', 'objects', 'JSONSchema'], item);\n this.element.push(element);\n });\n this.copyMetaAndAttributes(arrayElement, this.element);\n return BREAK;\n }\n}\nexport default PrefixItemsVisitor;","import { LinkDescriptionVisitor as JSONSchemaDraft201909LinkDescriptionVisitor } from '@swagger-api/apidom-ns-json-schema-2019-09';\nimport LinkDescriptionElement from \"../../../../elements/LinkDescription.mjs\";\n/**\n * @public\n */\nclass LinkDescriptionVisitor extends JSONSchemaDraft201909LinkDescriptionVisitor {\n constructor(options) {\n super(options);\n this.element = new LinkDescriptionElement();\n }\n}\nexport default LinkDescriptionVisitor;","import { pipe, assocPath, dissocPath } from 'ramda';\nimport { specificationObj } from '@swagger-api/apidom-ns-json-schema-2019-09';\nimport JSONSchemaVisitor from \"./visitors/json-schema/index.mjs\";\nimport JSONSchemaPrefixItemsVisitor from \"./visitors/json-schema/PrefixItemsVisitor.mjs\";\nimport JSONSchemaLinkDescriptionVisitor from \"./visitors/json-schema/link-description/index.mjs\";\nconst specification = pipe(\n// JSON Schema object modifications\nassocPath(['visitors', 'document', 'objects', 'JSONSchema', '$visitor'], JSONSchemaVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$recursiveAnchor']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$dynamicAnchor'], specificationObj.visitors.value), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$recursiveRef']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', '$dynamicRef'], specificationObj.visitors.value), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'not'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'if'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'then'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'else'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'prefixItems'], JSONSchemaPrefixItemsVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'items'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contains'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'additionalProperties'], JSONSchemaVisitor), dissocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'additionalItems']), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'propertyNames'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'unevaluatedItems'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'unevaluatedProperties'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'JSONSchema', 'fixedFields', 'contentSchema'], JSONSchemaVisitor),\n// Link Description object modifications\nassocPath(['visitors', 'document', 'objects', 'LinkDescription', '$visitor'], JSONSchemaLinkDescriptionVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'targetSchema'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'hrefSchema'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'headerSchema'], JSONSchemaVisitor), assocPath(['visitors', 'document', 'objects', 'LinkDescription', 'fixedFields', 'submissionSchema'], JSONSchemaVisitor))(specificationObj);\nexport default specification;","import { createPredicate } from '@swagger-api/apidom-core';\nimport JSONSchemaElement from \"./elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"./elements/LinkDescription.mjs\";\n/**\n * @public\n */\nexport const isJSONSchemaElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof JSONSchemaElement || hasBasicElementProps(element) && isElementType('JSONSchema202012', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isLinkDescriptionElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LinkDescriptionElement || hasBasicElementProps(element) && isElementType('linkDescription', element) && primitiveEq('object', element);\n});","import { createNamespace, isStringElement } from '@swagger-api/apidom-core';\nimport * as jsonSchema202012Predicates from \"../predicates.mjs\";\nimport jsonSchema202012Namespace from \"../namespace.mjs\";\nconst createToolbox = () => {\n const namespace = createNamespace(jsonSchema202012Namespace);\n const predicates = {\n ...jsonSchema202012Predicates,\n isStringElement\n };\n return {\n predicates,\n namespace\n };\n};\nexport default createToolbox;","import { path } from 'ramda';\nimport { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';\nimport specification from \"./specification.mjs\";\nimport { keyMap, getNodeType } from \"../traversal/visitor.mjs\";\nimport createToolbox from \"./toolbox.mjs\";\n/**\n * @public\n */\nconst refract = (value, {\n specPath = ['visitors', 'document', 'objects', 'JSONSchema', '$visitor'],\n plugins = [],\n specificationObj = specification\n} = {}) => {\n const element = baseRefract(value);\n const resolvedSpec = dereference(specificationObj);\n\n /**\n * This is where generic ApiDOM becomes semantic (namespace applied).\n * We don't allow consumers to hook into this translation.\n * Though we allow consumers to define their onw plugins on already transformed ApiDOM.\n */\n const RootVisitorClass = path(specPath, resolvedSpec);\n const rootVisitor = new RootVisitorClass({\n specObj: resolvedSpec\n });\n visit(element, rootVisitor);\n\n /**\n * Run plugins only when necessary.\n * Running plugins visitors means extra single traversal === performance hit.\n */\n return dispatchRefractorPlugins(rootVisitor.element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n keyMap,\n nodeTypeGetter: getNodeType\n }\n });\n};\n\n/**\n * @public\n */\nexport const createRefractor = specPath => (value, options = {}) => refract(value, {\n specPath,\n ...options\n});\nexport default refract;","import JSONSchemaElement from \"../elements/JSONSchema.mjs\";\nimport LinkDescriptionElement from \"../elements/LinkDescription.mjs\";\nimport { createRefractor } from \"./index.mjs\"; // register refractors specific to element types\nJSONSchemaElement.refract = createRefractor(['visitors', 'document', 'objects', 'JSONSchema', '$visitor']);\nLinkDescriptionElement.refract = createRefractor(['visitors', 'document', 'objects', 'LinkDescription', '$visitor']);\nexport { JSONSchemaElement, LinkDescriptionElement };","import { JSONSchemaElement } from '@swagger-api/apidom-ns-json-schema-2020-12';\n/**\n * @public\n */\nclass Schema extends JSONSchemaElement {\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.element = 'schema';\n }\n\n /**\n * OAS base vocabulary\n *\n * URI: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#baseVocabulary\n */\n\n get discriminator() {\n return this.get('discriminator');\n }\n set discriminator(discriminator) {\n this.set('discriminator', discriminator);\n }\n get xml() {\n return this.get('xml');\n }\n set xml(xml) {\n this.set('xml', xml);\n }\n get externalDocs() {\n return this.get('externalDocs');\n }\n set externalDocs(externalDocs) {\n this.set('externalDocs', externalDocs);\n }\n\n /**\n * @deprecated The example property has been deprecated in favor of the JSON Schema examples keyword. Use of example is discouraged, and later versions of this specification may remove it.\n */\n get example() {\n return this.get('example');\n }\n set example(example) {\n this.set('example', example);\n }\n}\nexport default Schema;","import { SecurityRequirementElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass SecurityRequirement extends SecurityRequirementElement {}\nexport default SecurityRequirement;","import { SecuritySchemeElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass SecurityScheme extends SecuritySchemeElement {}\nexport default SecurityScheme;","import { ServerElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Server extends ServerElement {}\nexport default Server;","import { ServerVariableElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass ServerVariable extends ServerVariableElement {}\nexport default ServerVariable;","import { TagElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Tag extends TagElement {}\nexport default Tag;","import { XmlElement } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\nclass Xml extends XmlElement {}\nexport default Xml;","import CallbackElement from \"./elements/Callback.mjs\";\nimport ComponentsElement from \"./elements/Components.mjs\";\nimport ContactElement from \"./elements/Contact.mjs\";\nimport DiscriminatorElement from \"./elements/Discriminator.mjs\";\nimport EncodingElement from \"./elements/Encoding.mjs\";\nimport ExampleElement from \"./elements/Example.mjs\";\nimport ExternalDocumentationElement from \"./elements/ExternalDocumentation.mjs\";\nimport HeaderElement from \"./elements/Header.mjs\";\nimport InfoElement from \"./elements/Info.mjs\";\nimport JsonSchemaDialectElement from \"./elements/JsonSchemaDialect.mjs\";\nimport LicenseElement from \"./elements/License.mjs\";\nimport LinkElement from \"./elements/Link.mjs\";\nimport MediaTypeElement from \"./elements/MediaType.mjs\";\nimport OAuthFlowElement from \"./elements/OAuthFlow.mjs\";\nimport OAuthFlowsElement from \"./elements/OAuthFlows.mjs\";\nimport OpenapiElement from \"./elements/Openapi.mjs\";\nimport OpenApi3_1Element from \"./elements/OpenApi3-1.mjs\";\nimport OperationElement from \"./elements/Operation.mjs\";\nimport ParameterElement from \"./elements/Parameter.mjs\";\nimport PathItemElement from \"./elements/PathItem.mjs\";\nimport PathsElement from \"./elements/Paths.mjs\";\nimport ReferenceElement from \"./elements/Reference.mjs\";\nimport RequestBodyElement from \"./elements/RequestBody.mjs\";\nimport ResponseElement from \"./elements/Response.mjs\";\nimport ResponsesElement from \"./elements/Responses.mjs\";\nimport SchemaElement from \"./elements/Schema.mjs\";\nimport SecurityRequirementElement from \"./elements/SecurityRequirement.mjs\";\nimport SecuritySchemeElement from \"./elements/SecurityScheme.mjs\";\nimport ServerElement from \"./elements/Server.mjs\";\nimport ServerVariableElement from \"./elements/ServerVariable.mjs\";\nimport TagElement from \"./elements/Tag.mjs\";\nimport XmlElement from \"./elements/Xml.mjs\";\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nconst openApi3_1 = {\n namespace: options => {\n const {\n base\n } = options;\n base.register('callback', CallbackElement);\n base.register('components', ComponentsElement);\n base.register('contact', ContactElement);\n base.register('discriminator', DiscriminatorElement);\n base.register('encoding', EncodingElement);\n base.register('example', ExampleElement);\n base.register('externalDocumentation', ExternalDocumentationElement);\n base.register('header', HeaderElement);\n base.register('info', InfoElement);\n base.register('jsonSchemaDialect', JsonSchemaDialectElement);\n base.register('license', LicenseElement);\n base.register('link', LinkElement);\n base.register('mediaType', MediaTypeElement);\n base.register('oAuthFlow', OAuthFlowElement);\n base.register('oAuthFlows', OAuthFlowsElement);\n base.register('openapi', OpenapiElement);\n base.register('openApi3_1', OpenApi3_1Element);\n base.register('operation', OperationElement);\n base.register('parameter', ParameterElement);\n base.register('pathItem', PathItemElement);\n base.register('paths', PathsElement);\n base.register('reference', ReferenceElement);\n base.register('requestBody', RequestBodyElement);\n base.register('response', ResponseElement);\n base.register('responses', ResponsesElement);\n base.register('schema', SchemaElement);\n base.register('securityRequirement', SecurityRequirementElement);\n base.register('securityScheme', SecuritySchemeElement);\n base.register('server', ServerElement);\n base.register('serverVariable', ServerVariableElement);\n base.register('tag', TagElement);\n base.register('xml', XmlElement);\n return base;\n }\n};\nexport default openApi3_1;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet ComponentsPathItems = /*#__PURE__*/(() => {\n class ComponentsPathItems extends ObjectElement {\n static primaryClass = 'components-path-items';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(ComponentsPathItems.primaryClass);\n }\n }\n return ComponentsPathItems;\n})();\nexport default ComponentsPathItems;","import { ObjectElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nlet Webhooks = /*#__PURE__*/(() => {\n class Webhooks extends ObjectElement {\n static primaryClass = 'webhooks';\n constructor(content, meta, attributes) {\n super(content, meta, attributes);\n this.classes.push(Webhooks.primaryClass);\n }\n }\n return Webhooks;\n})();\nexport default Webhooks;","import { keyMap as keyMapBase, isElement } from '@swagger-api/apidom-core';\n\n/**\n * @public\n */\nexport const getNodeType = element => {\n if (!isElement(element)) {\n return undefined;\n }\n return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;\n};\n\n/**\n * There are unfortunately two `LinkElement` types. One is from base namespace\n * and the other one if from this namespace. `LinkElement` from base namespace\n * is used extremely rarely so it's almost always safe during traversing\n * to assume that `LinkElement` is element from this namespace.\n *\n * To be 100% sure that currently visiting `LinkElement` is from this namespace\n * use `isLinkElement` predicate from this namespace to assert for it.\n * @public\n */\n\nexport const keyMap = {\n CallbackElement: ['content'],\n ComponentsElement: ['content'],\n ContactElement: ['content'],\n DiscriminatorElement: ['content'],\n Encoding: ['content'],\n Example: ['content'],\n ExternalDocumentationElement: ['content'],\n HeaderElement: ['content'],\n InfoElement: ['content'],\n LicenseElement: ['content'],\n MediaTypeElement: ['content'],\n OAuthFlowElement: ['content'],\n OAuthFlowsElement: ['content'],\n OpenApi3_1Element: ['content'],\n OperationElement: ['content'],\n ParameterElement: ['content'],\n PathItemElement: ['content'],\n PathsElement: ['content'],\n ReferenceElement: ['content'],\n RequestBodyElement: ['content'],\n ResponseElement: ['content'],\n ResponsesElement: ['content'],\n SchemaElement: ['content'],\n SecurityRequirementElement: ['content'],\n SecuritySchemeElement: ['content'],\n ServerElement: ['content'],\n ServerVariableElement: ['content'],\n TagElement: ['content'],\n ...keyMapBase\n};","import { ArrayElement, ObjectElement, isObjectElement, isArrayElement } from '@swagger-api/apidom-core';\nclass NormalizeStorage {\n internalStore;\n constructor(storageElement, storageField, storageSubField) {\n this.storageElement = storageElement;\n this.storageField = storageField;\n this.storageSubField = storageSubField;\n }\n get store() {\n if (!this.internalStore) {\n let rootStore = this.storageElement.get(this.storageField);\n if (!isObjectElement(rootStore)) {\n rootStore = new ObjectElement();\n this.storageElement.set(this.storageField, rootStore);\n }\n let store = rootStore.get(this.storageSubField);\n if (!isArrayElement(store)) {\n store = new ArrayElement();\n rootStore.set(this.storageSubField, store);\n }\n this.internalStore = store;\n }\n return this.internalStore;\n }\n append(pointer) {\n if (!this.includes(pointer)) {\n this.store.push(pointer);\n }\n }\n includes(pointer) {\n return this.store.includes(pointer);\n }\n}\nexport default NormalizeStorage;","import { uniqWith, pathOr, last } from 'ramda';\nimport { toValue } from '@swagger-api/apidom-core';\nimport { OperationParametersElement } from '@swagger-api/apidom-ns-openapi-3-0';\nimport NormalizeStorage from \"./normalize-header-examples/NormalizeStorage.mjs\";\n/**\n * Inheritance of Parameter Objects.\n *\n * OpenAPI 3.1 specification excerpt that defines the inheritance behavior:\n *\n * A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item,\n * the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters.\n * A unique parameter is defined by a combination of a name and location.\n *\n * NOTE: this plugin is idempotent\n * @public\n */\n/* eslint-disable no-param-reassign */\n/**\n * @public\n */\nconst plugin = ({\n storageField = 'x-normalized'\n} = {}) => toolbox => {\n const {\n predicates,\n ancestorLineageToJSONPointer\n } = toolbox;\n /**\n * Establishes identity between two Parameter Objects.\n *\n * {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#user-content-operationparameters}\n */\n const parameterEquals = (parameter1, parameter2) => {\n if (!predicates.isParameterElement(parameter1)) return false;\n if (!predicates.isParameterElement(parameter2)) return false;\n if (!predicates.isStringElement(parameter1.name)) return false;\n if (!predicates.isStringElement(parameter1.in)) return false;\n if (!predicates.isStringElement(parameter2.name)) return false;\n if (!predicates.isStringElement(parameter2.in)) return false;\n return toValue(parameter1.name) === toValue(parameter2.name) && toValue(parameter1.in) === toValue(parameter2.in);\n };\n const pathItemParameters = [];\n let storage;\n return {\n visitor: {\n OpenApi3_1Element: {\n enter(element) {\n storage = new NormalizeStorage(element, storageField, 'parameters');\n },\n leave() {\n storage = undefined;\n }\n },\n PathItemElement: {\n enter(pathItemElement, key, parent, path, ancestors) {\n // skip visiting this Path Item\n if (ancestors.some(predicates.isComponentsElement)) {\n return;\n }\n const {\n parameters\n } = pathItemElement;\n if (predicates.isArrayElement(parameters)) {\n pathItemParameters.push([...parameters.content]);\n } else {\n pathItemParameters.push([]);\n }\n },\n leave() {\n pathItemParameters.pop();\n }\n },\n OperationElement: {\n leave(operationElement, key, parent, path, ancestors) {\n const parentPathItemParameters = last(pathItemParameters);\n\n // no Path Item Object parameters to inherit from\n if (!Array.isArray(parentPathItemParameters) || parentPathItemParameters.length === 0) {\n return;\n }\n const operationJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, operationElement]);\n\n // skip visiting this Operation Object if it's already normalized\n if (storage.includes(operationJSONPointer)) {\n return;\n }\n const operationParameters = pathOr([], ['parameters', 'content'], operationElement);\n\n // prefers the first item if two items compare equal based on the predicate\n const mergedParameters = uniqWith(parameterEquals, [...operationParameters, ...parentPathItemParameters]);\n operationElement.parameters = new OperationParametersElement(mergedParameters);\n storage.append(operationJSONPointer);\n }\n }\n }\n };\n};\n/* eslint-enable */\n\nexport default plugin;","import { OperationSecurityElement } from '@swagger-api/apidom-ns-openapi-3-0';\nimport NormalizeStorage from \"./normalize-header-examples/NormalizeStorage.mjs\";\n/**\n * Override of Security Requirement Objects.\n *\n * OpenAPI 3.1 specification excerpt that defines the override behavior:\n *\n * Operation.security definition overrides any declared top-level security.\n * To remove a top-level security declaration, an empty array can be used.\n * When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object,\n * only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.\n *\n * NOTE: this plugin is idempotent\n * @public\n */\n/* eslint-disable no-param-reassign */\n/**\n * @public\n */\nconst plugin = ({\n storageField = 'x-normalized'\n} = {}) => toolbox => {\n const {\n predicates,\n ancestorLineageToJSONPointer\n } = toolbox;\n let topLevelSecurity;\n let storage;\n return {\n visitor: {\n OpenApi3_1Element: {\n enter(openapiElement) {\n storage = new NormalizeStorage(openapiElement, storageField, 'security-requirements');\n if (predicates.isArrayElement(openapiElement.security)) {\n topLevelSecurity = openapiElement.security;\n }\n },\n leave() {\n storage = undefined;\n topLevelSecurity = undefined;\n }\n },\n OperationElement: {\n leave(operationElement, key, parent, path, ancestors) {\n // skip visiting this Operation\n if (ancestors.some(predicates.isComponentsElement)) {\n return;\n }\n const operationJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, operationElement]);\n\n // skip visiting this Operation Object if it's already normalized\n if (storage.includes(operationJSONPointer)) {\n return;\n }\n const missingOperationLevelSecurity = typeof operationElement.security === 'undefined';\n const hasTopLevelSecurity = typeof topLevelSecurity !== 'undefined';\n if (missingOperationLevelSecurity && hasTopLevelSecurity) {\n var _topLevelSecurity;\n operationElement.security = new OperationSecurityElement((_topLevelSecurity = topLevelSecurity) === null || _topLevelSecurity === void 0 ? void 0 : _topLevelSecurity.content);\n storage.append(operationJSONPointer);\n }\n }\n }\n }\n };\n};\n/* eslint-enable */\n\nexport default plugin;","import { last, defaultTo, groupBy } from 'ramda';\nimport { toValue, cloneDeep } from '@swagger-api/apidom-core';\nimport NormalizeStorage from \"./normalize-header-examples/NormalizeStorage.mjs\";\nconst removeSpaces = operationId => {\n return operationId.replace(/\\s/g, '');\n};\nconst replaceSpecialCharsWithUnderscore = operationId => {\n return operationId.replace(/\\W/gi, '_');\n};\nconst createNormalizedOperationId = (path, method) => {\n const normalizedMethod = replaceSpecialCharsWithUnderscore(removeSpaces(method.toLowerCase()));\n const normalizedPath = replaceSpecialCharsWithUnderscore(removeSpaces(path));\n return `${normalizedMethod}${normalizedPath}`;\n};\nconst normalizeOperationId = (operationId, path, method) => {\n const withoutSpaces = removeSpaces(operationId);\n if (withoutSpaces.length > 0) {\n return replaceSpecialCharsWithUnderscore(withoutSpaces);\n }\n return createNormalizedOperationId(path, method);\n};\n\n/**\n * Normalization of Operation.operationId field.\n *\n * This normalization is not guided by OpenAPI 3.1 specification.\n *\n * Existing Operation.operationId fields are normalized into snake case form.\n *\n * Operation Objects, that do not define operationId field, are left untouched.\n *\n * Original operationId is stored in meta and as new `__originalOperationId` field.\n *\n * This plugin also guarantees the uniqueness of all defined Operation.operationId fields,\n * and make sure Link.operationId fields are pointing to correct and normalized Operation.operationId fields.\n *\n * NOTE: this plugin is idempotent\n * @public\n */\n\n/* eslint-disable no-param-reassign */\n/**\n * @public\n */\nconst plugin = ({\n storageField = 'x-normalized',\n operationIdNormalizer = normalizeOperationId\n} = {}) => toolbox => {\n const {\n predicates,\n ancestorLineageToJSONPointer,\n namespace\n } = toolbox;\n const pathTemplates = [];\n const normalizedOperations = [];\n const links = [];\n let storage;\n return {\n visitor: {\n OpenApi3_1Element: {\n enter(element) {\n storage = new NormalizeStorage(element, storageField, 'operation-ids');\n },\n leave() {\n // group normalized operations by normalized operationId\n const normalizedOperationGroups = groupBy(operationElement => {\n return toValue(operationElement.operationId);\n }, normalizedOperations);\n\n // append incremental numerical suffixes to identical operationIds\n Object.entries(normalizedOperationGroups).forEach(([normalizedOperationId, operationElements]) => {\n if (!Array.isArray(operationElements)) return;\n if (operationElements.length <= 1) return;\n operationElements.forEach((operationElement, index) => {\n const indexedNormalizedOperationId = `${normalizedOperationId}${index + 1}`;\n // @ts-ignore\n operationElement.operationId = new namespace.elements.String(indexedNormalizedOperationId);\n });\n });\n\n // rectify possibly broken Link.operationId fields\n links.forEach(linkElement => {\n if (typeof linkElement.operationId === 'undefined') return;\n const linkOperationId = String(toValue(linkElement.operationId));\n const operationElement = normalizedOperations.find(normalizedOperationElement => {\n const originalOperationId = toValue(normalizedOperationElement.meta.get('originalOperationId'));\n return originalOperationId === linkOperationId;\n });\n\n // Link Object doesn't need to be rectified\n if (typeof operationElement === 'undefined') return;\n linkElement.operationId = cloneDeep.safe(operationElement.operationId);\n linkElement.meta.set('originalOperationId', linkOperationId);\n linkElement.set('__originalOperationId', linkOperationId);\n });\n\n // cleanup the references\n normalizedOperations.length = 0;\n links.length = 0;\n storage = undefined;\n }\n },\n PathItemElement: {\n enter(pathItemElement) {\n // `path` meta may not be always available, e.g. in Callback Object or Components Object\n const pathTemplate = defaultTo('path', toValue(pathItemElement.meta.get('path')));\n pathTemplates.push(pathTemplate);\n },\n leave() {\n pathTemplates.pop();\n }\n },\n OperationElement: {\n enter(operationElement, key, parent, path, ancestors) {\n // operationId field is undefined, needs no normalization\n if (typeof operationElement.operationId === 'undefined') return;\n const operationJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, operationElement]);\n\n // skip visiting this Operation Object if it's already normalized\n if (storage.includes(operationJSONPointer)) {\n return;\n }\n\n // cast operationId to string type\n const originalOperationId = String(toValue(operationElement.operationId));\n // perform operationId normalization\n const pathTemplate = last(pathTemplates);\n // `http-method` meta may not be always available, e.g. in Callback Object or Components Object\n const method = defaultTo('method', toValue(operationElement.meta.get('http-method')));\n const normalizedOperationId = operationIdNormalizer(originalOperationId, pathTemplate, method);\n\n // normalization is not necessary\n if (originalOperationId === normalizedOperationId) return;\n\n // @ts-ignore\n operationElement.operationId = new namespace.elements.String(normalizedOperationId);\n operationElement.set('__originalOperationId', originalOperationId);\n operationElement.meta.set('originalOperationId', originalOperationId);\n normalizedOperations.push(operationElement);\n storage.append(operationJSONPointer);\n }\n },\n LinkElement: {\n leave(linkElement) {\n // make sure this Link elements doesn't come from base namespace\n if (!predicates.isLinkElement(linkElement)) return;\n // ignore Link Objects with undefined operationId\n if (typeof linkElement.operationId === 'undefined') return;\n links.push(linkElement);\n }\n }\n }\n };\n};\n/* eslint-enable */\n\nexport default plugin;","import { cloneDeep } from '@swagger-api/apidom-core';\nimport NormalizeStorage from \"./normalize-header-examples/NormalizeStorage.mjs\";\n/**\n * Override of Schema.example and Schema.examples field inside the Parameter Objects.\n *\n * Parameter Object has two fixed fields:\n * - `example` of type `Any`\n * - `examples` of type `Map[string, Example Object | Reference Object]`\n *\n * OpenAPI 3.1 specification excerpt that defines the override behavior:\n *\n * The example value SHALL override the example provided by the schema.\n * Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema.\n *\n * NOTE: this plugin is idempotent\n * @public\n */\n/**\n * @public\n */\nconst plugin = ({\n storageField = 'x-normalized'\n} = {}) => toolbox => {\n const {\n predicates,\n ancestorLineageToJSONPointer\n } = toolbox;\n let storage;\n return {\n visitor: {\n OpenApi3_1Element: {\n enter(element) {\n storage = new NormalizeStorage(element, storageField, 'parameter-examples');\n },\n leave() {\n storage = undefined;\n }\n },\n ParameterElement: {\n leave(parameterElement, key, parent, path, ancestors) {\n var _parameterElement$sch, _parameterElement$sch2;\n // skip visiting this Parameter Object\n if (ancestors.some(predicates.isComponentsElement)) {\n return;\n }\n\n // no Parameter.schema field present\n if (typeof parameterElement.schema === 'undefined' || !predicates.isSchemaElement(parameterElement.schema)) {\n return;\n }\n // Schema contains no example\n if (typeof ((_parameterElement$sch = parameterElement.schema) === null || _parameterElement$sch === void 0 ? void 0 : _parameterElement$sch.example) === 'undefined' && typeof ((_parameterElement$sch2 = parameterElement.schema) === null || _parameterElement$sch2 === void 0 ? void 0 : _parameterElement$sch2.examples) === 'undefined') {\n return;\n }\n const parameterJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, parameterElement]);\n\n // skip visiting this Parameter Object if it's already normalized\n if (storage.includes(parameterJSONPointer)) {\n return;\n }\n\n /**\n * Parameter.examples and Schema.examples have preferences over the older\n * and deprected `example` field.\n */\n if (typeof parameterElement.examples !== 'undefined' && predicates.isObjectElement(parameterElement.examples)) {\n // @ts-ignore\n const examples = parameterElement.examples.map(example => {\n return cloneDeep.safe(example.value);\n });\n if (typeof parameterElement.schema.examples !== 'undefined') {\n parameterElement.schema.set('examples', examples);\n storage.append(parameterJSONPointer);\n }\n if (typeof parameterElement.schema.example !== 'undefined') {\n parameterElement.schema.set('example', examples[0]);\n storage.append(parameterJSONPointer);\n }\n return;\n }\n\n /**\n * Handle deprecated `example` field.\n */\n if (typeof parameterElement.example !== 'undefined') {\n if (typeof parameterElement.schema.examples !== 'undefined') {\n parameterElement.schema.set('examples', [cloneDeep(parameterElement.example)]);\n storage.append(parameterJSONPointer);\n }\n if (typeof parameterElement.schema.example !== 'undefined') {\n parameterElement.schema.set('example', cloneDeep(parameterElement.example));\n storage.append(parameterJSONPointer);\n }\n }\n }\n }\n }\n };\n};\nexport default plugin;","import { cloneDeep } from '@swagger-api/apidom-core';\nimport NormalizeStorage from \"./NormalizeStorage.mjs\";\n/**\n * Override of Schema.example and Schema.examples field inside the Header Objects.\n *\n * Header Object has two fixed fields:\n * - `example` of type `Any`\n * - `examples` of type `Map[string, Example Object | Reference Object]`\n *\n * OpenAPI 3.1 specification excerpt that defines the override behavior:\n *\n * The example value SHALL override the example provided by the schema.\n * Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema.\n *\n * NOTE: this plugin is idempotent\n * @public\n */\n/**\n * @public\n */\nconst plugin = ({\n storageField = 'x-normalized'\n} = {}) => toolbox => {\n const {\n predicates,\n ancestorLineageToJSONPointer\n } = toolbox;\n let storage;\n return {\n visitor: {\n OpenApi3_1Element: {\n enter(element) {\n storage = new NormalizeStorage(element, storageField, 'header-examples');\n },\n leave() {\n storage = undefined;\n }\n },\n HeaderElement: {\n leave(headerElement, key, parent, path, ancestors) {\n var _headerElement$schema, _headerElement$schema2;\n // skip visiting this Header Object\n if (ancestors.some(predicates.isComponentsElement)) {\n return;\n }\n\n // no Header.schema field present\n if (typeof headerElement.schema === 'undefined' || !predicates.isSchemaElement(headerElement.schema)) {\n return;\n }\n // Schema contains no example\n if (typeof ((_headerElement$schema = headerElement.schema) === null || _headerElement$schema === void 0 ? void 0 : _headerElement$schema.example) === 'undefined' && typeof ((_headerElement$schema2 = headerElement.schema) === null || _headerElement$schema2 === void 0 ? void 0 : _headerElement$schema2.examples) === 'undefined') {\n return;\n }\n const headerJSONPointer = ancestorLineageToJSONPointer([...ancestors, parent, headerElement]);\n\n // skip visiting this Header Object if it's already normalized\n if (storage.includes(headerJSONPointer)) {\n return;\n }\n\n /**\n * Header.examples and Schema.examples have preferences over the older\n * and deprected `example` field.\n */\n if (typeof headerElement.examples !== 'undefined' && predicates.isObjectElement(headerElement.examples)) {\n // @ts-ignore\n const examples = headerElement.examples.map(example => {\n return cloneDeep.safe(example.value);\n });\n if (typeof headerElement.schema.examples !== 'undefined') {\n headerElement.schema.set('examples', examples);\n storage.append(headerJSONPointer);\n }\n if (typeof headerElement.schema.example !== 'undefined') {\n headerElement.schema.set('example', examples[0]);\n storage.append(headerJSONPointer);\n }\n return;\n }\n\n /**\n * Handle deprecated `example` field.\n */\n if (typeof headerElement.example !== 'undefined') {\n if (typeof headerElement.schema.examples !== 'undefined') {\n headerElement.schema.set('examples', [cloneDeep(headerElement.example)]);\n storage.append(headerJSONPointer);\n }\n if (typeof headerElement.schema.example !== 'undefined') {\n headerElement.schema.set('example', cloneDeep(headerElement.example));\n storage.append(headerJSONPointer);\n }\n }\n }\n }\n }\n };\n};\nexport default plugin;","import { createPredicate, isBooleanElement, isStringElement, toValue } from '@swagger-api/apidom-core';\nimport CallbackElement from \"./elements/Callback.mjs\";\nimport ComponentsElement from \"./elements/Components.mjs\";\nimport ContactElement from \"./elements/Contact.mjs\";\nimport ExampleElement from \"./elements/Example.mjs\";\nimport ExternalDocumentationElement from \"./elements/ExternalDocumentation.mjs\";\nimport HeaderElement from \"./elements/Header.mjs\";\nimport InfoElement from \"./elements/Info.mjs\";\nimport JsonSchemaDialectElement from \"./elements/JsonSchemaDialect.mjs\";\nimport LicenseElement from \"./elements/License.mjs\";\nimport LinkElement from \"./elements/Link.mjs\";\nimport OpenapiElement from \"./elements/Openapi.mjs\";\nimport OpenApi3_1Element from \"./elements/OpenApi3-1.mjs\";\nimport OperationElement from \"./elements/Operation.mjs\";\nimport ParameterElement from \"./elements/Parameter.mjs\";\nimport PathItemElement from \"./elements/PathItem.mjs\";\nimport PathsElement from \"./elements/Paths.mjs\";\nimport ReferenceElement from \"./elements/Reference.mjs\";\nimport RequestBodyElement from \"./elements/RequestBody.mjs\";\nimport ResponseElement from \"./elements/Response.mjs\";\nimport ResponsesElement from \"./elements/Responses.mjs\";\nimport SchemaElement from \"./elements/Schema.mjs\";\nimport SecurityRequirementElement from \"./elements/SecurityRequirement.mjs\";\nimport SecuritySchemeElement from \"./elements/SecurityScheme.mjs\";\nimport ServerElement from \"./elements/Server.mjs\";\nimport ServerVariableElement from \"./elements/ServerVariable.mjs\";\nimport MediaTypeElement from \"./elements/MediaType.mjs\";\n/**\n * @public\n */\nexport const isCallbackElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof CallbackElement || hasBasicElementProps(element) && isElementType('callback', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isComponentsElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ComponentsElement || hasBasicElementProps(element) && isElementType('components', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isContactElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ContactElement || hasBasicElementProps(element) && isElementType('contact', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isExampleElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ExampleElement || hasBasicElementProps(element) && isElementType('example', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isExternalDocumentationElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ExternalDocumentationElement || hasBasicElementProps(element) && isElementType('externalDocumentation', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isHeaderElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof HeaderElement || hasBasicElementProps(element) && isElementType('header', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isInfoElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof InfoElement || hasBasicElementProps(element) && isElementType('info', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isJsonSchemaDialectElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof JsonSchemaDialectElement || hasBasicElementProps(element) && isElementType('jsonSchemaDialect', element) && primitiveEq('string', element);\n});\n\n/**\n * @public\n */\nexport const isLicenseElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LicenseElement || hasBasicElementProps(element) && isElementType('license', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isLinkElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof LinkElement || hasBasicElementProps(element) && isElementType('link', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isOpenapiElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof OpenapiElement || hasBasicElementProps(element) && isElementType('openapi', element) && primitiveEq('string', element);\n});\n\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const isOpenApi3_1Element = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq,\n hasClass\n}) => {\n return element => element instanceof OpenApi3_1Element || hasBasicElementProps(element) && isElementType('openApi3_1', element) && primitiveEq('object', element) && hasClass('api', element);\n});\n\n/**\n * @public\n */\nexport const isOperationElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof OperationElement || hasBasicElementProps(element) && isElementType('operation', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isParameterElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ParameterElement || hasBasicElementProps(element) && isElementType('parameter', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isPathItemElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof PathItemElement || hasBasicElementProps(element) && isElementType('pathItem', element) && primitiveEq('object', element);\n});\n\n/**\n * @deprecated\n * Determining whether a PathItemElement is external or internal is not possible by just looking\n * at value of the $ref fixed field. The value of the $ref field needs to be resolved in runtime\n * using the referring document as the Base URI.\n * @public\n */\nexport const isPathItemElementExternal = element => {\n if (!isPathItemElement(element)) {\n return false;\n }\n if (!isStringElement(element.$ref)) {\n return false;\n }\n const value = toValue(element.$ref);\n return typeof value === 'string' && value.length > 0 && !value.startsWith('#');\n};\n\n/**\n * @public\n */\nexport const isPathsElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof PathsElement || hasBasicElementProps(element) && isElementType('paths', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isReferenceElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ReferenceElement || hasBasicElementProps(element) && isElementType('reference', element) && primitiveEq('object', element);\n});\n\n/**\n * @deprecated\n * Determining whether a ReferenceElement is external or internal is not possible by just looking\n * at value of the $ref fixed field. The value of the $ref field needs to be resolved in runtime\n * using the referring document as the Base URI.\n * @public\n */\nexport const isReferenceElementExternal = element => {\n if (!isReferenceElement(element)) {\n return false;\n }\n if (!isStringElement(element.$ref)) {\n return false;\n }\n const value = toValue(element.$ref);\n return typeof value === 'string' && value.length > 0 && !value.startsWith('#');\n};\n\n/**\n * @public\n */\nexport const isRequestBodyElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof RequestBodyElement || hasBasicElementProps(element) && isElementType('requestBody', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isResponseElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ResponseElement || hasBasicElementProps(element) && isElementType('response', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isResponsesElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ResponsesElement || hasBasicElementProps(element) && isElementType('responses', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isSchemaElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof SchemaElement || hasBasicElementProps(element) && isElementType('schema', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isBooleanJsonSchemaElement = element => {\n return isBooleanElement(element) && element.classes.includes('boolean-json-schema');\n};\n\n/**\n * @public\n */\nexport const isSecurityRequirementElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof SecurityRequirementElement || hasBasicElementProps(element) && isElementType('securityRequirement', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isSecuritySchemeElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof SecuritySchemeElement || hasBasicElementProps(element) && isElementType('securityScheme', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isServerElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ServerElement || hasBasicElementProps(element) && isElementType('server', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isServerVariableElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof ServerVariableElement || hasBasicElementProps(element) && isElementType('serverVariable', element) && primitiveEq('object', element);\n});\n\n/**\n * @public\n */\nexport const isMediaTypeElement = createPredicate(({\n hasBasicElementProps,\n isElementType,\n primitiveEq\n}) => {\n return element => element instanceof MediaTypeElement || hasBasicElementProps(element) && isElementType('mediaType', element) && primitiveEq('object', element);\n});","import { isElement, isStringElement, isArrayElement, isObjectElement, isMemberElement, toValue, createNamespace, includesClasses, hasElementSourceMap } from '@swagger-api/apidom-core';\nimport { compile as compileJSONPointerTokens } from '@swagger-api/apidom-json-pointer';\nimport { isServersElement } from '@swagger-api/apidom-ns-openapi-3-0';\nimport * as openApi3_1Predicates from \"../predicates.mjs\";\nimport openApi3_1Namespace from \"../namespace.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * @public\n */\n/**\n * Translates visitor ancestor lineage to a JSON Pointer tokens.\n * Ancestor lineage is constructed of following visitor method arguments:\n *\n * - ancestors\n * - parent\n * - element\n * @public\n */\nexport const ancestorLineageToJSONPointer = elementPath => {\n const jsonPointerTokens = elementPath.reduce((path, element, index) => {\n if (isMemberElement(element)) {\n const token = String(toValue(element.key));\n path.push(token);\n } else if (isArrayElement(elementPath[index - 2])) {\n const token = String(elementPath[index - 2].content.indexOf(element));\n path.push(token);\n }\n return path;\n }, []);\n return compileJSONPointerTokens(jsonPointerTokens);\n};\n\n/**\n * @public\n */\nconst createToolbox = () => {\n const namespace = createNamespace(openApi3_1Namespace);\n const predicates = {\n ...openApi3_1Predicates,\n isElement,\n isStringElement,\n isArrayElement,\n isObjectElement,\n isMemberElement,\n isServersElement,\n includesClasses,\n hasElementSourceMap\n };\n return {\n predicates,\n ancestorLineageToJSONPointer,\n namespace\n };\n};\nexport default createToolbox;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { FixedFieldsVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-openapi-3-0';\nimport OpenApi3_1Element from \"../../../elements/OpenApi3-1.mjs\";\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\n/**\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass OpenApi3_1Visitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new OpenApi3_1Element();\n this.specPath = always(['document', 'objects', 'OpenApi']);\n this.canSupportSpecificationExtensions = true;\n this.openApiSemanticElement = this.element;\n }\n ObjectElement(objectElement) {\n this.openApiGenericElement = objectElement;\n return FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n }\n}\nexport default OpenApi3_1Visitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport InfoElement from \"../../../../elements/Info.mjs\";\n/**\n * @public\n */\nexport const BaseInfoVisitor = OpenApi3_1Specification.visitors.document.objects.Info.$visitor;\n/**\n * @public\n */\nclass InfoVisitor extends BaseInfoVisitor {\n constructor(options) {\n super(options);\n this.element = new InfoElement();\n }\n}\nexport default InfoVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ContactElement from \"../../../../elements/Contact.mjs\";\n/**\n * @public\n */\nexport const BaseContactVisitor = OpenApi3_1Specification.visitors.document.objects.Contact.$visitor;\n/**\n * @public\n */\nclass ContactVisitor extends BaseContactVisitor {\n constructor(options) {\n super(options);\n this.element = new ContactElement();\n }\n}\nexport default ContactVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport LicenseElement from \"../../../../elements/License.mjs\";\n/**\n * @public\n */\nexport const BaseLicenseVisitor = OpenApi3_1Specification.visitors.document.objects.License.$visitor;\n/**\n * @public\n */\nclass LicenseVisitor extends BaseLicenseVisitor {\n constructor(options) {\n super(options);\n this.element = new LicenseElement();\n }\n}\nexport default LicenseVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport LinkElement from \"../../../../elements/Link.mjs\";\n/**\n * @public\n */\nexport const BaseLinkVisitor = OpenApi3_1Specification.visitors.document.objects.Link.$visitor;\n/**\n * @public\n */\nclass LinkVisitor extends BaseLinkVisitor {\n constructor(options) {\n super(options);\n this.element = new LinkElement();\n }\n}\nexport default LinkVisitor;","import { Mixin } from 'ts-mixer';\nimport { BREAK, toValue } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, SpecificationVisitor } from '@swagger-api/apidom-ns-openapi-3-0';\nimport JsonSchemaDialectElement from \"../../../elements/JsonSchemaDialect.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass JsonSchemaDialectVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) {\n StringElement(stringElement) {\n const jsonSchemaDialectElement = new JsonSchemaDialectElement(toValue(stringElement));\n this.copyMetaAndAttributes(stringElement, jsonSchemaDialectElement);\n this.element = jsonSchemaDialectElement;\n return BREAK;\n }\n}\nexport default JsonSchemaDialectVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ServerElement from \"../../../../elements/Server.mjs\";\n/**\n * @public\n */\nexport const BaseServerVisitor = OpenApi3_1Specification.visitors.document.objects.Server.$visitor;\n/**\n * @public\n */\nclass ServerVisitor extends BaseServerVisitor {\n constructor(options) {\n super(options);\n this.element = new ServerElement();\n }\n}\nexport default ServerVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ServerVariableElement from \"../../../../elements/ServerVariable.mjs\";\n/**\n * @public\n */\nexport const BaseServerVariableVisitor = OpenApi3_1Specification.visitors.document.objects.ServerVariable.$visitor;\n/**\n * @public\n */\nclass ServerVariableVisitor extends BaseServerVariableVisitor {\n constructor(options) {\n super(options);\n this.element = new ServerVariableElement();\n }\n}\nexport default ServerVariableVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport MediaTypeElement from \"../../../../elements/MediaType.mjs\";\n/**\n * @public\n */\nexport const BaseMediaTypeVisitor = OpenApi3_1Specification.visitors.document.objects.MediaType.$visitor;\n/**\n * @public\n */\nclass MediaTypeVisitor extends BaseMediaTypeVisitor {\n constructor(options) {\n super(options);\n this.element = new MediaTypeElement();\n }\n}\nexport default MediaTypeVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport SecurityRequirementElement from \"../../../../elements/SecurityRequirement.mjs\";\n/**\n * @public\n */\nexport const BaseSecurityRequirementVisitor = OpenApi3_1Specification.visitors.document.objects.SecurityRequirement.$visitor;\n/**\n * @public\n */\nclass SecurityRequirementVisitor extends BaseSecurityRequirementVisitor {\n constructor(options) {\n super(options);\n this.element = new SecurityRequirementElement();\n }\n}\nexport default SecurityRequirementVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ComponentsElement from \"../../../../elements/Components.mjs\";\n/**\n * @public\n */\nexport const BaseComponentsVisitor = OpenApi3_1Specification.visitors.document.objects.Components.$visitor;\n/**\n * @public\n */\nclass ComponentsVisitor extends BaseComponentsVisitor {\n constructor(options) {\n super(options);\n this.element = new ComponentsElement();\n }\n}\nexport default ComponentsVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport TagElement from \"../../../../elements/Tag.mjs\";\n/**\n * @public\n */\nexport const BaseTagVisitor = OpenApi3_1Specification.visitors.document.objects.Tag.$visitor;\n/**\n * @public\n */\nclass TagVisitor extends BaseTagVisitor {\n constructor(options) {\n super(options);\n this.element = new TagElement();\n }\n}\nexport default TagVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ReferenceElement from \"../../../../elements/Reference.mjs\";\n/**\n * @public\n */\nexport const BaseReferenceVisitor = OpenApi3_1Specification.visitors.document.objects.Reference.$visitor;\n/**\n * @public\n */\nclass ReferenceVisitor extends BaseReferenceVisitor {\n constructor(options) {\n super(options);\n this.element = new ReferenceElement();\n }\n}\nexport default ReferenceVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ParameterElement from \"../../../../elements/Parameter.mjs\";\n/**\n * @public\n */\nexport const BaseParameterVisitor = OpenApi3_1Specification.visitors.document.objects.Parameter.$visitor;\n/**\n * @public\n */\nclass ParameterVisitor extends BaseParameterVisitor {\n constructor(options) {\n super(options);\n this.element = new ParameterElement();\n }\n}\nexport default ParameterVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport HeaderElement from \"../../../../elements/Header.mjs\";\n/**\n * @public\n */\nexport const BaseHeaderVisitor = OpenApi3_1Specification.visitors.document.objects.Header.$visitor;\n/**\n * @public\n */\nclass HeaderVisitor extends BaseHeaderVisitor {\n constructor(options) {\n super(options);\n this.element = new HeaderElement();\n }\n}\nexport default HeaderVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { isStringElement, toValue } from '@swagger-api/apidom-core';\nimport { FallbackVisitor, FixedFieldsVisitor } from '@swagger-api/apidom-ns-openapi-3-0';\nimport { JSONSchemaVisitor, ParentSchemaAwareVisitor } from '@swagger-api/apidom-ns-json-schema-2020-12';\nimport { isJsonSchemaDialectElement } from \"../../../../predicates.mjs\";\nimport SchemaElement from \"../../../../elements/Schema.mjs\";\nimport JsonSchemaDialectElement from \"../../../../elements/JsonSchemaDialect.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass SchemaVisitor extends Mixin(FixedFieldsVisitor, ParentSchemaAwareVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new SchemaElement();\n this.specPath = always(['document', 'objects', 'Schema']);\n this.canSupportSpecificationExtensions = true;\n this.jsonSchemaDefaultDialect = JsonSchemaDialectElement.default;\n this.passingOptionsNames.push('parent');\n }\n ObjectElement(objectElement) {\n this.handleDialectIdentifier(objectElement);\n this.handleSchemaIdentifier(objectElement);\n\n // for further processing consider this Schema Element as parent for all embedded Schema Elements\n this.parent = this.element;\n const result = FixedFieldsVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // mark this SchemaElement with reference metadata\n if (isStringElement(this.element.$ref)) {\n this.element.classes.push('reference-element');\n this.element.setMetaProperty('referenced-element', 'schema');\n }\n return result;\n }\n BooleanElement(booleanElement) {\n return JSONSchemaVisitor.prototype.BooleanElement.call(this, booleanElement);\n }\n\n /**\n * This function depends on some external context, so we need to make sure this function\n * works even when no context is provided like when directly refracting generic Object Element\n * into Schema Element: `SchemaElement.refract(new ObjectElement({ type: 'object' });`\n */\n get defaultDialectIdentifier() {\n let jsonSchemaDialect;\n if (this.openApiSemanticElement !== undefined &&\n // @ts-ignore\n isJsonSchemaDialectElement(this.openApiSemanticElement.jsonSchemaDialect)) {\n // @ts-ignore\n jsonSchemaDialect = toValue(this.openApiSemanticElement.jsonSchemaDialect);\n } else if (this.openApiGenericElement !== undefined && isStringElement(this.openApiGenericElement.get('jsonSchemaDialect'))) {\n jsonSchemaDialect = toValue(this.openApiGenericElement.get('jsonSchemaDialect'));\n } else {\n jsonSchemaDialect = toValue(this.jsonSchemaDefaultDialect);\n }\n return jsonSchemaDialect;\n }\n handleDialectIdentifier(objectElement) {\n return JSONSchemaVisitor.prototype.handleDialectIdentifier.call(this, objectElement);\n }\n handleSchemaIdentifier(objectElement) {\n return JSONSchemaVisitor.prototype.handleSchemaIdentifier.call(this, objectElement);\n }\n}\nexport default SchemaVisitor;","import { $defsVisitor as $defsJSONSchema202012Visitor } from '@swagger-api/apidom-ns-json-schema-2020-12';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass $defsVisitor extends $defsJSONSchema202012Visitor {\n constructor(options) {\n super(options);\n this.passingOptionsNames.push('parent');\n }\n}\nexport default $defsVisitor;","import { AllOfVisitor as AllOfJSONSchema202012Options } from '@swagger-api/apidom-ns-json-schema-2020-12';\n/**\n * @public\n */\nclass AllOfVisitor extends AllOfJSONSchema202012Options {\n constructor(options) {\n super(options);\n this.passingOptionsNames.push('parent');\n }\n}\nexport default AllOfVisitor;","import { AnyOfVisitor as AnyOfJSONSchema202012Options } from '@swagger-api/apidom-ns-json-schema-2020-12';\n/**\n * @public\n */\nclass AnyOfVisitor extends AnyOfJSONSchema202012Options {\n constructor(options) {\n super(options);\n this.passingOptionsNames.push('parent');\n }\n}\nexport default AnyOfVisitor;","import { OneOfVisitor as OneOfJSONSchema202012Options } from '@swagger-api/apidom-ns-json-schema-2020-12';\n/**\n * @public\n */\nclass OneOfVisitor extends OneOfJSONSchema202012Options {\n constructor(options) {\n super(options);\n this.passingOptionsNames.push('parent');\n }\n}\nexport default OneOfVisitor;","import { DependentSchemasVisitor as DependentSchemaJSONSchema202012Visitor } from '@swagger-api/apidom-ns-json-schema-2020-12';\n/**\n * @public\n */\nclass DependentSchemasVisitor extends DependentSchemaJSONSchema202012Visitor {\n constructor(options) {\n super(options);\n this.passingOptionsNames.push('parent');\n }\n}\nexport default DependentSchemasVisitor;","import { PrefixItemsVisitor as PrefixItemsJSONSchema202012Visitor } from '@swagger-api/apidom-ns-json-schema-2020-12';\n/**\n * @public\n */\nclass PrefixItemsVisitor extends PrefixItemsJSONSchema202012Visitor {\n constructor(options) {\n super(options);\n this.passingOptionsNames.push('parent');\n }\n}\nexport default PrefixItemsVisitor;","import { PropertiesVisitor as PropertiesJSONSchema202012Visitor } from '@swagger-api/apidom-ns-json-schema-2020-12';\n/**\n * @public\n */\nclass PropertiesVisitor extends PropertiesJSONSchema202012Visitor {\n constructor(options) {\n super(options);\n this.passingOptionsNames.push('parent');\n }\n}\nexport default PropertiesVisitor;","import { PatternPropertiesVisitor as PatternPropertiesJSONSchema202012Visitor } from '@swagger-api/apidom-ns-json-schema-2020-12';\n/**\n * @public\n */\nclass PatternPropertiesVisitor extends PatternPropertiesJSONSchema202012Visitor {\n constructor(options) {\n super(options);\n this.passingOptionsNames.push('parent');\n }\n}\nexport default PatternPropertiesVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport DiscriminatorElement from \"../../../../elements/Discriminator.mjs\";\n/**\n * @public\n */\nexport const BaseDiscriminatorVisitor = OpenApi3_1Specification.visitors.document.objects.Discriminator.$visitor;\n/**\n * @public\n */\nclass DiscriminatorVisitor extends BaseDiscriminatorVisitor {\n constructor(options) {\n super(options);\n this.element = new DiscriminatorElement();\n this.canSupportSpecificationExtensions = true;\n }\n}\nexport default DiscriminatorVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport XmlElement from \"../../../../elements/Xml.mjs\";\n/**\n * @public\n */\nexport const BaseXMLVisitor = OpenApi3_1Specification.visitors.document.objects.XML.$visitor;\n/**\n * @public\n */\nclass XmlVisitor extends BaseXMLVisitor {\n constructor(options) {\n super(options);\n this.element = new XmlElement();\n }\n}\nexport default XmlVisitor;","import { Mixin } from 'ts-mixer';\nimport { always } from 'ramda';\nimport { ComponentsSchemasElement, MapVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-openapi-3-0';\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass SchemasVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsSchemasElement();\n this.specPath = always(['document', 'objects', 'Schema']);\n }\n}\nexport default SchemasVisitor;","import { Mixin } from 'ts-mixer';\nimport { isReferenceLikeElement, MapVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ComponentsPathItemsElement from \"../../../../elements/nces/ComponentsPathItems.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass PathItemsVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new ComponentsPathItemsElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'PathItem'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n // @ts-ignore\n referenceElement.setMetaProperty('referenced-element', 'pathItem');\n });\n return result;\n }\n}\nexport default PathItemsVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ExampleElement from \"../../../../elements/Example.mjs\";\n/**\n * @public\n */\nexport const BaseExampleVisitor = OpenApi3_1Specification.visitors.document.objects.Example.$visitor;\n/**\n * @public\n */\nclass ExampleVisitor extends BaseExampleVisitor {\n constructor(options) {\n super(options);\n this.element = new ExampleElement();\n }\n}\nexport default ExampleVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ExternalDocumentationElement from \"../../../../elements/ExternalDocumentation.mjs\";\n/**\n * @public\n */\nexport const BaseExternalDocumentationVisitor = OpenApi3_1Specification.visitors.document.objects.ExternalDocumentation.$visitor;\n/**\n * @public\n */\nclass ExternalDocumentationVisitor extends BaseExternalDocumentationVisitor {\n constructor(options) {\n super(options);\n this.element = new ExternalDocumentationElement();\n }\n}\nexport default ExternalDocumentationVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport EncodingElement from \"../../../../elements/Encoding.mjs\";\n/**\n * @public\n */\nexport const BaseEncodingVisitor = OpenApi3_1Specification.visitors.document.objects.Encoding.$visitor;\n/**\n * @public\n */\nclass EncodingVisitor extends BaseEncodingVisitor {\n constructor(options) {\n super(options);\n this.element = new EncodingElement();\n }\n}\nexport default EncodingVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport PathsElement from \"../../../../elements/Paths.mjs\";\n/**\n * @public\n */\nexport const BasePathsVisitor = OpenApi3_1Specification.visitors.document.objects.Paths.$visitor;\n/**\n * @public\n */\nclass PathsVisitor extends BasePathsVisitor {\n constructor(options) {\n super(options);\n this.element = new PathsElement();\n }\n}\nexport default PathsVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport RequestBodyElement from \"../../../../elements/RequestBody.mjs\";\n/**\n * @public\n */\nexport const BaseRequestBodyVisitor = OpenApi3_1Specification.visitors.document.objects.RequestBody.$visitor;\n/**\n * @public\n */\nclass RequestBodyVisitor extends BaseRequestBodyVisitor {\n constructor(options) {\n super(options);\n this.element = new RequestBodyElement();\n }\n}\nexport default RequestBodyVisitor;","import { isReferenceLikeElement, specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport CallbackElement from \"../../../../elements/Callback.mjs\";\nimport { isReferenceElement } from \"../../../../predicates.mjs\";\n/**\n * @public\n */\nexport const BaseCallbackVisitor = OpenApi3_1Specification.visitors.document.objects.Callback.$visitor;\n/**\n * @public\n */\nclass CallbackVisitor extends BaseCallbackVisitor {\n constructor(options) {\n super(options);\n this.element = new CallbackElement();\n this.specPath = element => {\n // @ts-ignore\n return isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'PathItem'];\n };\n }\n ObjectElement(objectElement) {\n const result = BaseCallbackVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n // @ts-ignore\n referenceElement.setMetaProperty('referenced-element', 'pathItem');\n });\n return result;\n }\n}\nexport default CallbackVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ResponseElement from \"../../../../elements/Response.mjs\";\n/**\n * @public\n */\nexport const BaseResponseVisitor = OpenApi3_1Specification.visitors.document.objects.Response.$visitor;\n/**\n * @public\n */\nclass ResponseVisitor extends BaseResponseVisitor {\n constructor(options) {\n super(options);\n this.element = new ResponseElement();\n }\n}\nexport default ResponseVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport ResponsesElement from \"../../../../elements/Responses.mjs\";\n/**\n * @public\n */\nexport const BaseResponsesVisitor = OpenApi3_1Specification.visitors.document.objects.Responses.$visitor;\n/**\n * @public\n */\nclass ResponsesVisitor extends BaseResponsesVisitor {\n constructor(options) {\n super(options);\n this.element = new ResponsesElement();\n }\n}\nexport default ResponsesVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport OperationElement from \"../../../../elements/Operation.mjs\";\n/**\n * @public\n */\nexport const BaseOperationVisitor = OpenApi3_1Specification.visitors.document.objects.Operation.$visitor;\n/**\n * @public\n */\nclass OperationVisitor extends BaseOperationVisitor {\n constructor(options) {\n super(options);\n this.element = new OperationElement();\n }\n}\nexport default OperationVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport PathItemElement from \"../../../../elements/PathItem.mjs\";\n/**\n * @public\n */\nexport const BasePathItemVisitor = OpenApi3_1Specification.visitors.document.objects.PathItem.$visitor;\n/**\n * @public\n */\nclass PathItemVisitor extends BasePathItemVisitor {\n constructor(options) {\n super(options);\n this.element = new PathItemElement();\n }\n}\nexport default PathItemVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport SecuritySchemeElement from \"../../../../elements/SecurityScheme.mjs\";\n/**\n * @public\n */\nexport const BaseSecuritySchemeVisitor = OpenApi3_1Specification.visitors.document.objects.SecurityScheme.$visitor;\n/**\n * @public\n */\nclass SecuritySchemeVisitor extends BaseSecuritySchemeVisitor {\n constructor(options) {\n super(options);\n this.element = new SecuritySchemeElement();\n }\n}\nexport default SecuritySchemeVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport OAuthFlowsElement from \"../../../../elements/OAuthFlows.mjs\";\n/**\n * @public\n */\nexport const BaseOAuthFlowsVisitor = OpenApi3_1Specification.visitors.document.objects.OAuthFlows.$visitor;\n/**\n * @public\n */\nclass OAuthFlowsVisitor extends BaseOAuthFlowsVisitor {\n constructor(options) {\n super(options);\n this.element = new OAuthFlowsElement();\n }\n}\nexport default OAuthFlowsVisitor;","import { specificationObj as OpenApi3_1Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport OAuthFlowElement from \"../../../../elements/OAuthFlow.mjs\";\n/**\n * @public\n */\nexport const BaseOAuthFlowVisitor = OpenApi3_1Specification.visitors.document.objects.OAuthFlow.$visitor;\n/**\n * @public\n */\nclass OAuthFlowVisitor extends BaseOAuthFlowVisitor {\n constructor(options) {\n super(options);\n this.element = new OAuthFlowElement();\n }\n}\nexport default OAuthFlowVisitor;","import { Mixin } from 'ts-mixer';\nimport { toValue } from '@swagger-api/apidom-core';\nimport { isReferenceLikeElement, MapVisitor, FallbackVisitor } from '@swagger-api/apidom-ns-openapi-3-0';\nimport WebhooksElement from \"../../../elements/nces/Webhooks.mjs\";\nimport { isPathItemElement, isReferenceElement } from \"../../../predicates.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass WebhooksVisitor extends Mixin(MapVisitor, FallbackVisitor) {\n constructor(options) {\n super(options);\n this.element = new WebhooksElement();\n this.specPath = element => isReferenceLikeElement(element) ? ['document', 'objects', 'Reference'] : ['document', 'objects', 'PathItem'];\n }\n ObjectElement(objectElement) {\n const result = MapVisitor.prototype.ObjectElement.call(this, objectElement);\n\n // decorate every ReferenceElement with metadata about their referencing type\n // @ts-ignore\n this.element.filter(isReferenceElement).forEach(referenceElement => {\n // @ts-ignore\n referenceElement.setMetaProperty('referenced-element', 'pathItem');\n });\n\n // decorate every PathItemElement with Webhook name metadata\n this.element.filter(isPathItemElement)\n // @ts-ignore\n .forEach((pathItemElement, key) => {\n // @ts-ignore\n pathItemElement.setMetaProperty('webhook-name', toValue(key));\n });\n return result;\n }\n}\nexport default WebhooksVisitor;","import { specificationObj as OpenApi3_0Specification } from '@swagger-api/apidom-ns-openapi-3-0';\nimport { specificationObj as JSONSchema202012Specification } from '@swagger-api/apidom-ns-json-schema-2020-12';\nimport OpenApi3_1Visitor from \"./visitors/open-api-3-1/index.mjs\";\nimport InfoVisitor from \"./visitors/open-api-3-1/info/index.mjs\";\nimport ContactVisitor from \"./visitors/open-api-3-1/contact/index.mjs\";\nimport LicenseVisitor from \"./visitors/open-api-3-1/license/index.mjs\";\nimport LinkVisitor from \"./visitors/open-api-3-1/link/index.mjs\";\nimport JsonSchemaDialectVisitor from \"./visitors/open-api-3-1/JsonSchemaDialectVisitor.mjs\";\nimport ServerVisitor from \"./visitors/open-api-3-1/server/index.mjs\";\nimport ServerVariableVisitor from \"./visitors/open-api-3-1/server-variable/index.mjs\";\nimport MediaTypeVisitor from \"./visitors/open-api-3-1/media-type/index.mjs\";\nimport SecurityRequirementVisitor from \"./visitors/open-api-3-1/security-requirement/index.mjs\";\nimport ComponentsVisitor from \"./visitors/open-api-3-1/components/index.mjs\";\nimport TagVisitor from \"./visitors/open-api-3-1/tag/index.mjs\";\nimport ReferenceVisitor from \"./visitors/open-api-3-1/reference/index.mjs\";\nimport ParameterVisitor from \"./visitors/open-api-3-1/parameter/index.mjs\";\nimport HeaderVisitor from \"./visitors/open-api-3-1/header/index.mjs\";\nimport SchemaVisitor from \"./visitors/open-api-3-1/schema/index.mjs\";\nimport Schema$defsVisitor from \"./visitors/open-api-3-1/schema/$defsVisitor.mjs\";\nimport SchemaAllOfVisitor from \"./visitors/open-api-3-1/schema/AllOfVisitor.mjs\";\nimport SchemaAnyOfVisitor from \"./visitors/open-api-3-1/schema/AnyOfVisitor.mjs\";\nimport SchemaOneOfVisitor from \"./visitors/open-api-3-1/schema/OneOfVisitor.mjs\";\nimport SchemaDependantSchemasVisitor from \"./visitors/open-api-3-1/schema/DependentSchemasVisitor.mjs\";\nimport SchemaPrefixItemsVisitor from \"./visitors/open-api-3-1/schema/PrefixItemsVisitor.mjs\";\nimport SchemaPropertiesVisitor from \"./visitors/open-api-3-1/schema/PropertiesVisitor.mjs\";\nimport SchemaPatternPropertiesVisitor from \"./visitors/open-api-3-1/schema/PatternPropertiesVisitor.mjs\";\nimport DiscriminatorVisitor from \"./visitors/open-api-3-1/distriminator/index.mjs\";\nimport XmlVisitor from \"./visitors/open-api-3-1/xml/index.mjs\";\nimport ComponentsSchemasVisitor from \"./visitors/open-api-3-1/components/SchemasVisitor.mjs\";\nimport ComponentsPathItemsVisitor from \"./visitors/open-api-3-1/components/PathItemsVisitor.mjs\";\nimport ExampleVisitor from \"./visitors/open-api-3-1/example/index.mjs\";\nimport ExternalDocumentationVisitor from \"./visitors/open-api-3-1/external-documentation/index.mjs\";\nimport EncodingVisitor from \"./visitors/open-api-3-1/encoding/index.mjs\";\nimport PathsVisitor from \"./visitors/open-api-3-1/paths/index.mjs\";\nimport RequestBodyVisitor from \"./visitors/open-api-3-1/request-body/index.mjs\";\nimport CallbackVisitor from \"./visitors/open-api-3-1/callback/index.mjs\";\nimport ResponseVisitor from \"./visitors/open-api-3-1/response/index.mjs\";\nimport ResponsesVisitor from \"./visitors/open-api-3-1/responses/index.mjs\";\nimport OperationVisitor from \"./visitors/open-api-3-1/operation/index.mjs\";\nimport PathItemVisitor from \"./visitors/open-api-3-1/path-item/index.mjs\";\nimport SecuritySchemeVisitor from \"./visitors/open-api-3-1/security-scheme/index.mjs\";\nimport OAuthFlowsVisitor from \"./visitors/open-api-3-1/oauth-flows/index.mjs\";\nimport OAuthFlowVisitor from \"./visitors/open-api-3-1/oauth-flow/index.mjs\";\nimport WebhooksVisitor from \"./visitors/open-api-3-1/WebhooksVisitor.mjs\";\nconst {\n JSONSchema: JSONSchemaVisitor,\n LinkDescription: LinkDescriptionVisitor\n} = JSONSchema202012Specification.visitors.document.objects;\n\n/**\n * Specification object allows us to have complete control over visitors\n * when traversing the ApiDOM.\n * Specification also allows us to create amended refractors from\n * existing ones by manipulating it.\n *\n * Note: Specification object allows to use absolute internal JSON pointers.\n * @public\n */\nconst specification = {\n visitors: {\n value: OpenApi3_0Specification.visitors.value,\n document: {\n objects: {\n OpenApi: {\n $visitor: OpenApi3_1Visitor,\n fixedFields: {\n openapi: OpenApi3_0Specification.visitors.document.objects.OpenApi.fixedFields.openapi,\n info: {\n $ref: '#/visitors/document/objects/Info'\n },\n jsonSchemaDialect: JsonSchemaDialectVisitor,\n servers: OpenApi3_0Specification.visitors.document.objects.OpenApi.fixedFields.servers,\n paths: {\n $ref: '#/visitors/document/objects/Paths'\n },\n webhooks: WebhooksVisitor,\n components: {\n $ref: '#/visitors/document/objects/Components'\n },\n security: OpenApi3_0Specification.visitors.document.objects.OpenApi.fixedFields.security,\n tags: OpenApi3_0Specification.visitors.document.objects.OpenApi.fixedFields.tags,\n externalDocs: {\n $ref: '#/visitors/document/objects/ExternalDocumentation'\n }\n }\n },\n Info: {\n $visitor: InfoVisitor,\n fixedFields: {\n title: OpenApi3_0Specification.visitors.document.objects.Info.fixedFields.title,\n description: OpenApi3_0Specification.visitors.document.objects.Info.fixedFields.description,\n summary: {\n $ref: '#/visitors/value'\n },\n termsOfService: OpenApi3_0Specification.visitors.document.objects.Info.fixedFields.termsOfService,\n contact: {\n $ref: '#/visitors/document/objects/Contact'\n },\n license: {\n $ref: '#/visitors/document/objects/License'\n },\n version: OpenApi3_0Specification.visitors.document.objects.Info.fixedFields.version\n }\n },\n Contact: {\n $visitor: ContactVisitor,\n fixedFields: {\n name: OpenApi3_0Specification.visitors.document.objects.Contact.fixedFields.name,\n url: OpenApi3_0Specification.visitors.document.objects.Contact.fixedFields.url,\n email: OpenApi3_0Specification.visitors.document.objects.Contact.fixedFields.email\n }\n },\n License: {\n $visitor: LicenseVisitor,\n fixedFields: {\n name: OpenApi3_0Specification.visitors.document.objects.License.fixedFields.name,\n identifier: {\n $ref: '#/visitors/value'\n },\n url: OpenApi3_0Specification.visitors.document.objects.License.fixedFields.url\n }\n },\n Server: {\n $visitor: ServerVisitor,\n fixedFields: {\n url: OpenApi3_0Specification.visitors.document.objects.Server.fixedFields.url,\n description: OpenApi3_0Specification.visitors.document.objects.Server.fixedFields.description,\n variables: OpenApi3_0Specification.visitors.document.objects.Server.fixedFields.variables\n }\n },\n ServerVariable: {\n $visitor: ServerVariableVisitor,\n fixedFields: {\n enum: OpenApi3_0Specification.visitors.document.objects.ServerVariable.fixedFields.enum,\n default: OpenApi3_0Specification.visitors.document.objects.ServerVariable.fixedFields.default,\n description: OpenApi3_0Specification.visitors.document.objects.ServerVariable.fixedFields.description\n }\n },\n Components: {\n $visitor: ComponentsVisitor,\n fixedFields: {\n schemas: ComponentsSchemasVisitor,\n responses: OpenApi3_0Specification.visitors.document.objects.Components.fixedFields.responses,\n parameters: OpenApi3_0Specification.visitors.document.objects.Components.fixedFields.parameters,\n examples: OpenApi3_0Specification.visitors.document.objects.Components.fixedFields.examples,\n requestBodies: OpenApi3_0Specification.visitors.document.objects.Components.fixedFields.requestBodies,\n headers: OpenApi3_0Specification.visitors.document.objects.Components.fixedFields.headers,\n securitySchemes: OpenApi3_0Specification.visitors.document.objects.Components.fixedFields.securitySchemes,\n links: OpenApi3_0Specification.visitors.document.objects.Components.fixedFields.links,\n callbacks: OpenApi3_0Specification.visitors.document.objects.Components.fixedFields.callbacks,\n pathItems: ComponentsPathItemsVisitor\n }\n },\n Paths: {\n $visitor: PathsVisitor\n },\n PathItem: {\n $visitor: PathItemVisitor,\n fixedFields: {\n $ref: OpenApi3_0Specification.visitors.document.objects.PathItem.fixedFields.$ref,\n summary: OpenApi3_0Specification.visitors.document.objects.PathItem.fixedFields.summary,\n description: OpenApi3_0Specification.visitors.document.objects.PathItem.fixedFields.description,\n get: {\n $ref: '#/visitors/document/objects/Operation'\n },\n put: {\n $ref: '#/visitors/document/objects/Operation'\n },\n post: {\n $ref: '#/visitors/document/objects/Operation'\n },\n delete: {\n $ref: '#/visitors/document/objects/Operation'\n },\n options: {\n $ref: '#/visitors/document/objects/Operation'\n },\n head: {\n $ref: '#/visitors/document/objects/Operation'\n },\n patch: {\n $ref: '#/visitors/document/objects/Operation'\n },\n trace: {\n $ref: '#/visitors/document/objects/Operation'\n },\n servers: OpenApi3_0Specification.visitors.document.objects.PathItem.fixedFields.servers,\n parameters: OpenApi3_0Specification.visitors.document.objects.PathItem.fixedFields.parameters\n }\n },\n Operation: {\n $visitor: OperationVisitor,\n fixedFields: {\n tags: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.tags,\n summary: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.summary,\n description: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.description,\n externalDocs: {\n $ref: '#/visitors/document/objects/ExternalDocumentation'\n },\n operationId: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.operationId,\n parameters: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.parameters,\n requestBody: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.requestBody,\n responses: {\n $ref: '#/visitors/document/objects/Responses'\n },\n callbacks: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.callbacks,\n deprecated: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.deprecated,\n security: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.security,\n servers: OpenApi3_0Specification.visitors.document.objects.Operation.fixedFields.servers\n }\n },\n ExternalDocumentation: {\n $visitor: ExternalDocumentationVisitor,\n fixedFields: {\n description: OpenApi3_0Specification.visitors.document.objects.ExternalDocumentation.fixedFields.description,\n url: OpenApi3_0Specification.visitors.document.objects.ExternalDocumentation.fixedFields.url\n }\n },\n Parameter: {\n $visitor: ParameterVisitor,\n fixedFields: {\n name: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.name,\n in: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.in,\n description: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.description,\n required: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.required,\n deprecated: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.deprecated,\n allowEmptyValue: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,\n style: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.style,\n explode: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.explode,\n allowReserved: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.allowReserved,\n schema: {\n $ref: '#/visitors/document/objects/Schema'\n },\n example: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.example,\n examples: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.examples,\n content: OpenApi3_0Specification.visitors.document.objects.Parameter.fixedFields.content\n }\n },\n RequestBody: {\n $visitor: RequestBodyVisitor,\n fixedFields: {\n description: OpenApi3_0Specification.visitors.document.objects.RequestBody.fixedFields.description,\n content: OpenApi3_0Specification.visitors.document.objects.RequestBody.fixedFields.content,\n required: OpenApi3_0Specification.visitors.document.objects.RequestBody.fixedFields.required\n }\n },\n MediaType: {\n $visitor: MediaTypeVisitor,\n fixedFields: {\n schema: {\n $ref: '#/visitors/document/objects/Schema'\n },\n example: OpenApi3_0Specification.visitors.document.objects.MediaType.fixedFields.example,\n examples: OpenApi3_0Specification.visitors.document.objects.MediaType.fixedFields.examples,\n encoding: OpenApi3_0Specification.visitors.document.objects.MediaType.fixedFields.encoding\n }\n },\n Encoding: {\n $visitor: EncodingVisitor,\n fixedFields: {\n contentType: OpenApi3_0Specification.visitors.document.objects.Encoding.fixedFields.contentType,\n headers: OpenApi3_0Specification.visitors.document.objects.Encoding.fixedFields.headers,\n style: OpenApi3_0Specification.visitors.document.objects.Encoding.fixedFields.style,\n explode: OpenApi3_0Specification.visitors.document.objects.Encoding.fixedFields.explode,\n allowReserved: OpenApi3_0Specification.visitors.document.objects.Encoding.fixedFields.allowReserved\n }\n },\n Responses: {\n $visitor: ResponsesVisitor,\n fixedFields: {\n default: OpenApi3_0Specification.visitors.document.objects.Responses.fixedFields.default\n }\n },\n Response: {\n $visitor: ResponseVisitor,\n fixedFields: {\n description: OpenApi3_0Specification.visitors.document.objects.Response.fixedFields.description,\n headers: OpenApi3_0Specification.visitors.document.objects.Response.fixedFields.headers,\n content: OpenApi3_0Specification.visitors.document.objects.Response.fixedFields.content,\n links: OpenApi3_0Specification.visitors.document.objects.Response.fixedFields.links\n }\n },\n Callback: {\n $visitor: CallbackVisitor\n },\n Example: {\n $visitor: ExampleVisitor,\n fixedFields: {\n summary: OpenApi3_0Specification.visitors.document.objects.Example.fixedFields.summary,\n description: OpenApi3_0Specification.visitors.document.objects.Example.fixedFields.description,\n value: OpenApi3_0Specification.visitors.document.objects.Example.fixedFields.value,\n externalValue: OpenApi3_0Specification.visitors.document.objects.Example.fixedFields.externalValue\n }\n },\n Link: {\n $visitor: LinkVisitor,\n fixedFields: {\n operationRef: OpenApi3_0Specification.visitors.document.objects.Link.fixedFields.operationRef,\n operationId: OpenApi3_0Specification.visitors.document.objects.Link.fixedFields.operationId,\n parameters: OpenApi3_0Specification.visitors.document.objects.Link.fixedFields.parameters,\n requestBody: OpenApi3_0Specification.visitors.document.objects.Link.fixedFields.requestBody,\n description: OpenApi3_0Specification.visitors.document.objects.Link.fixedFields.description,\n server: {\n $ref: '#/visitors/document/objects/Server'\n }\n }\n },\n Header: {\n $visitor: HeaderVisitor,\n fixedFields: {\n description: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.description,\n required: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.required,\n deprecated: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.deprecated,\n allowEmptyValue: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.allowEmptyValue,\n style: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.style,\n explode: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.explode,\n allowReserved: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.allowReserved,\n schema: {\n $ref: '#/visitors/document/objects/Schema'\n },\n example: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.example,\n examples: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.examples,\n content: OpenApi3_0Specification.visitors.document.objects.Header.fixedFields.content\n }\n },\n Tag: {\n $visitor: TagVisitor,\n fixedFields: {\n name: OpenApi3_0Specification.visitors.document.objects.Tag.fixedFields.name,\n description: OpenApi3_0Specification.visitors.document.objects.Tag.fixedFields.description,\n externalDocs: {\n $ref: '#/visitors/document/objects/ExternalDocumentation'\n }\n }\n },\n Reference: {\n $visitor: ReferenceVisitor,\n fixedFields: {\n $ref: OpenApi3_0Specification.visitors.document.objects.Reference.fixedFields.$ref,\n summary: {\n $ref: '#/visitors/value'\n },\n description: {\n $ref: '#/visitors/value'\n }\n }\n },\n JSONSchema: {\n $ref: '#/visitors/document/objects/Schema'\n },\n LinkDescription: {\n ...LinkDescriptionVisitor\n },\n Schema: {\n $visitor: SchemaVisitor,\n fixedFields: {\n ...JSONSchemaVisitor.fixedFields,\n // core vocabulary\n $defs: Schema$defsVisitor,\n // applicator vocabulary\n allOf: SchemaAllOfVisitor,\n anyOf: SchemaAnyOfVisitor,\n oneOf: SchemaOneOfVisitor,\n not: {\n $ref: '#/visitors/document/objects/Schema'\n },\n if: {\n $ref: '#/visitors/document/objects/Schema'\n },\n then: {\n $ref: '#/visitors/document/objects/Schema'\n },\n else: {\n $ref: '#/visitors/document/objects/Schema'\n },\n dependentSchemas: SchemaDependantSchemasVisitor,\n prefixItems: SchemaPrefixItemsVisitor,\n items: {\n $ref: '#/visitors/document/objects/Schema'\n },\n contains: {\n $ref: '#/visitors/document/objects/Schema'\n },\n properties: SchemaPropertiesVisitor,\n patternProperties: SchemaPatternPropertiesVisitor,\n additionalProperties: {\n $ref: '#/visitors/document/objects/Schema'\n },\n propertyNames: {\n $ref: '#/visitors/document/objects/Schema'\n },\n // unevaluated Locations vocabulary\n unevaluatedItems: {\n $ref: '#/visitors/document/objects/Schema'\n },\n unevaluatedProperties: {\n $ref: '#/visitors/document/objects/Schema'\n },\n // validation vocabulary\n // contents of String-Encoded Data vocabulary\n contentSchema: {\n $ref: '#/visitors/document/objects/Schema'\n },\n // OAS base vocabulary\n discriminator: {\n $ref: '#/visitors/document/objects/Discriminator'\n },\n xml: {\n $ref: '#/visitors/document/objects/XML'\n },\n externalDocs: {\n $ref: '#/visitors/document/objects/ExternalDocumentation'\n },\n example: {\n $ref: '#/visitors/value'\n }\n }\n },\n Discriminator: {\n $visitor: DiscriminatorVisitor,\n fixedFields: {\n propertyName: OpenApi3_0Specification.visitors.document.objects.Discriminator.fixedFields.propertyName,\n mapping: OpenApi3_0Specification.visitors.document.objects.Discriminator.fixedFields.mapping\n }\n },\n XML: {\n $visitor: XmlVisitor,\n fixedFields: {\n name: OpenApi3_0Specification.visitors.document.objects.XML.fixedFields.name,\n namespace: OpenApi3_0Specification.visitors.document.objects.XML.fixedFields.namespace,\n prefix: OpenApi3_0Specification.visitors.document.objects.XML.fixedFields.prefix,\n attribute: OpenApi3_0Specification.visitors.document.objects.XML.fixedFields.attribute,\n wrapped: OpenApi3_0Specification.visitors.document.objects.XML.fixedFields.wrapped\n }\n },\n SecurityScheme: {\n $visitor: SecuritySchemeVisitor,\n fixedFields: {\n type: OpenApi3_0Specification.visitors.document.objects.SecurityScheme.fixedFields.type,\n description: OpenApi3_0Specification.visitors.document.objects.SecurityScheme.fixedFields.description,\n name: OpenApi3_0Specification.visitors.document.objects.SecurityScheme.fixedFields.name,\n in: OpenApi3_0Specification.visitors.document.objects.SecurityScheme.fixedFields.in,\n scheme: OpenApi3_0Specification.visitors.document.objects.SecurityScheme.fixedFields.scheme,\n bearerFormat: OpenApi3_0Specification.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,\n flows: {\n $ref: '#/visitors/document/objects/OAuthFlows'\n },\n openIdConnectUrl: OpenApi3_0Specification.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl\n }\n },\n OAuthFlows: {\n $visitor: OAuthFlowsVisitor,\n fixedFields: {\n implicit: {\n $ref: '#/visitors/document/objects/OAuthFlow'\n },\n password: {\n $ref: '#/visitors/document/objects/OAuthFlow'\n },\n clientCredentials: {\n $ref: '#/visitors/document/objects/OAuthFlow'\n },\n authorizationCode: {\n $ref: '#/visitors/document/objects/OAuthFlow'\n }\n }\n },\n OAuthFlow: {\n $visitor: OAuthFlowVisitor,\n fixedFields: {\n authorizationUrl: OpenApi3_0Specification.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,\n tokenUrl: OpenApi3_0Specification.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,\n refreshUrl: OpenApi3_0Specification.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,\n scopes: OpenApi3_0Specification.visitors.document.objects.OAuthFlow.fixedFields.scopes\n }\n },\n SecurityRequirement: {\n $visitor: SecurityRequirementVisitor\n }\n },\n extension: {\n $visitor: OpenApi3_0Specification.visitors.document.extension.$visitor\n }\n }\n }\n};\nexport default specification;","import { visit, dereference, refract as baseRefract, dispatchRefractorPlugins } from '@swagger-api/apidom-core';\nimport { path } from 'ramda';\nimport specification from \"./specification.mjs\";\nimport { keyMap, getNodeType } from \"../traversal/visitor.mjs\";\nimport createToolbox from \"./toolbox.mjs\";\nconst refract = (value, {\n specPath = ['visitors', 'document', 'objects', 'OpenApi', '$visitor'],\n plugins = []\n} = {}) => {\n const element = baseRefract(value);\n const resolvedSpec = dereference(specification);\n\n /**\n * This is where generic ApiDOM becomes semantic (namespace applied).\n * We don't allow consumers to hook into this translation.\n * Though we allow consumers to define their onw plugins on already transformed ApiDOM.\n */\n const RootVisitorClass = path(specPath, resolvedSpec);\n const rootVisitor = new RootVisitorClass({\n specObj: resolvedSpec\n });\n visit(element, rootVisitor);\n\n /**\n * Running plugins visitors means extra single traversal === performance hit.\n */\n return dispatchRefractorPlugins(rootVisitor.element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n keyMap,\n nodeTypeGetter: getNodeType\n }\n });\n};\nexport const createRefractor = specPath => (value, options = {}) => refract(value, {\n specPath,\n ...options\n});\nexport default refract;","import CallbackElement from \"../elements/Callback.mjs\";\nimport ComponentsElement from \"../elements/Components.mjs\";\nimport ContactElement from \"../elements/Contact.mjs\";\nimport DiscriminatorElement from \"../elements/Discriminator.mjs\";\nimport EncodingElement from \"../elements/Encoding.mjs\";\nimport ExampleElement from \"../elements/Example.mjs\";\nimport ExternalDocumentationElement from \"../elements/ExternalDocumentation.mjs\";\nimport HeaderElement from \"../elements/Header.mjs\";\nimport InfoElement from \"../elements/Info.mjs\";\nimport JsonSchemaDialectElement from \"../elements/JsonSchemaDialect.mjs\";\nimport LicenseElement from \"../elements/License.mjs\";\nimport LinkElement from \"../elements/Link.mjs\";\nimport MediaTypeElement from \"../elements/MediaType.mjs\";\nimport OAuthFlowElement from \"../elements/OAuthFlow.mjs\";\nimport OAuthFlowsElement from \"../elements/OAuthFlows.mjs\";\nimport OpenapiElement from \"../elements/Openapi.mjs\";\nimport OpenApi3_1Element from \"../elements/OpenApi3-1.mjs\";\nimport OperationElement from \"../elements/Operation.mjs\";\nimport ParameterElement from \"../elements/Parameter.mjs\";\nimport PathItemElement from \"../elements/PathItem.mjs\";\nimport PathsElement from \"../elements/Paths.mjs\";\nimport ReferenceElement from \"../elements/Reference.mjs\";\nimport RequestBodyElement from \"../elements/RequestBody.mjs\";\nimport ResponseElement from \"../elements/Response.mjs\";\nimport ResponsesElement from \"../elements/Responses.mjs\";\nimport SchemaElement from \"../elements/Schema.mjs\";\nimport SecurityRequirementElement from \"../elements/SecurityRequirement.mjs\";\nimport SecuritySchemeElement from \"../elements/SecurityScheme.mjs\";\nimport ServerElement from \"../elements/Server.mjs\";\nimport ServerVariableElement from \"../elements/ServerVariable.mjs\";\nimport TagElement from \"../elements/Tag.mjs\";\nimport XmlElement from \"../elements/Xml.mjs\";\nimport { createRefractor } from \"./index.mjs\"; // register refractors specific to element types\nCallbackElement.refract = createRefractor(['visitors', 'document', 'objects', 'Callback', '$visitor']);\nComponentsElement.refract = createRefractor(['visitors', 'document', 'objects', 'Components', '$visitor']);\nContactElement.refract = createRefractor(['visitors', 'document', 'objects', 'Contact', '$visitor']);\nExampleElement.refract = createRefractor(['visitors', 'document', 'objects', 'Example', '$visitor']);\nDiscriminatorElement.refract = createRefractor(['visitors', 'document', 'objects', 'Discriminator', '$visitor']);\nEncodingElement.refract = createRefractor(['visitors', 'document', 'objects', 'Encoding', '$visitor']);\nExternalDocumentationElement.refract = createRefractor(['visitors', 'document', 'objects', 'ExternalDocumentation', '$visitor']);\nHeaderElement.refract = createRefractor(['visitors', 'document', 'objects', 'Header', '$visitor']);\nInfoElement.refract = createRefractor(['visitors', 'document', 'objects', 'Info', '$visitor']);\nJsonSchemaDialectElement.refract = createRefractor(['visitors', 'document', 'objects', 'OpenApi', 'fixedFields', 'jsonSchemaDialect']);\nLicenseElement.refract = createRefractor(['visitors', 'document', 'objects', 'License', '$visitor']);\nLinkElement.refract = createRefractor(['visitors', 'document', 'objects', 'Link', '$visitor']);\nMediaTypeElement.refract = createRefractor(['visitors', 'document', 'objects', 'MediaType', '$visitor']);\nOAuthFlowElement.refract = createRefractor(['visitors', 'document', 'objects', 'OAuthFlow', '$visitor']);\nOAuthFlowsElement.refract = createRefractor(['visitors', 'document', 'objects', 'OAuthFlows', '$visitor']);\nOpenapiElement.refract = createRefractor(['visitors', 'document', 'objects', 'OpenApi', 'fixedFields', 'openapi']);\nOpenApi3_1Element.refract = createRefractor(['visitors', 'document', 'objects', 'OpenApi', '$visitor']);\nOperationElement.refract = createRefractor(['visitors', 'document', 'objects', 'Operation', '$visitor']);\nParameterElement.refract = createRefractor(['visitors', 'document', 'objects', 'Parameter', '$visitor']);\nPathItemElement.refract = createRefractor(['visitors', 'document', 'objects', 'PathItem', '$visitor']);\nPathsElement.refract = createRefractor(['visitors', 'document', 'objects', 'Paths', '$visitor']);\nReferenceElement.refract = createRefractor(['visitors', 'document', 'objects', 'Reference', '$visitor']);\nRequestBodyElement.refract = createRefractor(['visitors', 'document', 'objects', 'RequestBody', '$visitor']);\nResponseElement.refract = createRefractor(['visitors', 'document', 'objects', 'Response', '$visitor']);\nResponsesElement.refract = createRefractor(['visitors', 'document', 'objects', 'Responses', '$visitor']);\nSchemaElement.refract = createRefractor(['visitors', 'document', 'objects', 'Schema', '$visitor']);\nSecurityRequirementElement.refract = createRefractor(['visitors', 'document', 'objects', 'SecurityRequirement', '$visitor']);\nSecuritySchemeElement.refract = createRefractor(['visitors', 'document', 'objects', 'SecurityScheme', '$visitor']);\nServerElement.refract = createRefractor(['visitors', 'document', 'objects', 'Server', '$visitor']);\nServerVariableElement.refract = createRefractor(['visitors', 'document', 'objects', 'ServerVariable', '$visitor']);\nTagElement.refract = createRefractor(['visitors', 'document', 'objects', 'Tag', '$visitor']);\nXmlElement.refract = createRefractor(['visitors', 'document', 'objects', 'XML', '$visitor']);\nexport { CallbackElement, ComponentsElement, ContactElement, DiscriminatorElement, EncodingElement, ExampleElement, ExternalDocumentationElement, HeaderElement, InfoElement, JsonSchemaDialectElement, LicenseElement, LinkElement, MediaTypeElement, OAuthFlowElement, OAuthFlowsElement, OpenapiElement, OpenApi3_1Element, OperationElement, ParameterElement, PathItemElement, PathsElement, ReferenceElement, RequestBodyElement, ResponseElement, ResponsesElement, SchemaElement, SecurityRequirementElement, SecuritySchemeElement, ServerElement, ServerVariableElement, TagElement, XmlElement };","import { ParseResultElement, StringElement } from '@swagger-api/apidom-core';\nimport ParserError from \"../../../errors/ParserError.mjs\";\nimport Parser from \"../Parser.mjs\";\n/**\n * Everything that is not recognized by other parsers will be considered by this parser\n * as a binary data and will be encoded to Base64 format.\n * @public\n */\n/**\n * @public\n */\nclass BinaryParser extends Parser {\n constructor(options) {\n super({\n ...(options !== null && options !== void 0 ? options : {}),\n name: 'binary'\n });\n }\n canParse(file) {\n return this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);\n }\n\n // eslint-disable-next-line class-methods-use-this\n parse(file) {\n try {\n /**\n * More information about binary strings and btoa function in following link:\n * https://developer.mozilla.org/en-US/docs/Web/API/btoa\n *\n * @example\n * ArrayBuffer to base64 conversion:\n *\n * const binaryString = String.fromCharCode.apply(null, file.data);\n * base64String = btoa(binaryString);\n */\n const binaryString = unescape(encodeURIComponent(file.toString()));\n const base64String = btoa(binaryString);\n const parseResultElement = new ParseResultElement();\n if (base64String.length !== 0) {\n const base64StringElement = new StringElement(base64String);\n base64StringElement.classes.push('result');\n parseResultElement.push(base64StringElement);\n }\n return parseResultElement;\n } catch (error) {\n throw new ParserError(`Error parsing \"${file.uri}\"`, {\n cause: error\n });\n }\n }\n}\nexport default BinaryParser;","import ResolveStrategy from \"../ResolveStrategy.mjs\";\nimport ReferenceSet from \"../../../ReferenceSet.mjs\";\nimport { merge as mergeOptions } from \"../../../options/util.mjs\";\nimport UnmatchedDereferenceStrategyError from \"../../../errors/UnmatchedDereferenceStrategyError.mjs\";\n/**\n * @public\n */\n/**\n * @public\n */\nclass OpenAPI3_1ResolveStrategy extends ResolveStrategy {\n constructor(options) {\n super({\n ...(options !== null && options !== void 0 ? options : {}),\n name: 'openapi-3-1'\n });\n }\n canResolve(file, options) {\n const dereferenceStrategy = options.dereference.strategies.find(strategy => strategy.name === 'openapi-3-1');\n if (dereferenceStrategy === undefined) {\n return false;\n }\n return dereferenceStrategy.canDereference(file, options);\n }\n async resolve(file, options) {\n const dereferenceStrategy = options.dereference.strategies.find(strategy => strategy.name === 'openapi-3-1');\n if (dereferenceStrategy === undefined) {\n throw new UnmatchedDereferenceStrategyError('\"openapi-3-1\" dereference strategy is not available.');\n }\n const refSet = new ReferenceSet();\n const mergedOptions = mergeOptions(options, {\n resolve: {\n internal: false\n },\n dereference: {\n refSet\n }\n });\n await dereferenceStrategy.dereference(file, mergedOptions);\n return refSet;\n }\n}\nexport default OpenAPI3_1ResolveStrategy;","// we're targeting browsers that already support fetch API\nconst {\n AbortController,\n AbortSignal\n} = globalThis;\nexport { AbortController, AbortSignal };","import { AbortController, AbortSignal } from './abortcontroller-ponyfill.browser.js';\nif (typeof globalThis.AbortController === 'undefined') {\n globalThis.AbortController = AbortController;\n}\nif (typeof globalThis.AbortSignal === 'undefined') {\n globalThis.AbortSignal = AbortSignal;\n}","import { ResolverError, HTTPResolver } from '@swagger-api/apidom-reference/configuration/empty';\nimport '../../../../../../helpers/fetch-polyfill.node.js';\nimport '../../../../../../helpers/abortcontroller-polyfill.node.js';\nimport Http from '../../../../../../http/index.js';\nclass HTTPResolverSwaggerClient extends HTTPResolver {\n swaggerHTTPClient = Http;\n swaggerHTTPClientConfig;\n constructor({\n swaggerHTTPClient = Http,\n swaggerHTTPClientConfig = {},\n ...rest\n } = {}) {\n super({\n ...rest,\n name: 'http-swagger-client'\n });\n this.swaggerHTTPClient = swaggerHTTPClient;\n this.swaggerHTTPClientConfig = swaggerHTTPClientConfig;\n }\n getHttpClient() {\n return this.swaggerHTTPClient;\n }\n async read(file) {\n const client = this.getHttpClient();\n const controller = new AbortController();\n const {\n signal\n } = controller;\n const timeoutID = setTimeout(() => {\n controller.abort();\n }, this.timeout);\n const credentials = this.getHttpClient().withCredentials || this.withCredentials ? 'include' : 'same-origin';\n const redirect = this.redirects === 0 ? 'error' : 'follow';\n const follow = this.redirects > 0 ? this.redirects : undefined;\n try {\n const response = await client({\n url: file.uri,\n signal,\n userFetch: async (resource, options) => {\n let res = await fetch(resource, options);\n try {\n // undici supports mutations\n res.headers.delete('Content-Type');\n } catch {\n // Fetch API has guards which prevent mutations\n res = new Response(res.body, {\n ...res,\n headers: new Headers(res.headers)\n });\n res.headers.delete('Content-Type');\n }\n return res;\n },\n credentials,\n redirect,\n follow,\n ...this.swaggerHTTPClientConfig\n });\n return response.text.arrayBuffer();\n } catch (error) {\n throw new ResolverError(`Error downloading \"${file.uri}\"`, {\n cause: error\n });\n } finally {\n clearTimeout(timeoutID);\n }\n }\n}\nexport default HTTPResolverSwaggerClient;","import { from, ParseResultElement } from '@swagger-api/apidom-core';\nimport { ParserError, Parser } from '@swagger-api/apidom-reference/configuration/empty';\nclass JSONParser extends Parser {\n constructor(options = {}) {\n super({\n name: 'json-swagger-client',\n mediaTypes: ['application/json'],\n ...options\n });\n }\n async canParse(file) {\n const hasSupportedFileExtension = this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);\n const hasSupportedMediaType = this.mediaTypes.includes(file.mediaType);\n if (!hasSupportedFileExtension) return false;\n if (hasSupportedMediaType) return true;\n if (!hasSupportedMediaType) {\n try {\n JSON.parse(file.toString());\n return true;\n } catch (error) {\n return false;\n }\n }\n return false;\n }\n async parse(file) {\n if (this.sourceMap) {\n throw new ParserError(\"json-swagger-client parser plugin doesn't support sourceMaps option\");\n }\n const parseResultElement = new ParseResultElement();\n const source = file.toString();\n\n // allow empty files\n if (this.allowEmpty && source.trim() === '') {\n return parseResultElement;\n }\n try {\n const element = from(JSON.parse(source));\n element.classes.push('result');\n parseResultElement.push(element);\n return parseResultElement;\n } catch (error) {\n throw new ParserError(`Error parsing \"${file.uri}\"`, {\n cause: error\n });\n }\n }\n}\nexport default JSONParser;","import YAML, { JSON_SCHEMA } from 'js-yaml';\nimport { from, ParseResultElement } from '@swagger-api/apidom-core';\nimport { ParserError, Parser } from '@swagger-api/apidom-reference/configuration/empty';\nclass YAMLParser extends Parser {\n constructor(options = {}) {\n super({\n name: 'yaml-1-2-swagger-client',\n mediaTypes: ['text/yaml', 'application/yaml'],\n ...options\n });\n }\n async canParse(file) {\n const hasSupportedFileExtension = this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);\n const hasSupportedMediaType = this.mediaTypes.includes(file.mediaType);\n if (!hasSupportedFileExtension) return false;\n if (hasSupportedMediaType) return true;\n if (!hasSupportedMediaType) {\n try {\n YAML.load(file.toString(), {\n schema: JSON_SCHEMA\n });\n return true;\n } catch (error) {\n return false;\n }\n }\n return false;\n }\n async parse(file) {\n if (this.sourceMap) {\n throw new ParserError(\"yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option\");\n }\n const parseResultElement = new ParseResultElement();\n const source = file.toString();\n try {\n const pojo = YAML.load(source, {\n schema: JSON_SCHEMA\n });\n if (this.allowEmpty && typeof pojo === 'undefined') {\n return parseResultElement;\n }\n const element = from(pojo);\n element.classes.push('result');\n parseResultElement.push(element);\n return parseResultElement;\n } catch (error) {\n throw new ParserError(`Error parsing \"${file.uri}\"`, {\n cause: error\n });\n }\n }\n}\nexport default YAMLParser;","/* eslint-disable camelcase */\nimport { ParseResultElement } from '@swagger-api/apidom-core';\nimport { ParserError, Parser } from '@swagger-api/apidom-reference/configuration/empty';\nimport { mediaTypes, OpenApi3_1Element, OpenAPIMediaTypes } from '@swagger-api/apidom-ns-openapi-3-1';\nclass OpenAPIJSON3_1Parser extends Parser {\n detectionRegExp = /\"openapi\"\\s*:\\s*\"(?3\\.1\\.(?:[1-9]\\d*|0))\"/;\n constructor(options = {}) {\n super({\n name: 'openapi-json-3-1-swagger-client',\n mediaTypes: new OpenAPIMediaTypes(...mediaTypes.filterByFormat('generic'), ...mediaTypes.filterByFormat('json')),\n ...options\n });\n }\n async canParse(file) {\n const hasSupportedFileExtension = this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);\n const hasSupportedMediaType = this.mediaTypes.includes(file.mediaType);\n if (!hasSupportedFileExtension) return false;\n if (hasSupportedMediaType) return true;\n if (!hasSupportedMediaType) {\n try {\n const source = file.toString();\n JSON.parse(source);\n return this.detectionRegExp.test(source);\n } catch (error) {\n return false;\n }\n }\n return false;\n }\n async parse(file) {\n if (this.sourceMap) {\n throw new ParserError(\"openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option\");\n }\n const parseResultElement = new ParseResultElement();\n const source = file.toString();\n\n // allow empty files\n if (this.allowEmpty && source.trim() === '') {\n return parseResultElement;\n }\n try {\n const pojo = JSON.parse(source);\n const element = OpenApi3_1Element.refract(pojo, this.refractorOpts);\n element.classes.push('result');\n parseResultElement.push(element);\n return parseResultElement;\n } catch (error) {\n throw new ParserError(`Error parsing \"${file.uri}\"`, {\n cause: error\n });\n }\n }\n}\nexport default OpenAPIJSON3_1Parser;\n/* eslint-enable camelcase */","/* eslint-disable camelcase */\nimport YAML, { JSON_SCHEMA } from 'js-yaml';\nimport { ParseResultElement } from '@swagger-api/apidom-core';\nimport { ParserError, Parser } from '@swagger-api/apidom-reference/configuration/empty';\nimport { mediaTypes, OpenApi3_1Element, OpenAPIMediaTypes } from '@swagger-api/apidom-ns-openapi-3-1';\nclass OpenAPIYAML31Parser extends Parser {\n detectionRegExp = /(?^([\"']?)openapi\\2\\s*:\\s*([\"']?)(?3\\.1\\.(?:[1-9]\\d*|0))\\3(?:\\s+|$))|(?\"openapi\"\\s*:\\s*\"(?3\\.1\\.(?:[1-9]\\d*|0))\")/m;\n constructor(options = {}) {\n super({\n name: 'openapi-yaml-3-1-swagger-client',\n mediaTypes: new OpenAPIMediaTypes(...mediaTypes.filterByFormat('generic'), ...mediaTypes.filterByFormat('yaml')),\n ...options\n });\n }\n async canParse(file) {\n const hasSupportedFileExtension = this.fileExtensions.length === 0 ? true : this.fileExtensions.includes(file.extension);\n const hasSupportedMediaType = this.mediaTypes.includes(file.mediaType);\n if (!hasSupportedFileExtension) return false;\n if (hasSupportedMediaType) return true;\n if (!hasSupportedMediaType) {\n try {\n const source = file.toString();\n YAML.load(source);\n return this.detectionRegExp.test(source);\n } catch (error) {\n return false;\n }\n }\n return false;\n }\n async parse(file) {\n if (this.sourceMap) {\n throw new ParserError(\"openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option\");\n }\n const parseResultElement = new ParseResultElement();\n const source = file.toString();\n try {\n const pojo = YAML.load(source, {\n schema: JSON_SCHEMA\n });\n if (this.allowEmpty && typeof pojo === 'undefined') {\n return parseResultElement;\n }\n const element = OpenApi3_1Element.refract(pojo, this.refractorOpts);\n element.classes.push('result');\n parseResultElement.push(element);\n return parseResultElement;\n } catch (error) {\n throw new ParserError(`Error parsing \"${file.uri}\"`, {\n cause: error\n });\n }\n }\n}\nexport default OpenAPIYAML31Parser;\n/* eslint-enable camelcase */","import { trimCharsStart, isUndefined } from 'ramda-adjunct';\nimport { find, toValue } from '@swagger-api/apidom-core';\nimport { isSchemaElement } from '@swagger-api/apidom-ns-openapi-3-1';\nimport { getHash } from \"../../../../util/url.mjs\";\nimport EvaluationJsonSchema$anchorError from \"../../../../errors/EvaluationJsonSchema$anchorError.mjs\";\nimport InvalidJsonSchema$anchorError from \"../../../../errors/InvalidJsonSchema$anchorError.mjs\";\n/**\n * @public\n */\nexport const isAnchor = uri => {\n /**\n * MUST start with a letter ([A-Za-z]) or underscore (\"_\"), followed by any number of letters,\n * digits ([0-9]), hyphens (\"-\"), underscores (\"_\"), and periods (\".\").\n *\n * https://json-schema.org/draft/2020-12/json-schema-core.html#rfc.section.8.2.2\n */\n return /^[A-Za-z_][A-Za-z_0-9.-]*$/.test(uri);\n};\n\n/**\n * @public\n */\nexport const uriToAnchor = uri => {\n const hash = getHash(uri);\n return trimCharsStart('#', hash);\n};\n\n/**\n * @public\n */\nexport const parse = anchor => {\n if (!isAnchor(anchor)) {\n throw new InvalidJsonSchema$anchorError(anchor);\n }\n return anchor;\n};\n\n/**\n * Evaluates JSON Schema $anchor against ApiDOM fragment.\n * @public\n */\nexport const evaluate = (anchor, element) => {\n const token = parse(anchor);\n\n // @ts-ignore\n const result = find(e => isSchemaElement(e) && toValue(e.$anchor) === token, element);\n if (isUndefined(result)) {\n throw new EvaluationJsonSchema$anchorError(`Evaluation failed on token: \"${token}\"`);\n }\n\n // @ts-ignore\n return result;\n};\nexport { EvaluationJsonSchema$anchorError, InvalidJsonSchema$anchorError };\nexport { default as JsonSchema$anchorError } from \"../../../../errors/JsonSchema$anchorError.mjs\";","import { reduce } from 'ramda';\nimport { isPrimitiveElement, toValue } from '@swagger-api/apidom-core';\nimport { SchemaElement } from '@swagger-api/apidom-ns-openapi-3-1';\nimport * as url from \"../../../util/url.mjs\";\n/**\n * @public\n */\nexport const resolveSchema$refField = (retrievalURI, schemaElement) => {\n if (typeof schemaElement.$ref === 'undefined') {\n return undefined;\n }\n const hash = url.getHash(toValue(schemaElement.$ref));\n const ancestorsSchemaIdentifiers = toValue(schemaElement.meta.get('ancestorsSchemaIdentifiers'));\n const $refBaseURI = reduce((acc, uri) => {\n return url.resolve(acc, url.sanitize(url.stripHash(uri)));\n }, retrievalURI, [...ancestorsSchemaIdentifiers, toValue(schemaElement.$ref)]);\n return `${$refBaseURI}${hash === '#' ? '' : hash}`;\n};\n\n/**\n * @public\n */\nexport const resolveSchema$idField = (retrievalURI, schemaElement) => {\n if (typeof schemaElement.$id === 'undefined') {\n return undefined;\n }\n const ancestorsSchemaIdentifiers = toValue(schemaElement.meta.get('ancestorsSchemaIdentifiers'));\n return reduce((acc, $id) => {\n return url.resolve(acc, url.sanitize(url.stripHash($id)));\n }, retrievalURI, [...ancestorsSchemaIdentifiers, toValue(schemaElement.$id)]);\n};\n\n/**\n * Cached version of SchemaElement.refract.\n */\nexport const refractToSchemaElement = element => {\n if (refractToSchemaElement.cache.has(element)) {\n return refractToSchemaElement.cache.get(element);\n }\n const refracted = SchemaElement.refract(element);\n refractToSchemaElement.cache.set(element, refracted);\n return refracted;\n};\nrefractToSchemaElement.cache = new WeakMap();\n\n/**\n * @public\n */\nexport const maybeRefractToSchemaElement = element => {\n /**\n * Conditional version of refractToSchemaElement, that acts as an identity\n * function for all non-primitive Element instances.\n */\n if (isPrimitiveElement(element)) {\n return refractToSchemaElement(element);\n }\n return element;\n};","import { isUndefined } from 'ramda-adjunct';\nimport { filter } from '@swagger-api/apidom-core';\nimport { isSchemaElement } from '@swagger-api/apidom-ns-openapi-3-1';\nimport { uriToPointer, evaluate as jsonPointerEvaluate } from '@swagger-api/apidom-json-pointer';\nimport * as url from \"../../../../util/url.mjs\";\nimport EvaluationJsonSchemaUriError from \"../../../../errors/EvaluationJsonSchemaUriError.mjs\";\nimport { isAnchor, uriToAnchor, evaluate as $anchorEvaluate } from \"./$anchor.mjs\";\nimport { resolveSchema$idField } from \"../util.mjs\";\n/**\n * Evaluates JSON Schema $ref containing unknown URI against ApiDOM fragment.\n * @public\n */\nexport const evaluate = (uri, element) => {\n const {\n cache\n } = evaluate;\n const uriStrippedHash = url.stripHash(uri);\n const isSchemaElementWith$id = e => isSchemaElement(e) && typeof e.$id !== 'undefined';\n\n // warm the cache\n if (!cache.has(element)) {\n const schemaObjectElements = filter(isSchemaElementWith$id, element);\n cache.set(element, Array.from(schemaObjectElements));\n }\n\n // search for the matching schema\n const result = cache.get(element).find(e => {\n const $idBaseURI = resolveSchema$idField(uriStrippedHash, e);\n return $idBaseURI === uriStrippedHash;\n });\n if (isUndefined(result)) {\n throw new EvaluationJsonSchemaUriError(`Evaluation failed on URI: \"${uri}\"`);\n }\n let fragmentEvaluate;\n let selector;\n if (isAnchor(uriToAnchor(uri))) {\n // we're dealing with JSON Schema $anchor here\n fragmentEvaluate = $anchorEvaluate;\n selector = uriToAnchor(uri);\n } else {\n // we're assuming here that we're dealing with JSON Pointer here\n fragmentEvaluate = jsonPointerEvaluate;\n selector = uriToPointer(uri);\n }\n\n // @ts-ignore\n return fragmentEvaluate(selector, result);\n};\nevaluate.cache = new WeakMap();\nexport { EvaluationJsonSchemaUriError };\nexport { default as JsonSchemaUriError } from \"../../../../errors/JsonSchemaUriError.mjs\";","import { propEq, none } from 'ramda';\nimport { isUndefined } from 'ramda-adjunct';\nimport { isElement, isPrimitiveElement, isStringElement, isMemberElement, isObjectElement, IdentityManager, visit, find, cloneShallow, cloneDeep, toValue, RefElement } from '@swagger-api/apidom-core';\nimport { ApiDOMError } from '@swagger-api/apidom-error';\nimport { evaluate as jsonPointerEvaluate, uriToPointer } from '@swagger-api/apidom-json-pointer';\nimport { getNodeType, isReferenceLikeElement, keyMap, ReferenceElement, PathItemElement, OperationElement, SchemaElement, isPathItemElement, isReferenceElement, isSchemaElement, isOperationElement, isBooleanJsonSchemaElement } from '@swagger-api/apidom-ns-openapi-3-1';\nimport { isAnchor, uriToAnchor, evaluate as $anchorEvaluate } from \"./selectors/$anchor.mjs\";\nimport { evaluate as uriEvaluate } from \"./selectors/uri.mjs\";\nimport MaximumDereferenceDepthError from \"../../../errors/MaximumDereferenceDepthError.mjs\";\nimport MaximumResolveDepthError from \"../../../errors/MaximumResolveDepthError.mjs\";\nimport * as url from \"../../../util/url.mjs\";\nimport parse from \"../../../parse/index.mjs\";\nimport Reference from \"../../../Reference.mjs\";\nimport File from \"../../../File.mjs\";\nimport { resolveSchema$refField, maybeRefractToSchemaElement } from \"./util.mjs\";\nimport { AncestorLineage } from \"../../util.mjs\";\nimport EvaluationJsonSchemaUriError from \"../../../errors/EvaluationJsonSchemaUriError.mjs\";\n// @ts-ignore\nconst visitAsync = visit[Symbol.for('nodejs.util.promisify.custom')];\n\n// initialize element identity manager\nconst identityManager = new IdentityManager();\n\n/**\n * Custom mutation replacer.\n * @public\n */\nexport const mutationReplacer = (newElement, oldElement, key, parent) => {\n if (isMemberElement(parent)) {\n parent.value = newElement; // eslint-disable-line no-param-reassign\n } else if (Array.isArray(parent)) {\n parent[key] = newElement; // eslint-disable-line no-param-reassign\n }\n};\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass OpenAPI3_1DereferenceVisitor {\n indirections;\n namespace;\n reference;\n options;\n ancestors;\n refractCache;\n constructor({\n reference,\n namespace,\n options,\n indirections = [],\n ancestors = new AncestorLineage(),\n refractCache = new Map()\n }) {\n this.indirections = indirections;\n this.namespace = namespace;\n this.reference = reference;\n this.options = options;\n this.ancestors = new AncestorLineage(...ancestors);\n this.refractCache = refractCache;\n }\n toBaseURI(uri) {\n return url.resolve(this.reference.uri, url.sanitize(url.stripHash(uri)));\n }\n async toReference(uri) {\n // detect maximum depth of resolution\n if (this.reference.depth >= this.options.resolve.maxDepth) {\n throw new MaximumResolveDepthError(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file \"${this.reference.uri}\"`);\n }\n const baseURI = this.toBaseURI(uri);\n const {\n refSet\n } = this.reference;\n\n // we've already processed this Reference in past\n if (refSet.has(baseURI)) {\n return refSet.find(propEq(baseURI, 'uri'));\n }\n const parseResult = await parse(url.unsanitize(baseURI), {\n ...this.options,\n parse: {\n ...this.options.parse,\n mediaType: 'text/plain'\n }\n });\n\n // register new mutable reference with a refSet\n const mutableReference = new Reference({\n uri: baseURI,\n value: cloneDeep(parseResult),\n depth: this.reference.depth + 1\n });\n refSet.add(mutableReference);\n if (this.options.dereference.immutable) {\n // register new immutable reference with a refSet\n const immutableReference = new Reference({\n uri: `immutable://${baseURI}`,\n value: parseResult,\n depth: this.reference.depth + 1\n });\n refSet.add(immutableReference);\n }\n return mutableReference;\n }\n toAncestorLineage(ancestors) {\n /**\n * Compute full ancestors lineage.\n * Ancestors are flatten to unwrap all Element instances.\n */\n const directAncestors = new Set(ancestors.filter(isElement));\n const ancestorsLineage = new AncestorLineage(...this.ancestors, directAncestors);\n return [ancestorsLineage, directAncestors];\n }\n async ReferenceElement(referencingElement, key, parent, path, ancestors, link) {\n // skip current referencing element as it's already been access\n if (this.indirections.includes(referencingElement)) {\n return false;\n }\n const [ancestorsLineage, directAncestors] = this.toAncestorLineage([...ancestors, parent]);\n const retrievalURI = this.toBaseURI(toValue(referencingElement.$ref));\n const isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n const isExternalReference = !isInternalReference;\n\n // ignore resolving internal Reference Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this reference element and all it's child elements\n return false;\n }\n // ignore resolving external Reference Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this reference element and all it's child elements\n return false;\n }\n const reference = await this.toReference(toValue(referencingElement.$ref));\n const $refBaseURI = url.resolve(retrievalURI, toValue(referencingElement.$ref));\n this.indirections.push(referencingElement);\n const jsonPointer = uriToPointer($refBaseURI);\n\n // possibly non-semantic fragment\n let referencedElement = jsonPointerEvaluate(jsonPointer, reference.value.result);\n referencedElement.id = identityManager.identify(referencedElement);\n\n // applying semantics to a fragment\n if (isPrimitiveElement(referencedElement)) {\n const referencedElementType = toValue(referencingElement.meta.get('referenced-element'));\n const cacheKey = `${referencedElementType}-${toValue(identityManager.identify(referencedElement))}`;\n if (this.refractCache.has(cacheKey)) {\n referencedElement = this.refractCache.get(cacheKey);\n } else if (isReferenceLikeElement(referencedElement)) {\n // handling indirect references\n referencedElement = ReferenceElement.refract(referencedElement);\n referencedElement.setMetaProperty('referenced-element', referencedElementType);\n this.refractCache.set(cacheKey, referencedElement);\n } else {\n // handling direct references\n const ElementClass = this.namespace.getElementClass(referencedElementType);\n referencedElement = ElementClass.refract(referencedElement);\n this.refractCache.set(cacheKey, referencedElement);\n }\n }\n\n // detect direct or indirect reference\n if (referencingElement === referencedElement) {\n throw new ApiDOMError('Recursive Reference Object detected');\n }\n\n // detect maximum depth of dereferencing\n if (this.indirections.length > this.options.dereference.maxDepth) {\n throw new MaximumDereferenceDepthError(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);\n }\n\n // detect second deep dive into the same fragment and avoid it\n if (ancestorsLineage.includes(referencedElement)) {\n reference.refSet.circular = true;\n if (this.options.dereference.circular === 'error') {\n throw new ApiDOMError('Circular reference detected');\n } else if (this.options.dereference.circular === 'replace') {\n var _this$options$derefer, _this$options$derefer2;\n const refElement = new RefElement(referencedElement.id, {\n type: 'reference',\n uri: reference.uri,\n $ref: toValue(referencingElement.$ref)\n });\n const replacer = (_this$options$derefer = (_this$options$derefer2 = this.options.dereference.strategyOpts['openapi-3-1']) === null || _this$options$derefer2 === void 0 ? void 0 : _this$options$derefer2.circularReplacer) !== null && _this$options$derefer !== void 0 ? _this$options$derefer : this.options.dereference.circularReplacer;\n const replacement = replacer(refElement);\n link.replaceWith(replacement, mutationReplacer);\n return !parent ? replacement : false;\n }\n }\n\n /**\n * Dive deep into the fragment.\n *\n * Cases to consider:\n * 1. We're crossing document boundary\n * 2. Fragment is from non-root document\n * 3. Fragment is a Reference Object. We need to follow it to get the eventual value\n * 4. We are dereferencing the fragment lazily/eagerly depending on circular mode\n */\n const isNonRootDocument = url.stripHash(reference.refSet.rootRef.uri) !== reference.uri;\n const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);\n if ((isExternalReference || isNonRootDocument || isReferenceElement(referencedElement) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {\n // append referencing reference to ancestors lineage\n directAncestors.add(referencingElement);\n const visitor = new OpenAPI3_1DereferenceVisitor({\n reference,\n namespace: this.namespace,\n indirections: [...this.indirections],\n options: this.options,\n refractCache: this.refractCache,\n ancestors: ancestorsLineage\n });\n referencedElement = await visitAsync(referencedElement, visitor, {\n keyMap,\n nodeTypeGetter: getNodeType\n });\n\n // remove referencing reference from ancestors lineage\n directAncestors.delete(referencingElement);\n }\n this.indirections.pop();\n\n /**\n * Creating a new version of referenced element to avoid modifying the original one.\n */\n const mergedElement = cloneShallow(referencedElement);\n // assign unique id to merged element\n mergedElement.setMetaProperty('id', identityManager.generateId());\n // annotate fragment with info about original Reference element\n mergedElement.setMetaProperty('ref-fields', {\n $ref: toValue(referencingElement.$ref),\n // @ts-ignore\n description: toValue(referencingElement.description),\n // @ts-ignore\n summary: toValue(referencingElement.summary)\n });\n // annotate fragment with info about origin\n mergedElement.setMetaProperty('ref-origin', reference.uri);\n // annotate fragment with info about referencing element\n mergedElement.setMetaProperty('ref-referencing-element-id', cloneDeep(identityManager.identify(referencingElement)));\n\n // override description and summary (outer has higher priority then inner)\n if (isObjectElement(referencedElement) && isObjectElement(mergedElement)) {\n if (referencingElement.hasKey('description') && 'description' in referencedElement) {\n mergedElement.remove('description');\n mergedElement.set('description', referencingElement.get('description'));\n }\n if (referencingElement.hasKey('summary') && 'summary' in referencedElement) {\n mergedElement.remove('summary');\n mergedElement.set('summary', referencingElement.get('summary'));\n }\n }\n\n /**\n * Transclude referencing element with merged referenced element.\n */\n link.replaceWith(mergedElement, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? mergedElement : false;\n }\n async PathItemElement(referencingElement, key, parent, path, ancestors, link) {\n // ignore PathItemElement without $ref field\n if (!isStringElement(referencingElement.$ref)) {\n return undefined;\n }\n\n // skip current referencing element as it's already been access\n if (this.indirections.includes(referencingElement)) {\n return false;\n }\n const [ancestorsLineage, directAncestors] = this.toAncestorLineage([...ancestors, parent]);\n const retrievalURI = this.toBaseURI(toValue(referencingElement.$ref));\n const isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n const isExternalReference = !isInternalReference;\n\n // ignore resolving external Path Item Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this Path Item element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Path Item Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this Path Item element but traverse all it's child elements\n return undefined;\n }\n const reference = await this.toReference(toValue(referencingElement.$ref));\n const $refBaseURI = url.resolve(retrievalURI, toValue(referencingElement.$ref));\n this.indirections.push(referencingElement);\n const jsonPointer = uriToPointer($refBaseURI);\n\n // possibly non-semantic referenced element\n let referencedElement = jsonPointerEvaluate(jsonPointer, reference.value.result);\n referencedElement.id = identityManager.identify(referencedElement);\n\n /**\n * Applying semantics to a referenced element if semantics are missing.\n */\n if (isPrimitiveElement(referencedElement)) {\n const cacheKey = `path-item-${toValue(identityManager.identify(referencedElement))}`;\n if (this.refractCache.has(cacheKey)) {\n referencedElement = this.refractCache.get(cacheKey);\n } else {\n referencedElement = PathItemElement.refract(referencedElement);\n this.refractCache.set(cacheKey, referencedElement);\n }\n }\n\n // detect direct or indirect reference\n if (referencingElement === referencedElement) {\n throw new ApiDOMError('Recursive Path Item Object reference detected');\n }\n\n // detect maximum depth of dereferencing\n if (this.indirections.length > this.options.dereference.maxDepth) {\n throw new MaximumDereferenceDepthError(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);\n }\n\n // detect second deep dive into the same fragment and avoid it\n if (ancestorsLineage.includes(referencedElement)) {\n reference.refSet.circular = true;\n if (this.options.dereference.circular === 'error') {\n throw new ApiDOMError('Circular reference detected');\n } else if (this.options.dereference.circular === 'replace') {\n var _this$options$derefer3, _this$options$derefer4;\n const refElement = new RefElement(referencedElement.id, {\n type: 'path-item',\n uri: reference.uri,\n $ref: toValue(referencingElement.$ref)\n });\n const replacer = (_this$options$derefer3 = (_this$options$derefer4 = this.options.dereference.strategyOpts['openapi-3-1']) === null || _this$options$derefer4 === void 0 ? void 0 : _this$options$derefer4.circularReplacer) !== null && _this$options$derefer3 !== void 0 ? _this$options$derefer3 : this.options.dereference.circularReplacer;\n const replacement = replacer(refElement);\n link.replaceWith(replacement, mutationReplacer);\n return !parent ? replacement : false;\n }\n }\n\n /**\n * Dive deep into the fragment.\n *\n * Cases to consider:\n * 1. We're crossing document boundary\n * 2. Fragment is from non-root document\n * 3. Fragment is a Path Item Object with $ref field. We need to follow it to get the eventual value\n * 4. We are dereferencing the fragment lazily/eagerly depending on circular mode\n */\n const isNonRootDocument = url.stripHash(reference.refSet.rootRef.uri) !== reference.uri;\n const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);\n if ((isExternalReference || isNonRootDocument || isPathItemElement(referencedElement) && isStringElement(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {\n // append referencing reference to ancestors lineage\n directAncestors.add(referencingElement);\n const visitor = new OpenAPI3_1DereferenceVisitor({\n reference,\n namespace: this.namespace,\n indirections: [...this.indirections],\n options: this.options,\n refractCache: this.refractCache,\n ancestors: ancestorsLineage\n });\n referencedElement = await visitAsync(referencedElement, visitor, {\n keyMap,\n nodeTypeGetter: getNodeType\n });\n\n // remove referencing reference from ancestors lineage\n directAncestors.delete(referencingElement);\n }\n this.indirections.pop();\n\n /**\n * Creating a new version of Path Item by merging fields from referenced Path Item with referencing one.\n */\n if (isPathItemElement(referencedElement)) {\n const mergedElement = new PathItemElement([...referencedElement.content], cloneDeep(referencedElement.meta), cloneDeep(referencedElement.attributes));\n // assign unique id to merged element\n mergedElement.setMetaProperty('id', identityManager.generateId());\n // existing keywords from referencing PathItemElement overrides ones from referenced element\n referencingElement.forEach((value, keyElement, item) => {\n mergedElement.remove(toValue(keyElement));\n mergedElement.content.push(item);\n });\n mergedElement.remove('$ref');\n\n // annotate referenced element with info about original referencing element\n mergedElement.setMetaProperty('ref-fields', {\n $ref: toValue(referencingElement.$ref)\n });\n // annotate referenced element with info about origin\n mergedElement.setMetaProperty('ref-origin', reference.uri);\n // annotate fragment with info about referencing element\n mergedElement.setMetaProperty('ref-referencing-element-id', cloneDeep(identityManager.identify(referencingElement)));\n referencedElement = mergedElement;\n }\n\n /**\n * Transclude referencing element with merged referenced element.\n */\n link.replaceWith(referencedElement, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? referencedElement : undefined;\n }\n async LinkElement(linkElement, key, parent, path, ancestors, link) {\n // ignore LinkElement without operationRef or operationId field\n if (!isStringElement(linkElement.operationRef) && !isStringElement(linkElement.operationId)) {\n return undefined;\n }\n\n // operationRef and operationId fields are mutually exclusive\n if (isStringElement(linkElement.operationRef) && isStringElement(linkElement.operationId)) {\n throw new ApiDOMError('LinkElement operationRef and operationId fields are mutually exclusive.');\n }\n let operationElement;\n if (isStringElement(linkElement.operationRef)) {\n var _linkElementCopy$oper;\n // possibly non-semantic referenced element\n const jsonPointer = uriToPointer(toValue(linkElement.operationRef));\n const retrievalURI = this.toBaseURI(toValue(linkElement.operationRef));\n const isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n const isExternalReference = !isInternalReference;\n\n // ignore resolving internal Operation Object reference\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this Link element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Operation Object reference\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this Link element but traverse all it's child elements\n return undefined;\n }\n const reference = await this.toReference(toValue(linkElement.operationRef));\n operationElement = jsonPointerEvaluate(jsonPointer, reference.value.result);\n // applying semantics to a referenced element\n if (isPrimitiveElement(operationElement)) {\n const cacheKey = `operation-${toValue(identityManager.identify(operationElement))}`;\n if (this.refractCache.has(cacheKey)) {\n operationElement = this.refractCache.get(cacheKey);\n } else {\n operationElement = OperationElement.refract(operationElement);\n this.refractCache.set(cacheKey, operationElement);\n }\n }\n // create shallow clone to be able to annotate with metadata\n operationElement = cloneShallow(operationElement);\n // annotate operation element with info about origin\n operationElement.setMetaProperty('ref-origin', reference.uri);\n const linkElementCopy = cloneShallow(linkElement);\n (_linkElementCopy$oper = linkElementCopy.operationRef) === null || _linkElementCopy$oper === void 0 || _linkElementCopy$oper.meta.set('operation', operationElement);\n\n /**\n * Transclude Link Object containing Operation Object in its meta.\n */\n link.replaceWith(linkElementCopy, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? linkElementCopy : undefined;\n }\n if (isStringElement(linkElement.operationId)) {\n var _linkElementCopy$oper2;\n const operationId = toValue(linkElement.operationId);\n const reference = await this.toReference(url.unsanitize(this.reference.uri));\n operationElement = find(e => isOperationElement(e) && isElement(e.operationId) && e.operationId.equals(operationId), reference.value.result);\n // OperationElement not found by its operationId\n if (isUndefined(operationElement)) {\n throw new ApiDOMError(`OperationElement(operationId=${operationId}) not found.`);\n }\n const linkElementCopy = cloneShallow(linkElement);\n (_linkElementCopy$oper2 = linkElementCopy.operationId) === null || _linkElementCopy$oper2 === void 0 || _linkElementCopy$oper2.meta.set('operation', operationElement);\n\n /**\n * Transclude Link Object containing Operation Object in its meta.\n */\n link.replaceWith(linkElementCopy, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? linkElementCopy : undefined;\n }\n return undefined;\n }\n async ExampleElement(exampleElement, key, parent, path, ancestors, link) {\n // ignore ExampleElement without externalValue field\n if (!isStringElement(exampleElement.externalValue)) {\n return undefined;\n }\n\n // value and externalValue fields are mutually exclusive\n if (exampleElement.hasKey('value') && isStringElement(exampleElement.externalValue)) {\n throw new ApiDOMError('ExampleElement value and externalValue fields are mutually exclusive.');\n }\n const retrievalURI = this.toBaseURI(toValue(exampleElement.externalValue));\n const isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n const isExternalReference = !isInternalReference;\n\n // ignore resolving internal Example Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this Example element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Example Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this Example element but traverse all it's child elements\n return undefined;\n }\n const reference = await this.toReference(toValue(exampleElement.externalValue));\n\n // shallow clone of the referenced element\n const valueElement = cloneShallow(reference.value.result);\n // annotate operation element with info about origin\n valueElement.setMetaProperty('ref-origin', reference.uri);\n const exampleElementCopy = cloneShallow(exampleElement);\n exampleElementCopy.value = valueElement;\n\n /**\n * Transclude Example Object containing external value.\n */\n link.replaceWith(exampleElementCopy, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? exampleElementCopy : undefined;\n }\n async SchemaElement(referencingElement, key, parent, path, ancestors, link) {\n // skip current referencing schema as $ref keyword was not defined\n if (!isStringElement(referencingElement.$ref)) {\n return undefined;\n }\n\n // skip current referencing element as it's already been access\n if (this.indirections.includes(referencingElement)) {\n return false;\n }\n const [ancestorsLineage, directAncestors] = this.toAncestorLineage([...ancestors, parent]);\n\n // compute baseURI using rules around $id and $ref keywords\n let reference = await this.toReference(url.unsanitize(this.reference.uri));\n let {\n uri: retrievalURI\n } = reference;\n const $refBaseURI = resolveSchema$refField(retrievalURI, referencingElement);\n const $refBaseURIStrippedHash = url.stripHash($refBaseURI);\n const file = new File({\n uri: $refBaseURIStrippedHash\n });\n const isUnknownURI = none(r => r.canRead(file), this.options.resolve.resolvers);\n const isURL = !isUnknownURI;\n let isInternalReference = url.stripHash(this.reference.uri) === $refBaseURI;\n let isExternalReference = !isInternalReference;\n this.indirections.push(referencingElement);\n\n // determining reference, proper evaluation and selection mechanism\n let referencedElement;\n try {\n if (isUnknownURI || isURL) {\n // we're dealing with canonical URI or URL with possible fragment\n retrievalURI = this.toBaseURI($refBaseURI);\n const selector = $refBaseURI;\n const referenceAsSchema = maybeRefractToSchemaElement(reference.value.result);\n referencedElement = uriEvaluate(selector, referenceAsSchema);\n referencedElement = maybeRefractToSchemaElement(referencedElement);\n referencedElement.id = identityManager.identify(referencedElement);\n\n // ignore resolving internal Schema Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Schema Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n } else {\n // we're assuming here that we're dealing with JSON Pointer here\n retrievalURI = this.toBaseURI($refBaseURI);\n isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n isExternalReference = !isInternalReference;\n\n // ignore resolving internal Schema Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Schema Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n reference = await this.toReference(url.unsanitize($refBaseURI));\n const selector = uriToPointer($refBaseURI);\n const referenceAsSchema = maybeRefractToSchemaElement(reference.value.result);\n referencedElement = jsonPointerEvaluate(selector, referenceAsSchema);\n referencedElement = maybeRefractToSchemaElement(referencedElement);\n referencedElement.id = identityManager.identify(referencedElement);\n }\n } catch (error) {\n /**\n * No SchemaElement($id=URL) was not found, so we're going to try to resolve\n * the URL and assume the returned response is a JSON Schema.\n */\n if (isURL && error instanceof EvaluationJsonSchemaUriError) {\n if (isAnchor(uriToAnchor($refBaseURI))) {\n // we're dealing with JSON Schema $anchor here\n isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n isExternalReference = !isInternalReference;\n\n // ignore resolving internal Schema Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Schema Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n reference = await this.toReference(url.unsanitize($refBaseURI));\n const selector = uriToAnchor($refBaseURI);\n const referenceAsSchema = maybeRefractToSchemaElement(reference.value.result);\n referencedElement = $anchorEvaluate(selector, referenceAsSchema);\n referencedElement = maybeRefractToSchemaElement(referencedElement);\n referencedElement.id = identityManager.identify(referencedElement);\n } else {\n // we're assuming here that we're dealing with JSON Pointer here\n retrievalURI = this.toBaseURI($refBaseURI);\n isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n isExternalReference = !isInternalReference;\n\n // ignore resolving internal Schema Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Schema Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n reference = await this.toReference(url.unsanitize($refBaseURI));\n const selector = uriToPointer($refBaseURI);\n const referenceAsSchema = maybeRefractToSchemaElement(reference.value.result);\n referencedElement = jsonPointerEvaluate(selector, referenceAsSchema);\n referencedElement = maybeRefractToSchemaElement(referencedElement);\n referencedElement.id = identityManager.identify(referencedElement);\n }\n } else {\n throw error;\n }\n }\n\n // detect direct or indirect reference\n if (referencingElement === referencedElement) {\n throw new ApiDOMError('Recursive Schema Object reference detected');\n }\n\n // detect maximum depth of dereferencing\n if (this.indirections.length > this.options.dereference.maxDepth) {\n throw new MaximumDereferenceDepthError(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);\n }\n\n // detect second deep dive into the same fragment and avoid it\n if (ancestorsLineage.includes(referencedElement)) {\n reference.refSet.circular = true;\n if (this.options.dereference.circular === 'error') {\n throw new ApiDOMError('Circular reference detected');\n } else if (this.options.dereference.circular === 'replace') {\n var _this$options$derefer5, _this$options$derefer6;\n const refElement = new RefElement(referencedElement.id, {\n type: 'json-schema',\n uri: reference.uri,\n $ref: toValue(referencingElement.$ref)\n });\n const replacer = (_this$options$derefer5 = (_this$options$derefer6 = this.options.dereference.strategyOpts['openapi-3-1']) === null || _this$options$derefer6 === void 0 ? void 0 : _this$options$derefer6.circularReplacer) !== null && _this$options$derefer5 !== void 0 ? _this$options$derefer5 : this.options.dereference.circularReplacer;\n const replacement = replacer(refElement);\n link.replaceWith(replacement, mutationReplacer);\n return !parent ? replacement : false;\n }\n }\n\n /**\n * Dive deep into the fragment.\n *\n * Cases to consider:\n * 1. We're crossing document boundary\n * 2. Fragment is from non-root document\n * 3. Fragment is a Schema Object with $ref field. We need to follow it to get the eventual value\n * 4. We are dereferencing the fragment lazily/eagerly depending on circular mode\n */\n const isNonRootDocument = url.stripHash(reference.refSet.rootRef.uri) !== reference.uri;\n const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);\n if ((isExternalReference || isNonRootDocument || isSchemaElement(referencedElement) && isStringElement(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {\n // append referencing reference to ancestors lineage\n directAncestors.add(referencingElement);\n const visitor = new OpenAPI3_1DereferenceVisitor({\n reference,\n namespace: this.namespace,\n indirections: [...this.indirections],\n options: this.options,\n refractCache: this.refractCache,\n ancestors: ancestorsLineage\n });\n referencedElement = await visitAsync(referencedElement, visitor, {\n keyMap,\n nodeTypeGetter: getNodeType\n });\n\n // remove referencing reference from ancestors lineage\n directAncestors.delete(referencingElement);\n }\n this.indirections.pop();\n\n // Boolean JSON Schemas\n if (isBooleanJsonSchemaElement(referencedElement)) {\n const booleanJsonSchemaElement = cloneDeep(referencedElement);\n // assign unique id to merged element\n booleanJsonSchemaElement.setMetaProperty('id', identityManager.generateId());\n // annotate referenced element with info about original referencing element\n booleanJsonSchemaElement.setMetaProperty('ref-fields', {\n $ref: toValue(referencingElement.$ref)\n });\n // annotate referenced element with info about origin\n booleanJsonSchemaElement.setMetaProperty('ref-origin', reference.uri);\n // annotate fragment with info about referencing element\n booleanJsonSchemaElement.setMetaProperty('ref-referencing-element-id', cloneDeep(identityManager.identify(referencingElement)));\n link.replaceWith(booleanJsonSchemaElement, mutationReplacer);\n return !parent ? booleanJsonSchemaElement : false;\n }\n\n /**\n * Creating a new version of Schema Object by merging fields from referenced Schema Object with referencing one.\n */\n if (isSchemaElement(referencedElement)) {\n const mergedElement = new SchemaElement([...referencedElement.content], cloneDeep(referencedElement.meta), cloneDeep(referencedElement.attributes));\n // assign unique id to merged element\n mergedElement.setMetaProperty('id', identityManager.generateId());\n // existing keywords from referencing schema overrides ones from referenced schema\n referencingElement.forEach((value, keyElement, item) => {\n mergedElement.remove(toValue(keyElement));\n mergedElement.content.push(item);\n });\n mergedElement.remove('$ref');\n // annotate referenced element with info about original referencing element\n mergedElement.setMetaProperty('ref-fields', {\n $ref: toValue(referencingElement.$ref)\n });\n // annotate fragment with info about origin\n mergedElement.setMetaProperty('ref-origin', reference.uri);\n // annotate fragment with info about referencing element\n mergedElement.setMetaProperty('ref-referencing-element-id', cloneDeep(identityManager.identify(referencingElement)));\n referencedElement = mergedElement;\n }\n /**\n * Transclude referencing element with merged referenced element.\n */\n link.replaceWith(referencedElement, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? referencedElement : undefined;\n }\n}\nexport default OpenAPI3_1DereferenceVisitor;","import { propEq } from 'ramda';\nimport { createNamespace, visit, cloneDeep } from '@swagger-api/apidom-core';\nimport openApi3_1Namespace, { getNodeType, isOpenApi3_1Element, keyMap, mediaTypes } from '@swagger-api/apidom-ns-openapi-3-1';\nimport DereferenceStrategy from \"../DereferenceStrategy.mjs\";\nimport Reference from \"../../../Reference.mjs\";\nimport ReferenceSet from \"../../../ReferenceSet.mjs\";\nimport OpenAPI3_1DereferenceVisitor from \"./visitor.mjs\";\n// @ts-ignore\nconst visitAsync = visit[Symbol.for('nodejs.util.promisify.custom')];\n\n/**\n * @public\n */\n\n/**\n * @public\n */\nclass OpenAPI3_1DereferenceStrategy extends DereferenceStrategy {\n constructor(options) {\n super({\n ...(options !== null && options !== void 0 ? options : {}),\n name: 'openapi-3-1'\n });\n }\n canDereference(file) {\n var _file$parseResult;\n // assert by media type\n if (file.mediaType !== 'text/plain') {\n return mediaTypes.includes(file.mediaType);\n }\n\n // assert by inspecting ApiDOM\n return isOpenApi3_1Element((_file$parseResult = file.parseResult) === null || _file$parseResult === void 0 ? void 0 : _file$parseResult.result);\n }\n async dereference(file, options) {\n var _options$dereference$;\n const namespace = createNamespace(openApi3_1Namespace);\n const immutableRefSet = (_options$dereference$ = options.dereference.refSet) !== null && _options$dereference$ !== void 0 ? _options$dereference$ : new ReferenceSet();\n const mutableRefSet = new ReferenceSet();\n let refSet = immutableRefSet;\n let reference;\n if (!immutableRefSet.has(file.uri)) {\n reference = new Reference({\n uri: file.uri,\n value: file.parseResult\n });\n immutableRefSet.add(reference);\n } else {\n // pre-computed refSet was provided as configuration option\n reference = immutableRefSet.find(propEq(file.uri, 'uri'));\n }\n\n /**\n * Clone refSet due the dereferencing process being mutable.\n * We don't want to mutate the original refSet and the references.\n */\n if (options.dereference.immutable) {\n immutableRefSet.refs.map(ref => new Reference({\n ...ref,\n value: cloneDeep(ref.value)\n })).forEach(ref => mutableRefSet.add(ref));\n reference = mutableRefSet.find(ref => ref.uri === file.uri);\n refSet = mutableRefSet;\n }\n const visitor = new OpenAPI3_1DereferenceVisitor({\n reference: reference,\n namespace,\n options\n });\n const dereferencedElement = await visitAsync(refSet.rootRef.value, visitor, {\n keyMap,\n nodeTypeGetter: getNodeType\n });\n\n /**\n * If immutable option is set, replay refs from the refSet.\n */\n if (options.dereference.immutable) {\n mutableRefSet.refs.filter(ref => ref.uri.startsWith('immutable://')).map(ref => new Reference({\n ...ref,\n uri: ref.uri.replace(/^immutable:\\/\\//, '')\n })).forEach(ref => immutableRefSet.add(ref));\n }\n\n /**\n * Release all memory if this refSet was not provided as an configuration option.\n * If provided as configuration option, then provider is responsible for cleanup.\n */\n if (options.dereference.refSet === null) {\n immutableRefSet.clean();\n }\n mutableRefSet.clean();\n return dereferencedElement;\n }\n}\nexport { OpenAPI3_1DereferenceVisitor };\nexport { resolveSchema$refField, resolveSchema$idField, maybeRefractToSchemaElement } from \"./util.mjs\";\nexport default OpenAPI3_1DereferenceStrategy;","import { isMemberElement, isArrayElement, toValue } from '@swagger-api/apidom-core';\nconst trimParseResult = elementPath => elementPath.slice(2);\n\n/**\n * Transforms ApiDOM traversal meta information into\n * SwaggerClient compatible path.\n *\n * SwaggerClient path is a list of JSON Pointer tokens.\n */\nconst toPath = elementPath => {\n const elementPathSanitized = trimParseResult(elementPath);\n return elementPathSanitized.reduce((path, element, index) => {\n if (isMemberElement(element)) {\n const token = String(toValue(element.key));\n path.push(token);\n } else if (isArrayElement(elementPathSanitized[index - 2])) {\n const token = elementPathSanitized[index - 2].content.indexOf(element);\n path.push(token);\n }\n return path;\n }, []);\n};\nexport default toPath;","import { isObjectElement, toValue } from '@swagger-api/apidom-core';\nimport toPath from '../utils/to-path.js';\nclass ModelPropertyMacroVisitor {\n modelPropertyMacro;\n options;\n SchemaElement = {\n leave: (schemaElement, key, parent, path, ancestors) => {\n if (typeof schemaElement.properties === 'undefined') return;\n if (!isObjectElement(schemaElement.properties)) return;\n schemaElement.properties.forEach(property => {\n if (!isObjectElement(property)) return;\n try {\n const macroValue = this.modelPropertyMacro(toValue(property));\n property.set('default', macroValue);\n } catch (error) {\n var _this$options$derefer, _this$options$derefer2;\n const macroError = new Error(error, {\n cause: error\n });\n macroError.fullPath = [...toPath([...ancestors, parent, schemaElement]), 'properties'];\n (_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0 || (_this$options$derefer = _this$options$derefer.errors) === null || _this$options$derefer === void 0 || (_this$options$derefer2 = _this$options$derefer.push) === null || _this$options$derefer2 === void 0 || _this$options$derefer2.call(_this$options$derefer, macroError);\n }\n });\n }\n };\n constructor({\n modelPropertyMacro,\n options\n }) {\n this.modelPropertyMacro = modelPropertyMacro;\n this.options = options;\n }\n}\nexport default ModelPropertyMacroVisitor;","import { isArrayElement, deepmerge } from '@swagger-api/apidom-core';\nimport { isSchemaElement } from '@swagger-api/apidom-ns-openapi-3-1';\nimport toPath from '../utils/to-path.js';\nclass AllOfVisitor {\n options;\n SchemaElement = {\n leave(schemaElement, key, parent, path, ancestors) {\n // do nothing\n if (typeof schemaElement.allOf === 'undefined') return undefined;\n\n // collect error and return if allOf keyword is not an array\n if (!isArrayElement(schemaElement.allOf)) {\n var _this$options$derefer, _this$options$derefer2;\n const error = new TypeError('allOf must be an array');\n error.fullPath = [...toPath([...ancestors, parent, schemaElement]), 'allOf'];\n (_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0 || (_this$options$derefer = _this$options$derefer.errors) === null || _this$options$derefer === void 0 || (_this$options$derefer2 = _this$options$derefer.push) === null || _this$options$derefer2 === void 0 || _this$options$derefer2.call(_this$options$derefer, error);\n return undefined;\n }\n\n // remove allOf keyword if empty\n if (schemaElement.allOf.isEmpty) {\n schemaElement.remove('allOf');\n return undefined;\n }\n\n // collect errors if allOf keyword contains anything else than Schema Object\n const includesSchemaElementOnly = schemaElement.allOf.content.every(isSchemaElement);\n if (!includesSchemaElementOnly) {\n var _this$options$derefer3, _this$options$derefer4;\n const error = new TypeError('Elements in allOf must be objects');\n error.fullPath = [...toPath([...ancestors, parent, schemaElement]), 'allOf'];\n (_this$options$derefer3 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer3 === void 0 || (_this$options$derefer3 = _this$options$derefer3.errors) === null || _this$options$derefer3 === void 0 || (_this$options$derefer4 = _this$options$derefer3.push) === null || _this$options$derefer4 === void 0 || _this$options$derefer4.call(_this$options$derefer3, error);\n return undefined;\n }\n while (schemaElement.hasKey('allOf')) {\n const {\n allOf\n } = schemaElement;\n schemaElement.remove('allOf');\n const allOfMerged = deepmerge.all([...allOf.content, schemaElement]);\n\n /**\n * If there was not an original $$ref value, make sure to remove\n * any $$ref value that may exist from the result of `allOf` merges.\n */\n if (!schemaElement.hasKey('$$ref')) {\n allOfMerged.remove('$$ref');\n }\n\n /**\n * If there was an example keyword in the original schema,\n * keep it instead of merging with example from other schema.\n */\n if (schemaElement.hasKey('example')) {\n const member = allOfMerged.getMember('example');\n if (member) {\n member.value = schemaElement.get('example');\n }\n }\n\n /**\n * If there was an examples keyword in the original schema,\n * keep it instead of merging with examples from other schema.\n */\n if (schemaElement.hasKey('examples')) {\n const member = allOfMerged.getMember('examples');\n if (member) {\n member.value = schemaElement.get('examples');\n }\n }\n schemaElement.content = allOfMerged.content;\n }\n return undefined;\n }\n };\n constructor({\n options\n }) {\n this.options = options;\n }\n}\nexport default AllOfVisitor;","import { toValue } from '@swagger-api/apidom-core';\nimport toPath from '../utils/to-path.js';\nclass ParameterMacroVisitor {\n parameterMacro;\n options;\n #macroOperation;\n OperationElement = {\n enter: operationElement => {\n this.#macroOperation = operationElement;\n },\n leave: () => {\n this.#macroOperation = undefined;\n }\n };\n ParameterElement = {\n leave: (parameterElement, key, parent, path, ancestors) => {\n const pojoOperation = this.#macroOperation ? toValue(this.#macroOperation) : null;\n const pojoParameter = toValue(parameterElement);\n try {\n const macroValue = this.parameterMacro(pojoOperation, pojoParameter);\n parameterElement.set('default', macroValue);\n } catch (error) {\n var _this$options$derefer, _this$options$derefer2;\n const macroError = new Error(error, {\n cause: error\n });\n macroError.fullPath = toPath([...ancestors, parent]);\n (_this$options$derefer = this.options.dereference.dereferenceOpts) === null || _this$options$derefer === void 0 || (_this$options$derefer = _this$options$derefer.errors) === null || _this$options$derefer === void 0 || (_this$options$derefer2 = _this$options$derefer.push) === null || _this$options$derefer2 === void 0 || _this$options$derefer2.call(_this$options$derefer, macroError);\n }\n }\n };\n constructor({\n parameterMacro,\n options\n }) {\n this.parameterMacro = parameterMacro;\n this.options = options;\n }\n}\nexport default ParameterMacroVisitor;","/**\n * Retrieves the root cause of ApiDOM error hierarchy.\n * ApiDOM error hierarchies are modeled similar to Java.\n * Every error can have cause attribute which references\n * cause of this error.\n */\nconst getRootCause = error => {\n if (error.cause == null) return error;\n let {\n cause\n } = error;\n while (cause.cause != null) {\n cause = cause.cause;\n }\n return cause;\n};\nexport default getRootCause;","import { ApiDOMStructuredError } from '@swagger-api/apidom-error';\nclass SchemaRefError extends ApiDOMStructuredError {}\nexport default SchemaRefError;","/* eslint-disable camelcase */\nimport { RefElement, isObjectElement, isPrimitiveElement, isStringElement, isMemberElement, IdentityManager, visit, includesClasses, toValue, cloneShallow, cloneDeep } from '@swagger-api/apidom-core';\nimport { ApiDOMError } from '@swagger-api/apidom-error';\nimport { isReferenceLikeElement, isReferenceElement, isBooleanJsonSchemaElement, isPathItemElement, isSchemaElement, ReferenceElement, PathItemElement, SchemaElement, getNodeType, keyMap } from '@swagger-api/apidom-ns-openapi-3-1';\nimport { evaluate as jsonPointerEvaluate, uriToPointer } from '@swagger-api/apidom-json-pointer';\nimport { url, MaximumDereferenceDepthError, File } from '@swagger-api/apidom-reference/configuration/empty';\nimport { OpenAPI3_1DereferenceVisitor, resolveSchema$refField, maybeRefractToSchemaElement } from '@swagger-api/apidom-reference/dereference/strategies/openapi-3-1';\nimport { isAnchor, uriToAnchor, evaluate as $anchorEvaluate } from '@swagger-api/apidom-reference/dereference/strategies/openapi-3-1/selectors/$anchor';\nimport { evaluate as uriEvaluate, EvaluationJsonSchemaUriError } from '@swagger-api/apidom-reference/dereference/strategies/openapi-3-1/selectors/uri';\nimport toPath from '../utils/to-path.js';\nimport getRootCause from '../utils/get-root-cause.js';\nimport specMapMod from '../../../../../../specmap/lib/refs.js';\nimport SchemaRefError from '../errors/SchemaRefError.js';\nconst {\n wrapError\n} = specMapMod;\nconst visitAsync = visit[Symbol.for('nodejs.util.promisify.custom')];\n\n// initialize element identity manager\nconst identityManager = new IdentityManager();\n\n// custom mutation replacer\nconst mutationReplacer = (newElement, oldElement, key, parent) => {\n if (isMemberElement(parent)) {\n parent.value = newElement; // eslint-disable-line no-param-reassign\n } else if (Array.isArray(parent)) {\n parent[key] = newElement; // eslint-disable-line no-param-reassign\n }\n};\nclass OpenAPI3_1SwaggerClientDereferenceVisitor extends OpenAPI3_1DereferenceVisitor {\n useCircularStructures;\n allowMetaPatches;\n basePath;\n constructor({\n allowMetaPatches = true,\n useCircularStructures = false,\n basePath = null,\n ...rest\n }) {\n super(rest);\n this.allowMetaPatches = allowMetaPatches;\n this.useCircularStructures = useCircularStructures;\n this.basePath = basePath;\n }\n async ReferenceElement(referencingElement, key, parent, path, ancestors, link) {\n try {\n // skip current referencing element as it's already been access\n if (this.indirections.includes(referencingElement)) {\n return false;\n }\n const [ancestorsLineage, directAncestors] = this.toAncestorLineage([...ancestors, parent]);\n const retrievalURI = this.toBaseURI(toValue(referencingElement.$ref));\n const isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n const isExternalReference = !isInternalReference;\n\n // ignore resolving internal Reference Objects\n if (!this.options.resolve.internal && isInternalReference) {\n return false;\n }\n // ignore resolving external Reference Objects\n if (!this.options.resolve.external && isExternalReference) {\n return false;\n }\n const reference = await this.toReference(toValue(referencingElement.$ref));\n const $refBaseURI = url.resolve(retrievalURI, toValue(referencingElement.$ref));\n this.indirections.push(referencingElement);\n const jsonPointer = uriToPointer($refBaseURI);\n\n // possibly non-semantic fragment\n let referencedElement = jsonPointerEvaluate(jsonPointer, reference.value.result);\n referencedElement.id = identityManager.identify(referencedElement);\n\n // applying semantics to a fragment\n if (isPrimitiveElement(referencedElement)) {\n const referencedElementType = toValue(referencingElement.meta.get('referenced-element'));\n const cacheKey = `${referencedElementType}-${toValue(identityManager.identify(referencedElement))}`;\n if (this.refractCache.has(cacheKey)) {\n referencedElement = this.refractCache.get(cacheKey);\n } else if (isReferenceLikeElement(referencedElement)) {\n // handling indirect references\n referencedElement = ReferenceElement.refract(referencedElement);\n referencedElement.setMetaProperty('referenced-element', referencedElementType);\n this.refractCache.set(cacheKey, referencedElement);\n } else {\n // handling direct references\n const ElementClass = this.namespace.getElementClass(referencedElementType);\n referencedElement = ElementClass.refract(referencedElement);\n this.refractCache.set(cacheKey, referencedElement);\n }\n }\n\n // detect direct or indirect reference\n if (referencingElement === referencedElement) {\n throw new ApiDOMError('Recursive Reference Object detected');\n }\n\n // detect maximum depth of dereferencing\n if (this.indirections.length > this.options.dereference.maxDepth) {\n throw new MaximumDereferenceDepthError(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);\n }\n\n // detect second deep dive into the same fragment and avoid it\n if (ancestorsLineage.includes(referencedElement)) {\n reference.refSet.circular = true;\n if (this.options.dereference.circular === 'error') {\n throw new ApiDOMError('Circular reference detected');\n } else if (this.options.dereference.circular === 'replace') {\n var _this$options$derefer, _this$options$derefer2;\n const refElement = new RefElement(referencedElement.id, {\n type: 'reference',\n uri: reference.uri,\n $ref: toValue(referencingElement.$ref),\n baseURI: $refBaseURI,\n referencingElement\n });\n const replacer = (_this$options$derefer = (_this$options$derefer2 = this.options.dereference.strategyOpts['openapi-3-1']) === null || _this$options$derefer2 === void 0 ? void 0 : _this$options$derefer2.circularReplacer) !== null && _this$options$derefer !== void 0 ? _this$options$derefer : this.options.dereference.circularReplacer;\n const replacement = replacer(refElement);\n link.replaceWith(refElement, mutationReplacer);\n return !parent ? replacement : false;\n }\n }\n\n /**\n * Dive deep into the fragment.\n *\n * Cases to consider:\n * 1. We're crossing document boundary\n * 2. Fragment is from non-root document\n * 3. Fragment is a Reference Object. We need to follow it to get the eventual value\n * 4. We are dereferencing the fragment lazily/eagerly depending on circular mode\n */\n const isNonRootDocument = url.stripHash(reference.refSet.rootRef.uri) !== reference.uri;\n const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);\n if ((isExternalReference || isNonRootDocument || isReferenceElement(referencedElement) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {\n var _this$basePath;\n // append referencing reference to ancestors lineage\n directAncestors.add(referencingElement);\n const visitor = new OpenAPI3_1SwaggerClientDereferenceVisitor({\n reference,\n namespace: this.namespace,\n indirections: [...this.indirections],\n options: this.options,\n refractCache: this.refractCache,\n ancestors: ancestorsLineage,\n allowMetaPatches: this.allowMetaPatches,\n useCircularStructures: this.useCircularStructures,\n basePath: (_this$basePath = this.basePath) !== null && _this$basePath !== void 0 ? _this$basePath : [...toPath([...ancestors, parent, referencingElement]), '$ref']\n });\n referencedElement = await visitAsync(referencedElement, visitor, {\n keyMap,\n nodeTypeGetter: getNodeType\n });\n\n // remove referencing reference from ancestors lineage\n directAncestors.delete(referencingElement);\n }\n this.indirections.pop();\n const mergedElement = cloneShallow(referencedElement);\n\n // annotate fragment with info about original Reference element\n mergedElement.setMetaProperty('ref-fields', {\n $ref: toValue(referencingElement.$ref),\n description: toValue(referencingElement.description),\n summary: toValue(referencingElement.summary)\n });\n // annotate fragment with info about origin\n mergedElement.setMetaProperty('ref-origin', reference.uri);\n // annotate fragment with info about referencing element\n mergedElement.setMetaProperty('ref-referencing-element-id', cloneDeep(identityManager.identify(referencingElement)));\n\n // override description and summary (outer has higher priority then inner)\n if (isObjectElement(referencedElement)) {\n if (referencingElement.hasKey('description') && 'description' in referencedElement) {\n mergedElement.remove('description');\n mergedElement.set('description', referencingElement.get('description'));\n }\n if (referencingElement.hasKey('summary') && 'summary' in referencedElement) {\n mergedElement.remove('summary');\n mergedElement.set('summary', referencingElement.get('summary'));\n }\n }\n\n // apply meta patches\n if (this.allowMetaPatches && isObjectElement(mergedElement)) {\n // apply meta patch only when not already applied\n if (!mergedElement.hasKey('$$ref')) {\n const baseURI = url.resolve(retrievalURI, $refBaseURI);\n mergedElement.set('$$ref', baseURI);\n }\n }\n\n /**\n * Transclude referencing element with merged referenced element.\n */\n link.replaceWith(mergedElement, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? mergedElement : false;\n } catch (error) {\n var _this$basePath2, _this$options$derefer3, _this$options$derefer4;\n const rootCause = getRootCause(error);\n const wrappedError = wrapError(rootCause, {\n baseDoc: this.reference.uri,\n $ref: toValue(referencingElement.$ref),\n pointer: uriToPointer(toValue(referencingElement.$ref)),\n fullPath: (_this$basePath2 = this.basePath) !== null && _this$basePath2 !== void 0 ? _this$basePath2 : [...toPath([...ancestors, parent, referencingElement]), '$ref']\n });\n (_this$options$derefer3 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer3 === void 0 || (_this$options$derefer3 = _this$options$derefer3.errors) === null || _this$options$derefer3 === void 0 || (_this$options$derefer4 = _this$options$derefer3.push) === null || _this$options$derefer4 === void 0 || _this$options$derefer4.call(_this$options$derefer3, wrappedError);\n return undefined;\n }\n }\n async PathItemElement(pathItemElement, key, parent, path, ancestors, link) {\n try {\n // ignore PathItemElement without $ref field\n if (!isStringElement(pathItemElement.$ref)) {\n return undefined;\n }\n\n // skip current referencing element as it's already been access\n if (this.indirections.includes(pathItemElement)) {\n return false;\n }\n\n // skip already identified cycled Path Item Objects\n if (includesClasses(['cycle'], pathItemElement.$ref)) {\n return false;\n }\n const [ancestorsLineage, directAncestors] = this.toAncestorLineage([...ancestors, parent]);\n const retrievalURI = this.toBaseURI(toValue(pathItemElement.$ref));\n const isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n const isExternalReference = !isInternalReference;\n\n // ignore resolving internal Path Item Elements\n if (!this.options.resolve.internal && isInternalReference) {\n return undefined;\n }\n // ignore resolving external Path Item Elements\n if (!this.options.resolve.external && isExternalReference) {\n return undefined;\n }\n const reference = await this.toReference(toValue(pathItemElement.$ref));\n const $refBaseURI = url.resolve(retrievalURI, toValue(pathItemElement.$ref));\n this.indirections.push(pathItemElement);\n const jsonPointer = uriToPointer($refBaseURI);\n\n // possibly non-semantic referenced element\n let referencedElement = jsonPointerEvaluate(jsonPointer, reference.value.result);\n referencedElement.id = identityManager.identify(referencedElement);\n\n // applying semantics to a referenced element\n if (isPrimitiveElement(referencedElement)) {\n const cacheKey = `path-item-${toValue(identityManager.identify(referencedElement))}`;\n if (this.refractCache.has(cacheKey)) {\n referencedElement = this.refractCache.get(cacheKey);\n } else {\n referencedElement = PathItemElement.refract(referencedElement);\n this.refractCache.set(cacheKey, referencedElement);\n }\n }\n\n // detect direct or indirect reference\n if (pathItemElement === referencedElement) {\n throw new ApiDOMError('Recursive Path Item Object reference detected');\n }\n\n // detect maximum depth of dereferencing\n if (this.indirections.length > this.options.dereference.maxDepth) {\n throw new MaximumDereferenceDepthError(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);\n }\n\n // detect second deep dive into the same fragment and avoid it\n if (ancestorsLineage.includes(referencedElement)) {\n reference.refSet.circular = true;\n if (this.options.dereference.circular === 'error') {\n throw new ApiDOMError('Circular reference detected');\n } else if (this.options.dereference.circular === 'replace') {\n var _this$options$derefer5, _this$options$derefer6;\n const refElement = new RefElement(referencedElement.id, {\n type: 'path-item',\n uri: reference.uri,\n $ref: toValue(pathItemElement.$ref),\n baseURI: $refBaseURI,\n referencingElement: pathItemElement\n });\n const replacer = (_this$options$derefer5 = (_this$options$derefer6 = this.options.dereference.strategyOpts['openapi-3-1']) === null || _this$options$derefer6 === void 0 ? void 0 : _this$options$derefer6.circularReplacer) !== null && _this$options$derefer5 !== void 0 ? _this$options$derefer5 : this.options.dereference.circularReplacer;\n const replacement = replacer(refElement);\n link.replaceWith(refElement, mutationReplacer);\n return !parent ? replacement : false;\n }\n }\n\n /**\n * Dive deep into the fragment.\n *\n * Cases to consider:\n * 1. We're crossing document boundary\n * 2. Fragment is from non-root document\n * 3. Fragment is a Path Item Object with $ref field. We need to follow it to get the eventual value\n * 4. We are dereferencing the fragment lazily/eagerly depending on circular mode\n */\n const isNonRootDocument = url.stripHash(reference.refSet.rootRef.uri) !== reference.uri;\n const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);\n if ((isExternalReference || isNonRootDocument || isPathItemElement(referencedElement) && isStringElement(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {\n var _this$basePath3;\n // append referencing schema to ancestors lineage\n directAncestors.add(pathItemElement);\n\n // dive deep into the referenced element\n const visitor = new OpenAPI3_1SwaggerClientDereferenceVisitor({\n reference,\n namespace: this.namespace,\n indirections: [...this.indirections],\n options: this.options,\n ancestors: ancestorsLineage,\n allowMetaPatches: this.allowMetaPatches,\n useCircularStructures: this.useCircularStructures,\n basePath: (_this$basePath3 = this.basePath) !== null && _this$basePath3 !== void 0 ? _this$basePath3 : [...toPath([...ancestors, parent, pathItemElement]), '$ref']\n });\n referencedElement = await visitAsync(referencedElement, visitor, {\n keyMap,\n nodeTypeGetter: getNodeType\n });\n\n // remove referencing schema from ancestors lineage\n directAncestors.delete(pathItemElement);\n }\n this.indirections.pop();\n\n /**\n * Creating a new version of Path Item by merging fields from referenced Path Item with referencing one.\n */\n if (isPathItemElement(referencedElement)) {\n const mergedElement = new PathItemElement([...referencedElement.content], cloneDeep(referencedElement.meta), cloneDeep(referencedElement.attributes));\n // existing keywords from referencing PathItemElement overrides ones from referenced element\n pathItemElement.forEach((value, keyElement, item) => {\n mergedElement.remove(toValue(keyElement));\n mergedElement.content.push(item);\n });\n mergedElement.remove('$ref');\n\n // annotate referenced element with info about original referencing element\n mergedElement.setMetaProperty('ref-fields', {\n $ref: toValue(pathItemElement.$ref)\n });\n // annotate referenced element with info about origin\n mergedElement.setMetaProperty('ref-origin', reference.uri);\n // annotate fragment with info about referencing element\n mergedElement.setMetaProperty('ref-referencing-element-id', cloneDeep(identityManager.identify(pathItemElement)));\n\n // apply meta patches\n if (this.allowMetaPatches) {\n // apply meta patch only when not already applied\n if (typeof mergedElement.get('$$ref') === 'undefined') {\n const baseURI = url.resolve(retrievalURI, $refBaseURI);\n mergedElement.set('$$ref', baseURI);\n }\n }\n referencedElement = mergedElement;\n }\n\n /**\n * Transclude referencing element with merged referenced element.\n */\n link.replaceWith(referencedElement, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? referencedElement : undefined;\n } catch (error) {\n var _this$basePath4, _this$options$derefer7, _this$options$derefer8;\n const rootCause = getRootCause(error);\n const wrappedError = wrapError(rootCause, {\n baseDoc: this.reference.uri,\n $ref: toValue(pathItemElement.$ref),\n pointer: uriToPointer(toValue(pathItemElement.$ref)),\n fullPath: (_this$basePath4 = this.basePath) !== null && _this$basePath4 !== void 0 ? _this$basePath4 : [...toPath([...ancestors, parent, pathItemElement]), '$ref']\n });\n (_this$options$derefer7 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer7 === void 0 || (_this$options$derefer7 = _this$options$derefer7.errors) === null || _this$options$derefer7 === void 0 || (_this$options$derefer8 = _this$options$derefer7.push) === null || _this$options$derefer8 === void 0 || _this$options$derefer8.call(_this$options$derefer7, wrappedError);\n return undefined;\n }\n }\n async SchemaElement(referencingElement, key, parent, path, ancestors, link) {\n try {\n // skip current referencing schema as $ref keyword was not defined\n if (!isStringElement(referencingElement.$ref)) {\n // skip traversing this schema but traverse all it's child schemas\n return undefined;\n }\n\n // skip current referencing element as it's already been access\n if (this.indirections.includes(referencingElement)) {\n return false;\n }\n const [ancestorsLineage, directAncestors] = this.toAncestorLineage([...ancestors, parent]);\n\n // compute baseURI using rules around $id and $ref keywords\n let reference = await this.toReference(url.unsanitize(this.reference.uri));\n let {\n uri: retrievalURI\n } = reference;\n const $refBaseURI = resolveSchema$refField(retrievalURI, referencingElement);\n const $refBaseURIStrippedHash = url.stripHash($refBaseURI);\n const file = new File({\n uri: $refBaseURIStrippedHash\n });\n const isUnknownURI = !this.options.resolve.resolvers.some(r => r.canRead(file));\n const isURL = !isUnknownURI;\n let isInternalReference = url.stripHash(this.reference.uri) === $refBaseURI;\n let isExternalReference = !isInternalReference;\n this.indirections.push(referencingElement);\n\n // determining reference, proper evaluation and selection mechanism\n let referencedElement;\n try {\n if (isUnknownURI || isURL) {\n // we're dealing with canonical URI or URL with possible fragment\n retrievalURI = this.toBaseURI($refBaseURI);\n const selector = $refBaseURI;\n const referenceAsSchema = maybeRefractToSchemaElement(reference.value.result);\n referencedElement = uriEvaluate(selector, referenceAsSchema);\n referencedElement = maybeRefractToSchemaElement(referencedElement);\n referencedElement.id = identityManager.identify(referencedElement);\n\n // ignore resolving internal Schema Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Schema Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n } else {\n // we're assuming here that we're dealing with JSON Pointer here\n retrievalURI = this.toBaseURI($refBaseURI);\n isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n isExternalReference = !isInternalReference;\n\n // ignore resolving internal Schema Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Schema Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n reference = await this.toReference(url.unsanitize($refBaseURI));\n const selector = uriToPointer($refBaseURI);\n const referenceAsSchema = maybeRefractToSchemaElement(reference.value.result);\n referencedElement = jsonPointerEvaluate(selector, referenceAsSchema);\n referencedElement = maybeRefractToSchemaElement(referencedElement);\n referencedElement.id = identityManager.identify(referencedElement);\n }\n } catch (error) {\n /**\n * No SchemaElement($id=URL) was not found, so we're going to try to resolve\n * the URL and assume the returned response is a JSON Schema.\n */\n if (isURL && error instanceof EvaluationJsonSchemaUriError) {\n if (isAnchor(uriToAnchor($refBaseURI))) {\n // we're dealing with JSON Schema $anchor here\n isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n isExternalReference = !isInternalReference;\n\n // ignore resolving internal Schema Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Schema Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n reference = await this.toReference(url.unsanitize($refBaseURI));\n const selector = uriToAnchor($refBaseURI);\n const referenceAsSchema = maybeRefractToSchemaElement(reference.value.result);\n referencedElement = $anchorEvaluate(selector, referenceAsSchema);\n referencedElement = maybeRefractToSchemaElement(referencedElement);\n referencedElement.id = identityManager.identify(referencedElement);\n } else {\n // we're assuming here that we're dealing with JSON Pointer here\n retrievalURI = this.toBaseURI(toValue($refBaseURI));\n isInternalReference = url.stripHash(this.reference.uri) === retrievalURI;\n isExternalReference = !isInternalReference;\n\n // ignore resolving internal Schema Objects\n if (!this.options.resolve.internal && isInternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n // ignore resolving external Schema Objects\n if (!this.options.resolve.external && isExternalReference) {\n // skip traversing this schema element but traverse all it's child elements\n return undefined;\n }\n reference = await this.toReference(url.unsanitize($refBaseURI));\n const selector = uriToPointer($refBaseURI);\n const referenceAsSchema = maybeRefractToSchemaElement(reference.value.result);\n referencedElement = jsonPointerEvaluate(selector, referenceAsSchema);\n referencedElement = maybeRefractToSchemaElement(referencedElement);\n referencedElement.id = identityManager.identify(referencedElement);\n }\n } else {\n throw error;\n }\n }\n\n // detect direct or indirect reference\n if (referencingElement === referencedElement) {\n throw new ApiDOMError('Recursive Schema Object reference detected');\n }\n\n // detect maximum depth of dereferencing\n if (this.indirections.length > this.options.dereference.maxDepth) {\n throw new MaximumDereferenceDepthError(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);\n }\n\n // detect second deep dive into the same fragment and avoid it\n if (ancestorsLineage.includes(referencedElement)) {\n reference.refSet.circular = true;\n if (this.options.dereference.circular === 'error') {\n throw new ApiDOMError('Circular reference detected');\n } else if (this.options.dereference.circular === 'replace') {\n var _this$options$derefer9, _this$options$derefer10;\n const refElement = new RefElement(referencedElement.id, {\n type: 'json-schema',\n uri: reference.uri,\n $ref: toValue(referencingElement.$ref),\n baseURI: url.resolve(retrievalURI, $refBaseURI),\n referencingElement\n });\n const replacer = (_this$options$derefer9 = (_this$options$derefer10 = this.options.dereference.strategyOpts['openapi-3-1']) === null || _this$options$derefer10 === void 0 ? void 0 : _this$options$derefer10.circularReplacer) !== null && _this$options$derefer9 !== void 0 ? _this$options$derefer9 : this.options.dereference.circularReplacer;\n const replacement = replacer(refElement);\n link.replaceWith(replacement, mutationReplacer);\n return !parent ? replacement : false;\n }\n }\n\n /**\n * Dive deep into the fragment.\n *\n * Cases to consider:\n * 1. We're crossing document boundary\n * 2. Fragment is from non-root document\n * 3. Fragment is a Schema Object with $ref field. We need to follow it to get the eventual value\n * 4. We are dereferencing the fragment lazily/eagerly depending on circular mode\n */\n const isNonRootDocument = url.stripHash(reference.refSet.rootRef.uri) !== reference.uri;\n const shouldDetectCircular = ['error', 'replace'].includes(this.options.dereference.circular);\n if ((isExternalReference || isNonRootDocument || isSchemaElement(referencedElement) && isStringElement(referencedElement.$ref) || shouldDetectCircular) && !ancestorsLineage.includesCycle(referencedElement)) {\n var _this$basePath5;\n // append referencing schema to ancestors lineage\n directAncestors.add(referencingElement);\n\n // dive deep into the fragment\n const mergeVisitor = new OpenAPI3_1SwaggerClientDereferenceVisitor({\n reference,\n namespace: this.namespace,\n indirections: [...this.indirections],\n options: this.options,\n useCircularStructures: this.useCircularStructures,\n allowMetaPatches: this.allowMetaPatches,\n ancestors: ancestorsLineage,\n basePath: (_this$basePath5 = this.basePath) !== null && _this$basePath5 !== void 0 ? _this$basePath5 : [...toPath([...ancestors, parent, referencingElement]), '$ref']\n });\n referencedElement = await visitAsync(referencedElement, mergeVisitor, {\n keyMap,\n nodeTypeGetter: getNodeType\n });\n\n // remove referencing schema from ancestors lineage\n directAncestors.delete(referencingElement);\n }\n this.indirections.pop();\n if (isBooleanJsonSchemaElement(referencedElement)) {\n const booleanJsonSchemaElement = cloneDeep(referencedElement);\n // annotate referenced element with info about original referencing element\n booleanJsonSchemaElement.setMetaProperty('ref-fields', {\n $ref: toValue(referencingElement.$ref)\n });\n // annotate referenced element with info about origin\n booleanJsonSchemaElement.setMetaProperty('ref-origin', reference.uri);\n // annotate fragment with info about referencing element\n booleanJsonSchemaElement.setMetaProperty('ref-referencing-element-id', cloneDeep(identityManager.identify(referencingElement)));\n link.replaceWith(booleanJsonSchemaElement, mutationReplacer);\n return !parent ? booleanJsonSchemaElement : false;\n }\n\n /**\n * Creating a new version of Schema Object by merging fields from referenced Schema Object with referencing one.\n */\n if (isSchemaElement(referencedElement)) {\n // Schema Object - merge keywords from referenced schema with referencing schema\n const mergedElement = new SchemaElement([...referencedElement.content], cloneDeep(referencedElement.meta), cloneDeep(referencedElement.attributes));\n // existing keywords from referencing schema overrides ones from referenced schema\n referencingElement.forEach((value, keyElement, item) => {\n mergedElement.remove(toValue(keyElement));\n mergedElement.content.push(item);\n });\n mergedElement.remove('$ref');\n // annotate referenced element with info about original referencing element\n mergedElement.setMetaProperty('ref-fields', {\n $ref: toValue(referencingElement.$ref)\n });\n // annotate fragment with info about origin\n mergedElement.setMetaProperty('ref-origin', reference.uri);\n // annotate fragment with info about referencing element\n mergedElement.setMetaProperty('ref-referencing-element-id', cloneDeep(identityManager.identify(referencingElement)));\n\n // allowMetaPatches option processing\n if (this.allowMetaPatches) {\n // apply meta patch only when not already applied\n if (typeof mergedElement.get('$$ref') === 'undefined') {\n const baseURI = url.resolve(retrievalURI, $refBaseURI);\n mergedElement.set('$$ref', baseURI);\n }\n }\n referencedElement = mergedElement;\n }\n\n /**\n * Transclude referencing element with merged referenced element.\n */\n link.replaceWith(referencedElement, mutationReplacer);\n\n /**\n * We're at the root of the tree, so we're just replacing the entire tree.\n */\n return !parent ? referencedElement : undefined;\n } catch (error) {\n var _this$basePath6, _this$options$derefer11, _this$options$derefer12;\n const rootCause = getRootCause(error);\n const wrappedError = new SchemaRefError(`Could not resolve reference: ${rootCause.message}`, {\n baseDoc: this.reference.uri,\n $ref: toValue(referencingElement.$ref),\n fullPath: (_this$basePath6 = this.basePath) !== null && _this$basePath6 !== void 0 ? _this$basePath6 : [...toPath([...ancestors, parent, referencingElement]), '$ref'],\n cause: rootCause\n });\n (_this$options$derefer11 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer11 === void 0 || (_this$options$derefer11 = _this$options$derefer11.errors) === null || _this$options$derefer11 === void 0 || (_this$options$derefer12 = _this$options$derefer11.push) === null || _this$options$derefer12 === void 0 || _this$options$derefer12.call(_this$options$derefer11, wrappedError);\n return undefined;\n }\n }\n\n // eslint-disable-next-line class-methods-use-this\n async LinkElement() {\n /**\n * OpenApi3_1DereferenceVisitor is doing lookup of Operation Objects\n * and assigns them to Link Object metadata. This is not needed in\n * swagger-client context, so we're disabling it here.\n */\n return undefined;\n }\n async ExampleElement(exampleElement, key, parent, path, ancestors, link) {\n try {\n return await super.ExampleElement(exampleElement, key, parent, path, ancestors, link);\n } catch (error) {\n var _this$basePath7, _this$options$derefer13, _this$options$derefer14;\n const rootCause = getRootCause(error);\n const wrappedError = wrapError(rootCause, {\n baseDoc: this.reference.uri,\n externalValue: toValue(exampleElement.externalValue),\n fullPath: (_this$basePath7 = this.basePath) !== null && _this$basePath7 !== void 0 ? _this$basePath7 : [...toPath([...ancestors, parent, exampleElement]), 'externalValue']\n });\n (_this$options$derefer13 = this.options.dereference.dereferenceOpts) === null || _this$options$derefer13 === void 0 || (_this$options$derefer13 = _this$options$derefer13.errors) === null || _this$options$derefer13 === void 0 || (_this$options$derefer14 = _this$options$derefer13.push) === null || _this$options$derefer14 === void 0 || _this$options$derefer14.call(_this$options$derefer13, wrappedError);\n return undefined;\n }\n }\n}\nexport default OpenAPI3_1SwaggerClientDereferenceVisitor;\n/* eslint-enable camelcase */","import { mergeAllVisitors } from '@swagger-api/apidom-core';\nimport { getNodeType } from '@swagger-api/apidom-ns-openapi-3-1';\nimport ModelPropertyMacroVisitor from './properties.js';\nimport AllOfVisitor from './all-of.js';\nimport ParameterMacroVisitor from './parameters.js';\nimport OpenAPI3_1SwaggerClientDereferenceVisitor from './dereference.js'; // eslint-disable-line camelcase\n\nconst mergeAllVisitorsAsync = mergeAllVisitors[Symbol.for('nodejs.util.promisify.custom')];\nclass RootVisitor {\n constructor({\n parameterMacro,\n modelPropertyMacro,\n mode,\n options,\n ...rest\n }) {\n const visitors = [];\n visitors.push(new OpenAPI3_1SwaggerClientDereferenceVisitor({\n ...rest,\n options\n }));\n if (typeof modelPropertyMacro === 'function') {\n visitors.push(new ModelPropertyMacroVisitor({\n modelPropertyMacro,\n options\n }));\n }\n if (mode !== 'strict') {\n visitors.push(new AllOfVisitor({\n options\n }));\n }\n if (typeof parameterMacro === 'function') {\n visitors.push(new ParameterMacroVisitor({\n parameterMacro,\n options\n }));\n }\n const mergedVisitor = mergeAllVisitorsAsync(visitors, {\n nodeTypeGetter: getNodeType\n });\n Object.assign(this, mergedVisitor);\n }\n}\nexport default RootVisitor;","/* eslint-disable camelcase */\nimport { createNamespace, visit, cloneDeep } from '@swagger-api/apidom-core';\nimport { ReferenceSet, Reference } from '@swagger-api/apidom-reference/configuration/empty';\nimport OpenAPI3_1DereferenceStrategy from '@swagger-api/apidom-reference/dereference/strategies/openapi-3-1';\nimport openApi3_1Namespace, { getNodeType, keyMap } from '@swagger-api/apidom-ns-openapi-3-1';\nimport RootVisitor from './visitors/root.js';\nconst visitAsync = visit[Symbol.for('nodejs.util.promisify.custom')];\nclass OpenAPI3_1SwaggerClientDereferenceStrategy extends OpenAPI3_1DereferenceStrategy {\n allowMetaPatches;\n parameterMacro;\n modelPropertyMacro;\n mode;\n ancestors;\n constructor({\n allowMetaPatches = false,\n parameterMacro = null,\n modelPropertyMacro = null,\n mode = 'non-strict',\n ancestors = [],\n ...rest\n } = {}) {\n super({\n ...rest\n });\n this.name = 'openapi-3-1-swagger-client';\n this.allowMetaPatches = allowMetaPatches;\n this.parameterMacro = parameterMacro;\n this.modelPropertyMacro = modelPropertyMacro;\n this.mode = mode;\n this.ancestors = [...ancestors];\n }\n async dereference(file, options) {\n var _options$dereference$;\n const namespace = createNamespace(openApi3_1Namespace);\n const immutableRefSet = (_options$dereference$ = options.dereference.refSet) !== null && _options$dereference$ !== void 0 ? _options$dereference$ : new ReferenceSet();\n const mutableRefsSet = new ReferenceSet();\n let refSet = immutableRefSet;\n let reference;\n if (!immutableRefSet.has(file.uri)) {\n reference = new Reference({\n uri: file.uri,\n value: file.parseResult\n });\n immutableRefSet.add(reference);\n } else {\n // pre-computed refSet was provided as configuration option\n reference = immutableRefSet.find(ref => ref.uri === file.uri);\n }\n\n /**\n * Clone refSet due the dereferencing process being mutable.\n * We don't want to mutate the original refSet and the references.\n */\n if (options.dereference.immutable) {\n immutableRefSet.refs.map(ref => new Reference({\n ...ref,\n value: cloneDeep(ref.value)\n })).forEach(ref => mutableRefsSet.add(ref));\n reference = mutableRefsSet.find(ref => ref.uri === file.uri);\n refSet = mutableRefsSet;\n }\n const rootVisitor = new RootVisitor({\n reference,\n namespace,\n options,\n allowMetaPatches: this.allowMetaPatches,\n ancestors: this.ancestors,\n modelPropertyMacro: this.modelPropertyMacro,\n mode: this.mode,\n parameterMacro: this.parameterMacro\n });\n const dereferencedElement = await visitAsync(refSet.rootRef.value, rootVisitor, {\n keyMap,\n nodeTypeGetter: getNodeType\n });\n\n /**\n * If immutable option is set, replay refs from the refSet.\n */\n if (options.dereference.immutable) {\n mutableRefsSet.refs.filter(ref => ref.uri.startsWith('immutable://')).map(ref => new Reference({\n ...ref,\n uri: ref.uri.replace(/^immutable:\\/\\//, '')\n })).forEach(ref => immutableRefSet.add(ref));\n }\n\n /**\n * Release all memory if this refSet was not provided as an configuration option.\n * If provided as configuration option, then provider is responsible for cleanup.\n */\n if (options.dereference.refSet === null) {\n immutableRefSet.clean();\n }\n mutableRefsSet.clean();\n return dereferencedElement;\n }\n}\nexport default OpenAPI3_1SwaggerClientDereferenceStrategy;\n/* eslint-enable camelcase */","/* eslint-disable camelcase */\nimport { ParseResultElement, ObjectElement, toValue, transclude, cloneDeep } from '@swagger-api/apidom-core';\nimport { compile as jsonPointerCompile, evaluate as jsonPointerEvaluate, EvaluationJsonPointerError, InvalidJsonPointerError } from '@swagger-api/apidom-json-pointer';\nimport { mediaTypes, OpenApi3_1Element } from '@swagger-api/apidom-ns-openapi-3-1';\nimport { dereferenceApiDOM, url, ReferenceSet, Reference, options as referenceOptions } from '@swagger-api/apidom-reference/configuration/empty';\nimport BinaryParser from '@swagger-api/apidom-reference/parse/parsers/binary';\nimport OpenAPI3_1ResolveStrategy from '@swagger-api/apidom-reference/resolve/strategies/openapi-3-1';\nimport { DEFAULT_BASE_URL } from '../../../constants.js';\nimport * as optionsUtil from '../../utils/options.js';\nimport HTTPResolverSwaggerClient from '../../apidom/reference/resolve/resolvers/http-swagger-client/index.js';\nimport JSONParser from '../../apidom/reference/parse/parsers/json/index.js';\nimport YAMLParser from '../../apidom/reference/parse/parsers/yaml-1-2/index.js';\nimport OpenAPIJSON3_1Parser from '../../apidom/reference/parse/parsers/openapi-json-3-1/index.js';\nimport OpenAPIYAML3_1Parser from '../../apidom/reference/parse/parsers/openapi-yaml-3-1/index.js';\nimport OpenAPI3_1SwaggerClientDereferenceStrategy from '../../apidom/reference/dereference/strategies/openapi-3-1-swagger-client/index.js';\nexport const circularReplacer = refElement => {\n const $refBaseURI = toValue(refElement.meta.get('baseURI'));\n const referencingElement = refElement.meta.get('referencingElement');\n\n /**\n * Removing semantics from the absolutified referencing element by\n * using generic ObjectElement to represent the reference.\n */\n return new ObjectElement({\n $ref: $refBaseURI\n }, cloneDeep(referencingElement.meta), cloneDeep(referencingElement.attributes));\n};\nconst resolveOpenAPI31Strategy = async options => {\n const {\n spec,\n timeout,\n redirects,\n requestInterceptor,\n responseInterceptor,\n pathDiscriminator = [],\n allowMetaPatches = false,\n useCircularStructures = false,\n skipNormalization = false,\n parameterMacro = null,\n modelPropertyMacro = null,\n mode = 'non-strict',\n strategies\n } = options;\n try {\n const {\n cache\n } = resolveOpenAPI31Strategy;\n const strategy = strategies.find(strg => strg.match(spec));\n\n // determining BaseURI\n const cwd = url.isHttpUrl(url.cwd()) ? url.cwd() : DEFAULT_BASE_URL;\n const retrievalURI = optionsUtil.retrievalURI(options);\n const baseURI = url.resolve(cwd, retrievalURI);\n\n // prepare spec for dereferencing\n let openApiElement;\n if (cache.has(spec)) {\n openApiElement = cache.get(spec);\n } else {\n openApiElement = OpenApi3_1Element.refract(spec);\n openApiElement.classes.push('result');\n cache.set(spec, openApiElement);\n }\n const openApiParseResultElement = new ParseResultElement([openApiElement]);\n\n // prepare fragment for dereferencing\n const jsonPointer = jsonPointerCompile(pathDiscriminator);\n const jsonPointerURI = jsonPointer === '' ? '' : `#${jsonPointer}`;\n const fragmentElement = jsonPointerEvaluate(jsonPointer, openApiElement);\n\n // prepare reference set for dereferencing\n const openApiElementReference = new Reference({\n uri: baseURI,\n value: openApiParseResultElement\n });\n const refSet = new ReferenceSet({\n refs: [openApiElementReference]\n });\n if (jsonPointer !== '') refSet.rootRef = undefined; // reset root reference as we want fragment to become the root reference\n\n // prepare ancestors; needed for cases where fragment is not OpenAPI element\n const ancestors = [new Set([fragmentElement])];\n const errors = [];\n const dereferenced = await dereferenceApiDOM(fragmentElement, {\n resolve: {\n /**\n * swagger-client only supports resolving HTTP(S) URLs or spec objects.\n * If runtime env is detected as non-browser one,\n * and baseURI was not provided as part of resolver options,\n * then below baseURI check will make sure that constant HTTPS URL is used as baseURI.\n */\n baseURI: `${baseURI}${jsonPointerURI}`,\n resolvers: [new HTTPResolverSwaggerClient({\n timeout: timeout || 10000,\n redirects: redirects || 10\n })],\n resolverOpts: {\n swaggerHTTPClientConfig: {\n requestInterceptor,\n responseInterceptor\n }\n },\n strategies: [new OpenAPI3_1ResolveStrategy()]\n },\n parse: {\n mediaType: mediaTypes.latest(),\n parsers: [new OpenAPIJSON3_1Parser({\n allowEmpty: false,\n sourceMap: false\n }), new OpenAPIYAML3_1Parser({\n allowEmpty: false,\n sourceMap: false\n }), new JSONParser({\n allowEmpty: false,\n sourceMap: false\n }), new YAMLParser({\n allowEmpty: false,\n sourceMap: false\n }), new BinaryParser({\n allowEmpty: false,\n sourceMap: false\n })]\n },\n dereference: {\n maxDepth: 100,\n strategies: [new OpenAPI3_1SwaggerClientDereferenceStrategy({\n allowMetaPatches,\n useCircularStructures,\n parameterMacro,\n modelPropertyMacro,\n mode,\n ancestors\n })],\n refSet,\n dereferenceOpts: {\n errors\n },\n immutable: false,\n circular: useCircularStructures ? 'ignore' : 'replace',\n circularReplacer: useCircularStructures ? referenceOptions.dereference.circularReplacer : circularReplacer\n }\n });\n const transcluded = transclude(fragmentElement, dereferenced, openApiElement);\n const normalized = skipNormalization ? transcluded : strategy.normalize(transcluded);\n return {\n spec: toValue(normalized),\n errors\n };\n } catch (error) {\n if (error instanceof InvalidJsonPointerError || error instanceof EvaluationJsonPointerError) {\n return {\n spec,\n errors: []\n };\n }\n throw error;\n }\n};\nresolveOpenAPI31Strategy.cache = new WeakMap();\nexport default resolveOpenAPI31Strategy;\n/* eslint-enable camelcase */","/* eslint-disable camelcase */\nimport { dispatchRefractorPlugins, isObjectElement, toValue } from '@swagger-api/apidom-core';\nimport { refractorPluginNormalizeOperationIds, refractorPluginNormalizeParameters, refractorPluginNormalizeSecurityRequirements, refractorPluginNormalizeParameterExamples, refractorPluginNormalizeHeaderExamples, createToolbox, keyMap, getNodeType, OpenApi3_1Element } from '@swagger-api/apidom-ns-openapi-3-1';\nimport opId from '../../../helpers/op-id.js';\nimport resolveOpenAPI31Strategy from './resolve.js';\nconst normalize = element => {\n if (!isObjectElement(element)) return element;\n const plugins = [refractorPluginNormalizeOperationIds({\n operationIdNormalizer: (operationId, path, method) => opId({\n operationId\n }, path, method, {\n v2OperationIdCompatibilityMode: false\n })\n }), refractorPluginNormalizeParameters(), refractorPluginNormalizeSecurityRequirements(), refractorPluginNormalizeParameterExamples(), refractorPluginNormalizeHeaderExamples()];\n const normalized = dispatchRefractorPlugins(element, plugins, {\n toolboxCreator: createToolbox,\n visitorOptions: {\n keyMap,\n nodeTypeGetter: getNodeType\n }\n });\n return normalized;\n};\n\n/**\n * This adapter allow to perform normalization on Plain Old JavaScript Objects.\n * The function adapts the `normalize` function interface and is able to accept\n * Plain Old JavaScript Objects and returns Plain Old JavaScript Objects.\n */\nexport const pojoAdapter = normalizeFn => spec => {\n const openApiElement = OpenApi3_1Element.refract(spec);\n openApiElement.classes.push('result');\n const normalized = normalizeFn(openApiElement);\n const value = toValue(normalized);\n\n /**\n * We're setting the cache here to avoid repeated refracting\n * in `openapi-3-1-apidom` strategy resolve method.\n */\n resolveOpenAPI31Strategy.cache.set(value, normalized);\n return toValue(normalized);\n};\nexport default normalize;\n/* eslint-enable camelcase */","import { isPlainObject } from 'ramda-adjunct';\nimport { isElement } from '@swagger-api/apidom-core';\nimport resolveOpenAPI31Strategy from './resolve.js';\nimport normalize, { pojoAdapter } from './normalize.js';\nimport { isOpenAPI31 } from '../../../helpers/openapi-predicates.js';\nconst openApi31ApiDOMStrategy = {\n name: 'openapi-3-1-apidom',\n match(spec) {\n return isOpenAPI31(spec);\n },\n normalize(spec) {\n // pre-normalization - happens only once before the first lazy dereferencing and in JavaScript context\n if (!isElement(spec) && isPlainObject(spec) && !spec.$$normalized) {\n const preNormalized = pojoAdapter(normalize)(spec);\n preNormalized.$$normalized = true;\n return preNormalized;\n }\n // post-normalization - happens after each dereferencing and in ApiDOM context\n if (isElement(spec)) {\n return normalize(spec);\n }\n return spec;\n },\n async resolve(options) {\n return resolveOpenAPI31Strategy(options);\n }\n};\nexport default openApi31ApiDOMStrategy;","import { makeFetchJSON } from './utils/index.js';\nimport * as optionsUtil from './utils/options.js';\nimport genericStrategy from './strategies/generic/index.js';\nimport openApi2Strategy from './strategies/openapi-2/index.js';\nimport openApi30Strategy from './strategies/openapi-3-0/index.js';\nconst resolve = async options => {\n const {\n spec,\n requestInterceptor,\n responseInterceptor\n } = options;\n const retrievalURI = optionsUtil.retrievalURI(options);\n const httpClient = optionsUtil.httpClient(options);\n const retrievedSpec = spec || (await makeFetchJSON(httpClient, {\n requestInterceptor,\n responseInterceptor\n })(retrievalURI));\n const strategyOptions = {\n ...options,\n spec: retrievedSpec\n };\n const strategy = options.strategies.find(strg => strg.match(retrievedSpec));\n return strategy.resolve(strategyOptions);\n};\nexport const makeResolve = defaultOptions => async options => {\n const mergedOptions = {\n ...defaultOptions,\n ...options\n };\n return resolve(mergedOptions);\n};\nexport default makeResolve({\n strategies: [openApi30Strategy, openApi2Strategy, genericStrategy]\n});","// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved
\n// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
\n//\n// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)\nexport default function grammar() {\n // ```\n // SUMMARY\n // rules = 9\n // udts = 0\n // opcodes = 62\n // --- ABNF original opcodes\n // ALT = 6\n // CAT = 2\n // REP = 3\n // RNM = 9\n // TLS = 9\n // TBS = 6\n // TRG = 27\n // --- SABNF superset opcodes\n // UDT = 0\n // AND = 0\n // NOT = 0\n // characters = [0 - 1114111]\n // ```\n /* OBJECT IDENTIFIER (for internal parser use) */\n this.grammarObject = 'grammarObject';\n\n /* RULES */\n this.rules = [];\n this.rules[0] = {\n name: 'server-url-template',\n lower: 'server-url-template',\n index: 0,\n isBkr: false\n };\n this.rules[1] = {\n name: 'server-variable',\n lower: 'server-variable',\n index: 1,\n isBkr: false\n };\n this.rules[2] = {\n name: 'server-variable-name',\n lower: 'server-variable-name',\n index: 2,\n isBkr: false\n };\n this.rules[3] = {\n name: 'literals',\n lower: 'literals',\n index: 3,\n isBkr: false\n };\n this.rules[4] = {\n name: 'DIGIT',\n lower: 'digit',\n index: 4,\n isBkr: false\n };\n this.rules[5] = {\n name: 'HEXDIG',\n lower: 'hexdig',\n index: 5,\n isBkr: false\n };\n this.rules[6] = {\n name: 'pct-encoded',\n lower: 'pct-encoded',\n index: 6,\n isBkr: false\n };\n this.rules[7] = {\n name: 'ucschar',\n lower: 'ucschar',\n index: 7,\n isBkr: false\n };\n this.rules[8] = {\n name: 'iprivate',\n lower: 'iprivate',\n index: 8,\n isBkr: false\n };\n\n /* UDTS */\n this.udts = [];\n\n /* OPCODES */\n /* server-url-template */\n this.rules[0].opcodes = [];\n this.rules[0].opcodes[0] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[0].opcodes[1] = {\n type: 1,\n children: [2, 3]\n }; // ALT\n this.rules[0].opcodes[2] = {\n type: 4,\n index: 3\n }; // RNM(literals)\n this.rules[0].opcodes[3] = {\n type: 4,\n index: 1\n }; // RNM(server-variable)\n\n /* server-variable */\n this.rules[1].opcodes = [];\n this.rules[1].opcodes[0] = {\n type: 2,\n children: [1, 2, 3]\n }; // CAT\n this.rules[1].opcodes[1] = {\n type: 7,\n string: [123]\n }; // TLS\n this.rules[1].opcodes[2] = {\n type: 4,\n index: 2\n }; // RNM(server-variable-name)\n this.rules[1].opcodes[3] = {\n type: 7,\n string: [125]\n }; // TLS\n\n /* server-variable-name */\n this.rules[2].opcodes = [];\n this.rules[2].opcodes[0] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[2].opcodes[1] = {\n type: 1,\n children: [2, 3, 4]\n }; // ALT\n this.rules[2].opcodes[2] = {\n type: 5,\n min: 0,\n max: 122\n }; // TRG\n this.rules[2].opcodes[3] = {\n type: 6,\n string: [124]\n }; // TBS\n this.rules[2].opcodes[4] = {\n type: 5,\n min: 126,\n max: 1114111\n }; // TRG\n\n /* literals */\n this.rules[3].opcodes = [];\n this.rules[3].opcodes[0] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[3].opcodes[1] = {\n type: 1,\n children: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]\n }; // ALT\n this.rules[3].opcodes[2] = {\n type: 6,\n string: [33]\n }; // TBS\n this.rules[3].opcodes[3] = {\n type: 5,\n min: 35,\n max: 36\n }; // TRG\n this.rules[3].opcodes[4] = {\n type: 5,\n min: 38,\n max: 59\n }; // TRG\n this.rules[3].opcodes[5] = {\n type: 6,\n string: [61]\n }; // TBS\n this.rules[3].opcodes[6] = {\n type: 5,\n min: 63,\n max: 91\n }; // TRG\n this.rules[3].opcodes[7] = {\n type: 6,\n string: [93]\n }; // TBS\n this.rules[3].opcodes[8] = {\n type: 6,\n string: [95]\n }; // TBS\n this.rules[3].opcodes[9] = {\n type: 5,\n min: 97,\n max: 122\n }; // TRG\n this.rules[3].opcodes[10] = {\n type: 6,\n string: [126]\n }; // TBS\n this.rules[3].opcodes[11] = {\n type: 4,\n index: 7\n }; // RNM(ucschar)\n this.rules[3].opcodes[12] = {\n type: 4,\n index: 8\n }; // RNM(iprivate)\n this.rules[3].opcodes[13] = {\n type: 4,\n index: 6\n }; // RNM(pct-encoded)\n\n /* DIGIT */\n this.rules[4].opcodes = [];\n this.rules[4].opcodes[0] = {\n type: 5,\n min: 48,\n max: 57\n }; // TRG\n\n /* HEXDIG */\n this.rules[5].opcodes = [];\n this.rules[5].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5, 6, 7]\n }; // ALT\n this.rules[5].opcodes[1] = {\n type: 4,\n index: 4\n }; // RNM(DIGIT)\n this.rules[5].opcodes[2] = {\n type: 7,\n string: [97]\n }; // TLS\n this.rules[5].opcodes[3] = {\n type: 7,\n string: [98]\n }; // TLS\n this.rules[5].opcodes[4] = {\n type: 7,\n string: [99]\n }; // TLS\n this.rules[5].opcodes[5] = {\n type: 7,\n string: [100]\n }; // TLS\n this.rules[5].opcodes[6] = {\n type: 7,\n string: [101]\n }; // TLS\n this.rules[5].opcodes[7] = {\n type: 7,\n string: [102]\n }; // TLS\n\n /* pct-encoded */\n this.rules[6].opcodes = [];\n this.rules[6].opcodes[0] = {\n type: 2,\n children: [1, 2, 3]\n }; // CAT\n this.rules[6].opcodes[1] = {\n type: 7,\n string: [37]\n }; // TLS\n this.rules[6].opcodes[2] = {\n type: 4,\n index: 5\n }; // RNM(HEXDIG)\n this.rules[6].opcodes[3] = {\n type: 4,\n index: 5\n }; // RNM(HEXDIG)\n\n /* ucschar */\n this.rules[7].opcodes = [];\n this.rules[7].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]\n }; // ALT\n this.rules[7].opcodes[1] = {\n type: 5,\n min: 160,\n max: 55295\n }; // TRG\n this.rules[7].opcodes[2] = {\n type: 5,\n min: 63744,\n max: 64975\n }; // TRG\n this.rules[7].opcodes[3] = {\n type: 5,\n min: 65008,\n max: 65519\n }; // TRG\n this.rules[7].opcodes[4] = {\n type: 5,\n min: 65536,\n max: 131069\n }; // TRG\n this.rules[7].opcodes[5] = {\n type: 5,\n min: 131072,\n max: 196605\n }; // TRG\n this.rules[7].opcodes[6] = {\n type: 5,\n min: 196608,\n max: 262141\n }; // TRG\n this.rules[7].opcodes[7] = {\n type: 5,\n min: 262144,\n max: 327677\n }; // TRG\n this.rules[7].opcodes[8] = {\n type: 5,\n min: 327680,\n max: 393213\n }; // TRG\n this.rules[7].opcodes[9] = {\n type: 5,\n min: 393216,\n max: 458749\n }; // TRG\n this.rules[7].opcodes[10] = {\n type: 5,\n min: 458752,\n max: 524285\n }; // TRG\n this.rules[7].opcodes[11] = {\n type: 5,\n min: 524288,\n max: 589821\n }; // TRG\n this.rules[7].opcodes[12] = {\n type: 5,\n min: 589824,\n max: 655357\n }; // TRG\n this.rules[7].opcodes[13] = {\n type: 5,\n min: 655360,\n max: 720893\n }; // TRG\n this.rules[7].opcodes[14] = {\n type: 5,\n min: 720896,\n max: 786429\n }; // TRG\n this.rules[7].opcodes[15] = {\n type: 5,\n min: 786432,\n max: 851965\n }; // TRG\n this.rules[7].opcodes[16] = {\n type: 5,\n min: 851968,\n max: 917501\n }; // TRG\n this.rules[7].opcodes[17] = {\n type: 5,\n min: 921600,\n max: 983037\n }; // TRG\n\n /* iprivate */\n this.rules[8].opcodes = [];\n this.rules[8].opcodes[0] = {\n type: 1,\n children: [1, 2, 3]\n }; // ALT\n this.rules[8].opcodes[1] = {\n type: 5,\n min: 57344,\n max: 63743\n }; // TRG\n this.rules[8].opcodes[2] = {\n type: 5,\n min: 983040,\n max: 1048573\n }; // TRG\n this.rules[8].opcodes[3] = {\n type: 5,\n min: 1048576,\n max: 1114109\n }; // TRG\n\n // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n this.toString = function toString() {\n let str = \"\";\n str += \"; OpenAPI Server URL templating ABNF syntax\\n\";\n str += \"server-url-template = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2\\n\";\n str += \"server-variable = \\\"{\\\" server-variable-name \\\"}\\\"\\n\";\n str += \"server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\";\n str += \"\\n\";\n str += \"; https://www.rfc-editor.org/rfc/rfc6570#section-2.1\\n\";\n str += \"; https://www.rfc-editor.org/errata/eid6937\\n\";\n str += \"literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B\\n\";\n str += \" / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\\n\";\n str += \" / pct-encoded)\\n\";\n str += \" ; any Unicode character except: CTL, SP,\\n\";\n str += \" ; DQUOTE, \\\"%\\\" (aside from pct-encoded),\\n\";\n str += \" ; \\\"<\\\", \\\">\\\", \\\"\\\\\\\", \\\"^\\\", \\\"`\\\", \\\"{\\\", \\\"|\\\", \\\"}\\\"\\n\";\n str += \"\\n\";\n str += \"; https://www.rfc-editor.org/rfc/rfc6570#section-1.5\\n\";\n str += \"DIGIT = %x30-39 ; 0-9\\n\";\n str += \"HEXDIG = DIGIT / \\\"A\\\" / \\\"B\\\" / \\\"C\\\" / \\\"D\\\" / \\\"E\\\" / \\\"F\\\" ; case-insensitive\\n\";\n str += \"\\n\";\n str += \"pct-encoded = \\\"%\\\" HEXDIG HEXDIG\\n\";\n str += \"\\n\";\n str += \"ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\\n\";\n str += \" / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\\n\";\n str += \" / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\\n\";\n str += \" / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\\n\";\n str += \" / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\\n\";\n str += \" / %xD0000-DFFFD / %xE1000-EFFFD\\n\";\n str += \"\\n\";\n str += \"iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\\n\";\n return str;\n };\n}","/* *************************************************************************************\n * copyright: Copyright (c) 2023 Lowell D. Thomas, all rights reserved\n * license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * ********************************************************************************* */\nexport { Parser, Ast, Trace, Stats, utilities, identifiers };\nconst Parser = function fnparser() {\n const id = identifiers;\n const utils = utilities;\n const p = this;\n const thisFileName = 'parser.js: Parser(): ';\n const systemData = function systemData() {\n this.state = id.ACTIVE;\n this.phraseLength = 0;\n this.refresh = () => {\n this.state = id.ACTIVE;\n this.phraseLength = 0;\n };\n };\n p.ast = undefined;\n p.stats = undefined;\n p.trace = undefined;\n p.callbacks = [];\n let lookAhead = 0;\n let treeDepth = 0;\n let maxTreeDepth = 0;\n let nodeHits = 0;\n let maxMatched = 0;\n let rules = undefined;\n let udts = undefined;\n let opcodes = undefined;\n let chars = undefined;\n let sysData = new systemData();\n let ruleCallbacks = undefined;\n let udtCallbacks = undefined;\n let userData = undefined;\n const clear = () => {\n lookAhead = 0;\n treeDepth = 0;\n maxTreeDepth = 0;\n nodeHits = 0;\n maxMatched = 0;\n rules = undefined;\n udts = undefined;\n opcodes = undefined;\n chars = undefined;\n sysData.refresh();\n ruleCallbacks = undefined;\n udtCallbacks = undefined;\n userData = undefined;\n };\n const initializeCallbacks = () => {\n const functionName = `${thisFileName}initializeCallbacks(): `;\n let i;\n ruleCallbacks = [];\n udtCallbacks = [];\n for (i = 0; i < rules.length; i += 1) {\n ruleCallbacks[i] = undefined;\n }\n for (i = 0; i < udts.length; i += 1) {\n udtCallbacks[i] = undefined;\n }\n let func;\n const list = [];\n for (i = 0; i < rules.length; i += 1) {\n list.push(rules[i].lower);\n }\n for (i = 0; i < udts.length; i += 1) {\n list.push(udts[i].lower);\n }\n for (const index in p.callbacks) {\n if (p.callbacks.hasOwnProperty(index)) {\n i = list.indexOf(index.toLowerCase());\n if (i < 0) {\n throw new Error(`${functionName}syntax callback '${index}' not a rule or udt name`);\n }\n func = p.callbacks[index] ? p.callbacks[index] : undefined;\n if (typeof func === 'function' || func === undefined) {\n if (i < rules.length) {\n ruleCallbacks[i] = func;\n } else {\n udtCallbacks[i - rules.length] = func;\n }\n } else {\n throw new Error(`${functionName}syntax callback[${index}] must be function reference or falsy)`);\n }\n }\n }\n };\n p.parse = (grammar, startName, inputString, callbackData) => {\n const functionName = `${thisFileName}parse(): `;\n clear();\n chars = utils.stringToChars(inputString);\n rules = grammar.rules;\n udts = grammar.udts;\n const lower = startName.toLowerCase();\n let startIndex = undefined;\n for (const i in rules) {\n if (rules.hasOwnProperty(i)) {\n if (lower === rules[i].lower) {\n startIndex = rules[i].index;\n break;\n }\n }\n }\n if (startIndex === undefined) {\n throw new Error(`${functionName}start rule name '${startRule}' not recognized`);\n }\n initializeCallbacks();\n if (p.trace) {\n p.trace.init(rules, udts, chars);\n }\n if (p.stats) {\n p.stats.init(rules, udts);\n }\n if (p.ast) {\n p.ast.init(rules, udts, chars);\n }\n userData = callbackData;\n /* create a dummy opcode for the start rule */\n opcodes = [{\n type: id.RNM,\n index: startIndex\n }];\n /* execute the start rule */\n opExecute(0, 0);\n opcodes = undefined;\n /* test and return the sysData */\n let success = false;\n switch (sysData.state) {\n case id.ACTIVE:\n throw new Error(`${functionName}final state should never be 'ACTIVE'`);\n case id.NOMATCH:\n success = false;\n break;\n case id.EMPTY:\n case id.MATCH:\n if (sysData.phraseLength === chars.length) {\n success = true;\n } else {\n success = false;\n }\n break;\n default:\n throw new Error('unrecognized state');\n }\n return {\n success,\n state: sysData.state,\n stateName: id.idName(sysData.state),\n length: chars.length,\n matched: sysData.phraseLength,\n maxMatched,\n maxTreeDepth,\n nodeHits\n };\n };\n // The `ALT` operator.
\n // Executes its child nodes, from left to right, until it finds a match.\n // Fails if *all* of its child nodes fail.\n const opALT = (opIndex, phraseIndex) => {\n const op = opcodes[opIndex];\n for (let i = 0; i < op.children.length; i += 1) {\n opExecute(op.children[i], phraseIndex);\n if (sysData.state !== id.NOMATCH) {\n break;\n }\n }\n };\n // The `CAT` operator.
\n // Executes all of its child nodes, from left to right,\n // concatenating the matched phrases.\n // Fails if *any* child nodes fail.\n const opCAT = (opIndex, phraseIndex) => {\n let success;\n let astLength;\n let catCharIndex;\n let catPhrase;\n const op = opcodes[opIndex];\n if (p.ast) {\n astLength = p.ast.getLength();\n }\n success = true;\n catCharIndex = phraseIndex;\n catPhrase = 0;\n for (let i = 0; i < op.children.length; i += 1) {\n opExecute(op.children[i], catCharIndex);\n if (sysData.state === id.NOMATCH) {\n success = false;\n break;\n } else {\n catCharIndex += sysData.phraseLength;\n catPhrase += sysData.phraseLength;\n }\n }\n if (success) {\n sysData.state = catPhrase === 0 ? id.EMPTY : id.MATCH;\n sysData.phraseLength = catPhrase;\n } else {\n sysData.state = id.NOMATCH;\n sysData.phraseLength = 0;\n if (p.ast) {\n p.ast.setLength(astLength);\n }\n }\n };\n // The `REP` operator.
\n // Repeatedly executes its single child node,\n // concatenating each of the matched phrases found.\n // The number of repetitions executed and its final sysData depends\n // on its `min` & `max` repetition values.\n const opREP = (opIndex, phraseIndex) => {\n let astLength;\n let repCharIndex;\n let repPhrase;\n let repCount;\n const op = opcodes[opIndex];\n if (op.max === 0) {\n // this is an empty-string acceptor\n // deprecated: use the TLS empty string operator, \"\", instead\n sysData.state = id.EMPTY;\n sysData.phraseLength = 0;\n return;\n }\n repCharIndex = phraseIndex;\n repPhrase = 0;\n repCount = 0;\n if (p.ast) {\n astLength = p.ast.getLength();\n }\n while (1) {\n if (repCharIndex >= chars.length) {\n /* exit on end of input string */\n break;\n }\n opExecute(opIndex + 1, repCharIndex);\n if (sysData.state === id.NOMATCH) {\n /* always end if the child node fails */\n break;\n }\n if (sysData.state === id.EMPTY) {\n /* REP always succeeds when the child node returns an empty phrase */\n /* this may not seem obvious, but that's the way it works out */\n break;\n }\n repCount += 1;\n repPhrase += sysData.phraseLength;\n repCharIndex += sysData.phraseLength;\n if (repCount === op.max) {\n /* end on maxed out reps */\n break;\n }\n }\n /* evaluate the match count according to the min, max values */\n if (sysData.state === id.EMPTY) {\n sysData.state = repPhrase === 0 ? id.EMPTY : id.MATCH;\n sysData.phraseLength = repPhrase;\n } else if (repCount >= op.min) {\n sysData.state = repPhrase === 0 ? id.EMPTY : id.MATCH;\n sysData.phraseLength = repPhrase;\n } else {\n sysData.state = id.NOMATCH;\n sysData.phraseLength = 0;\n if (p.ast) {\n p.ast.setLength(astLength);\n }\n }\n };\n // Validate the callback function's returned sysData values.\n // It's the user's responsibility to get them right\n // but `RNM` fails if not.\n const validateRnmCallbackResult = (rule, sysData, charsLeft, down) => {\n if (sysData.phraseLength > charsLeft) {\n let str = `${thisFileName}opRNM(${rule.name}): callback function error: `;\n str += `sysData.phraseLength: ${sysData.phraseLength}`;\n str += ` must be <= remaining chars: ${charsLeft}`;\n throw new Error(str);\n }\n switch (sysData.state) {\n case id.ACTIVE:\n if (!down) {\n throw new Error(`${thisFileName}opRNM(${rule.name}): callback function return error. ACTIVE state not allowed.`);\n }\n break;\n case id.EMPTY:\n sysData.phraseLength = 0;\n break;\n case id.MATCH:\n if (sysData.phraseLength === 0) {\n sysData.state = id.EMPTY;\n }\n break;\n case id.NOMATCH:\n sysData.phraseLength = 0;\n break;\n default:\n throw new Error(`${thisFileName}opRNM(${rule.name}): callback function return error. Unrecognized return state: ${sysData.state}`);\n }\n };\n // The `RNM` operator.
\n // This operator will acts as a root node for a parse tree branch below and\n // returns the matched phrase to its parent.\n // However, its larger responsibility is handling user-defined callback functions and `AST` nodes.\n // Note that the `AST` is a separate object, but `RNM` calls its functions to create its nodes.\n const opRNM = (opIndex, phraseIndex) => {\n let astLength;\n let astDefined;\n let savedOpcodes;\n const op = opcodes[opIndex];\n const rule = rules[op.index];\n const callback = ruleCallbacks[rule.index];\n /* ignore AST in look ahead (AND or NOT operator above) */\n if (!lookAhead) {\n astDefined = p.ast && p.ast.ruleDefined(op.index);\n if (astDefined) {\n astLength = p.ast.getLength();\n p.ast.down(op.index, rules[op.index].name);\n }\n }\n if (callback) {\n /* call user's callback going down the parse tree*/\n const charsLeft = chars.length - phraseIndex;\n callback(sysData, chars, phraseIndex, userData);\n validateRnmCallbackResult(rule, sysData, charsLeft, true);\n if (sysData.state === id.ACTIVE) {\n savedOpcodes = opcodes;\n opcodes = rule.opcodes;\n opExecute(0, phraseIndex);\n opcodes = savedOpcodes;\n /* call user's callback going up the parse tree*/\n callback(sysData, chars, phraseIndex, userData);\n validateRnmCallbackResult(rule, sysData, charsLeft, false);\n } /* implied else clause: just accept the callback sysData - RNM acting as UDT */\n } else {\n /* no callback - just execute the rule */\n savedOpcodes = opcodes;\n opcodes = rule.opcodes;\n opExecute(0, phraseIndex, sysData);\n opcodes = savedOpcodes;\n }\n if (!lookAhead) {\n /* end AST */\n if (astDefined) {\n if (sysData.state === id.NOMATCH) {\n p.ast.setLength(astLength);\n } else {\n p.ast.up(op.index, rule.name, phraseIndex, sysData.phraseLength);\n }\n }\n }\n };\n // The `TRG` operator.
\n // Succeeds if the single first character of the phrase is\n // within the `min - max` range.\n const opTRG = (opIndex, phraseIndex) => {\n const op = opcodes[opIndex];\n sysData.state = id.NOMATCH;\n if (phraseIndex < chars.length) {\n if (op.min <= chars[phraseIndex] && chars[phraseIndex] <= op.max) {\n sysData.state = id.MATCH;\n sysData.phraseLength = 1;\n }\n }\n };\n // The `TBS` operator.
\n // Matches its pre-defined phrase against the input string.\n // All characters must match exactly.\n // Case-sensitive literal strings (`'string'` & `%s\"string\"`) are translated to `TBS`\n // operators by `apg`.\n // Phrase length of zero is not allowed.\n // Empty phrases can only be defined with `TLS` operators.\n const opTBS = (opIndex, phraseIndex) => {\n const op = opcodes[opIndex];\n const len = op.string.length;\n sysData.state = id.NOMATCH;\n if (phraseIndex + len <= chars.length) {\n for (let i = 0; i < len; i += 1) {\n if (chars[phraseIndex + i] !== op.string[i]) {\n return;\n }\n }\n sysData.state = id.MATCH;\n sysData.phraseLength = len;\n } /* implied else NOMATCH */\n };\n // The `TLS` operator.
\n // Matches its pre-defined phrase against the input string.\n // A case-insensitive match is attempted for ASCII alphbetical characters.\n // `TLS` is the only operator that explicitly allows empty phrases.\n // `apg` will fail for empty `TBS`, case-sensitive strings (`''`) or\n // zero repetitions (`0*0RuleName` or `0RuleName`).\n const opTLS = (opIndex, phraseIndex) => {\n let code;\n const op = opcodes[opIndex];\n sysData.state = id.NOMATCH;\n const len = op.string.length;\n if (len === 0) {\n /* EMPTY match allowed for TLS */\n sysData.state = id.EMPTY;\n return;\n }\n if (phraseIndex + len <= chars.length) {\n for (let i = 0; i < len; i += 1) {\n code = chars[phraseIndex + i];\n if (code >= 65 && code <= 90) {\n code += 32;\n }\n if (code !== op.string[i]) {\n return;\n }\n }\n sysData.state = id.MATCH;\n sysData.phraseLength = len;\n } /* implied else NOMATCH */\n };\n // Validate the callback function's returned sysData values.\n // It's the user's responsibility to get it right but `UDT` fails if not.\n const validateUdtCallbackResult = (udt, sysData, charsLeft) => {\n if (sysData.phraseLength > charsLeft) {\n let str = `${thisFileName}opUDT(${udt.name}): callback function error: `;\n str += `sysData.phraseLength: ${sysData.phraseLength}`;\n str += ` must be <= remaining chars: ${charsLeft}`;\n throw new Error(str);\n }\n switch (sysData.state) {\n case id.ACTIVE:\n throw new Error(`${thisFileName}opUDT(${udt.name}) ACTIVE state return not allowed.`);\n case id.EMPTY:\n if (udt.empty) {\n sysData.phraseLength = 0;\n } else {\n throw new Error(`${thisFileName}opUDT(${udt.name}) may not return EMPTY.`);\n }\n break;\n case id.MATCH:\n if (sysData.phraseLength === 0) {\n if (udt.empty) {\n sysData.state = id.EMPTY;\n } else {\n throw new Error(`${thisFileName}opUDT(${udt.name}) may not return EMPTY.`);\n }\n }\n break;\n case id.NOMATCH:\n sysData.phraseLength = 0;\n break;\n default:\n throw new Error(`${thisFileName}opUDT(${udt.name}): callback function return error. Unrecognized return state: ${sysData.state}`);\n }\n };\n // The `UDT` operator.
\n // Simply calls the user's callback function, but operates like `RNM` with regard to the `AST`\n // and back referencing.\n // There is some ambiguity here. `UDT`s act as terminals for phrase recognition but as named rules\n // for `AST` nodes and back referencing.\n // See [`ast.js`](./ast.html) for usage.\n const opUDT = (opIndex, phraseIndex) => {\n let astLength;\n let astIndex;\n let astDefined;\n const op = opcodes[opIndex];\n const udt = udts[op.index];\n sysData.UdtIndex = udt.index;\n /* ignore AST in look ahead */\n if (!lookAhead) {\n astDefined = p.ast && p.ast.udtDefined(op.index);\n if (astDefined) {\n astIndex = rules.length + op.index;\n astLength = p.ast.getLength();\n p.ast.down(astIndex, udt.name);\n }\n }\n /* call the UDT */\n const charsLeft = chars.length - phraseIndex;\n udtCallbacks[op.index](sysData, chars, phraseIndex, userData);\n validateUdtCallbackResult(udt, sysData, charsLeft);\n if (!lookAhead) {\n /* end AST */\n if (astDefined) {\n if (sysData.state === id.NOMATCH) {\n p.ast.setLength(astLength);\n } else {\n p.ast.up(astIndex, udt.name, phraseIndex, sysData.phraseLength);\n }\n }\n }\n };\n // The `AND` operator.
\n // This is the positive `look ahead` operator.\n // Executes its single child node, returning the EMPTY state\n // if it succeedsand NOMATCH if it fails.\n // *Always* backtracks on any matched phrase and returns EMPTY on success.\n const opAND = (opIndex, phraseIndex) => {\n lookAhead += 1;\n opExecute(opIndex + 1, phraseIndex);\n lookAhead -= 1;\n sysData.phraseLength = 0;\n switch (sysData.state) {\n case id.EMPTY:\n sysData.state = id.EMPTY;\n break;\n case id.MATCH:\n sysData.state = id.EMPTY;\n break;\n case id.NOMATCH:\n sysData.state = id.NOMATCH;\n break;\n default:\n throw new Error(`opAND: invalid state ${sysData.state}`);\n }\n };\n // The `NOT` operator.
\n // This is the negative `look ahead` operator.\n // Executes its single child node, returning the EMPTY state\n // if it *fails* and NOMATCH if it succeeds.\n // *Always* backtracks on any matched phrase and returns EMPTY\n // on success (failure of its child node).\n const opNOT = (opIndex, phraseIndex) => {\n lookAhead += 1;\n opExecute(opIndex + 1, phraseIndex);\n lookAhead -= 1;\n sysData.phraseLength = 0;\n switch (sysData.state) {\n case id.EMPTY:\n case id.MATCH:\n sysData.state = id.NOMATCH;\n break;\n case id.NOMATCH:\n sysData.state = id.EMPTY;\n break;\n default:\n throw new Error(`opNOT: invalid state ${sysData.state}`);\n }\n };\n const opExecute = (opIndex, phraseIndex) => {\n const functionName = `${thisFileName}opExecute(): `;\n const op = opcodes[opIndex];\n nodeHits += 1;\n if (treeDepth > maxTreeDepth) {\n maxTreeDepth = treeDepth;\n }\n treeDepth += 1;\n sysData.refresh();\n if (p.trace) {\n p.trace.down(op, phraseIndex);\n }\n switch (op.type) {\n case id.ALT:\n opALT(opIndex, phraseIndex);\n break;\n case id.CAT:\n opCAT(opIndex, phraseIndex);\n break;\n case id.REP:\n opREP(opIndex, phraseIndex);\n break;\n case id.RNM:\n opRNM(opIndex, phraseIndex);\n break;\n case id.TRG:\n opTRG(opIndex, phraseIndex);\n break;\n case id.TBS:\n opTBS(opIndex, phraseIndex);\n break;\n case id.TLS:\n opTLS(opIndex, phraseIndex);\n break;\n case id.UDT:\n opUDT(opIndex, phraseIndex);\n break;\n case id.AND:\n opAND(opIndex, phraseIndex);\n break;\n case id.NOT:\n opNOT(opIndex, phraseIndex);\n break;\n default:\n throw new Error(`${functionName}unrecognized operator`);\n }\n if (!lookAhead) {\n if (phraseIndex + sysData.phraseLength > maxMatched) {\n maxMatched = phraseIndex + sysData.phraseLength;\n }\n }\n if (p.stats) {\n p.stats.collect(op, sysData);\n }\n if (p.trace) {\n p.trace.up(op, sysData.state, phraseIndex, sysData.phraseLength);\n }\n treeDepth -= 1;\n };\n};\nconst Ast = function fnast() {\n const thisFileName = 'parser.js: Ast()): ';\n const id = identifiers;\n const utils = utilities;\n const a = this;\n let rules = undefined;\n let udts = undefined;\n let chars = undefined;\n let nodeCount = 0;\n const nodeCallbacks = [];\n const stack = [];\n const records = [];\n a.callbacks = [];\n /* called by the parser to initialize the AST with the rules, UDTs and the input characters */\n a.init = (rulesIn, udtsIn, charsIn) => {\n stack.length = 0;\n records.length = 0;\n nodeCount = 0;\n rules = rulesIn;\n udts = udtsIn;\n chars = charsIn;\n let i;\n const list = [];\n for (i = 0; i < rules.length; i += 1) {\n list.push(rules[i].lower);\n }\n for (i = 0; i < udts.length; i += 1) {\n list.push(udts[i].lower);\n }\n nodeCount = rules.length + udts.length;\n for (i = 0; i < nodeCount; i += 1) {\n nodeCallbacks[i] = undefined;\n }\n for (const index in a.callbacks) {\n if (a.callbacks.hasOwnProperty(index)) {\n const lower = index.toLowerCase();\n i = list.indexOf(lower);\n if (i < 0) {\n throw new Error(`${thisFileName}init: node '${index}' not a rule or udt name`);\n }\n nodeCallbacks[i] = a.callbacks[index];\n }\n }\n };\n /* AST node rule callbacks - called by the parser's `RNM` operator */\n a.ruleDefined = index => !!nodeCallbacks[index];\n /* AST node UDT callbacks - called by the parser's `UDT` operator */\n a.udtDefined = index => !!nodeCallbacks[rules.length + index];\n /* called by the parser's `RNM` & `UDT` operators\n builds a record for the downward traversal of the node */\n a.down = (callbackIndex, name) => {\n const thisIndex = records.length;\n stack.push(thisIndex);\n records.push({\n name,\n thisIndex,\n thatIndex: undefined,\n state: id.SEM_PRE,\n callbackIndex,\n phraseIndex: undefined,\n phraseLength: undefined,\n stack: stack.length\n });\n return thisIndex;\n };\n /* called by the parser's `RNM` & `UDT` operators */\n /* builds a record for the upward traversal of the node */\n a.up = (callbackIndex, name, phraseIndex, phraseLength) => {\n const thisIndex = records.length;\n const thatIndex = stack.pop();\n records.push({\n name,\n thisIndex,\n thatIndex,\n state: id.SEM_POST,\n callbackIndex,\n phraseIndex,\n phraseLength,\n stack: stack.length\n });\n records[thatIndex].thatIndex = thisIndex;\n records[thatIndex].phraseIndex = phraseIndex;\n records[thatIndex].phraseLength = phraseLength;\n return thisIndex;\n };\n // Called by the user to translate the AST.\n // Translate means to associate or apply some semantic action to the\n // phrases that were syntactically matched to the AST nodes according\n // to the defining grammar.\n // ```\n // data - optional user-defined data\n // passed to the callback functions by the translator\n // ```\n a.translate = data => {\n let ret;\n let callback;\n let record;\n for (let i = 0; i < records.length; i += 1) {\n record = records[i];\n callback = nodeCallbacks[record.callbackIndex];\n if (callback) {\n if (record.state === id.SEM_PRE) {\n callback(id.SEM_PRE, chars, record.phraseIndex, record.phraseLength, data);\n } else if (callback) {\n callback(id.SEM_POST, chars, record.phraseIndex, record.phraseLength, data);\n }\n }\n }\n };\n /* called by the parser to reset the length of the records array */\n /* necessary on backtracking */\n a.setLength = length => {\n records.length = length;\n if (length > 0) {\n stack.length = records[length - 1].stack;\n } else {\n stack.length = 0;\n }\n };\n /* called by the parser to get the length of the records array */\n a.getLength = () => records.length;\n /* helper for XML display */\n function indent(n) {\n let ret = '';\n while (n-- > 0) {\n ret += ' ';\n }\n return ret;\n }\n // Generate an `XML` version of the AST.\n // Useful if you want to use a special or favorite XML parser to translate the\n // AST. Node data are JavaScript strings.\n a.toXml = () => {\n let xml = '';\n let depth = 0;\n xml += '\\n';\n xml += `\\n`;\n xml += `\\n`;\n xml += indent(depth + 2);\n xml += utils.charsToString(chars);\n xml += '\\n';\n records.forEach(rec => {\n if (rec.state === id.SEM_PRE) {\n depth += 1;\n xml += indent(depth);\n xml += `\\n`;\n xml += indent(depth + 2);\n xml += utils.charsToString(chars, rec.phraseIndex, rec.phraseLength);\n xml += '\\n';\n } else {\n xml += indent(depth);\n xml += `\\n`;\n depth -= 1;\n }\n });\n xml += '\\n';\n return xml;\n };\n};\nconst Trace = function fntrace() {\n const id = identifiers;\n const utils = utilities;\n const thisFile = 'parser.js: Trace(): ';\n let chars = undefined;\n let rules = undefined;\n let udts = undefined;\n let out = '';\n let treeDepth = 0;\n const MAX_PHRASE = 100;\n const t = this;\n const indent = n => {\n let ret = '';\n let count = 0;\n if (n >= 0) {\n while (n--) {\n count += 1;\n if (count === 5) {\n ret += '|';\n count = 0;\n } else {\n ret += '.';\n }\n }\n }\n return ret;\n };\n t.init = (r, u, c) => {\n rules = r;\n udts = u;\n chars = c;\n };\n const opName = op => {\n let name;\n switch (op.type) {\n case id.ALT:\n name = 'ALT';\n break;\n case id.CAT:\n name = 'CAT';\n break;\n case id.REP:\n if (op.max === Infinity) {\n name = `REP(${op.min},inf)`;\n } else {\n name = `REP(${op.min},${op.max})`;\n }\n break;\n case id.RNM:\n name = `RNM(${rules[op.index].name})`;\n break;\n case id.TRG:\n name = `TRG(${op.min},${op.max})`;\n break;\n case id.TBS:\n if (op.string.length > 6) {\n name = `TBS(${utils.charsToString(op.string, 0, 3)}...)`;\n } else {\n name = `TBS(${utils.charsToString(op.string, 0, 6)})`;\n }\n break;\n case id.TLS:\n if (op.string.length > 6) {\n name = `TLS(${utils.charsToString(op.string, 0, 3)}...)`;\n } else {\n name = `TLS(${utils.charsToString(op.string, 0, 6)})`;\n }\n break;\n case id.UDT:\n name = `UDT(${udts[op.index].name})`;\n break;\n case id.AND:\n name = 'AND';\n break;\n case id.NOT:\n name = 'NOT';\n break;\n default:\n throw new Error(`${thisFile}Trace: opName: unrecognized opcode`);\n }\n return name;\n };\n t.down = (op, offset) => {\n const lead = indent(treeDepth);\n const len = Math.min(MAX_PHRASE, chars.length - offset);\n let phrase = utils.charsToString(chars, offset, len);\n if (len < chars.length - offset) {\n phrase += '...';\n }\n phrase = `${lead}|-|[${opName(op)}]${phrase}\\n`;\n out += phrase;\n treeDepth += 1;\n };\n t.up = (op, state, offset, phraseLength) => {\n const thisFunc = `${thisFile}trace.up: `;\n treeDepth -= 1;\n const lead = indent(treeDepth);\n let len;\n let phrase;\n let st;\n switch (state) {\n case id.EMPTY:\n st = '|E|';\n phrase = `''`;\n break;\n case id.MATCH:\n st = '|M|';\n len = Math.min(MAX_PHRASE, phraseLength);\n if (len < phraseLength) {\n phrase = `'${utils.charsToString(chars, offset, len)}...'`;\n } else {\n phrase = `'${utils.charsToString(chars, offset, len)}'`;\n }\n break;\n case id.NOMATCH:\n st = '|N|';\n phrase = '';\n break;\n default:\n throw new Error(`${thisFunc} unrecognized state`);\n }\n phrase = `${lead}${st}[${opName(op)}]${phrase}\\n`;\n out += phrase;\n };\n t.displayTrace = () => out;\n};\nconst Stats = function fnstats() {\n const id = identifiers;\n const thisFileName = 'parser.js: Stats(): ';\n let rules;\n let udts;\n let totals;\n const stats = [];\n const ruleStats = [];\n const udtStats = [];\n /* called by parser to initialize the stats */\n this.init = (r, u) => {\n rules = r;\n udts = u;\n clear();\n };\n /* This function is the main interaction with the parser. */\n /* The parser calls it after each node has been traversed. */\n this.collect = (op, sys) => {\n incStat(totals, sys.state, sys.phraseLength);\n incStat(stats[op.type], sys.state, sys.phraseLength);\n if (op.type === id.RNM) {\n incStat(ruleStats[op.index], sys.state, sys.phraseLength);\n }\n if (op.type === id.UDT) {\n incStat(udtStats[op.index], sys.state, sys.phraseLength);\n }\n };\n this.displayStats = () => {\n let out = '';\n const totals = {\n match: 0,\n empty: 0,\n nomatch: 0,\n total: 0\n };\n const displayRow = (op, m, e, n, t) => {\n totals.match += m;\n totals.empty += e;\n totals.nomatch += n;\n totals.total += t;\n const mm = normalize(m);\n const ee = normalize(e);\n const nn = normalize(n);\n const tt = normalize(t);\n return `${op} | ${mm} | ${ee} | ${nn} | ${tt} |\\n`;\n };\n out += ' OPERATOR STATS\\n';\n out += ' | MATCH | EMPTY | NOMATCH | TOTAL |\\n';\n out += displayRow(' ALT', stats[id.ALT].match, stats[id.ALT].empty, stats[id.ALT].nomatch, stats[id.ALT].total);\n out += displayRow(' CAT', stats[id.CAT].match, stats[id.CAT].empty, stats[id.CAT].nomatch, stats[id.CAT].total);\n out += displayRow(' REP', stats[id.REP].match, stats[id.REP].empty, stats[id.REP].nomatch, stats[id.REP].total);\n out += displayRow(' RNM', stats[id.RNM].match, stats[id.RNM].empty, stats[id.RNM].nomatch, stats[id.RNM].total);\n out += displayRow(' TRG', stats[id.TRG].match, stats[id.TRG].empty, stats[id.TRG].nomatch, stats[id.TRG].total);\n out += displayRow(' TBS', stats[id.TBS].match, stats[id.TBS].empty, stats[id.TBS].nomatch, stats[id.TBS].total);\n out += displayRow(' TLS', stats[id.TLS].match, stats[id.TLS].empty, stats[id.TLS].nomatch, stats[id.TLS].total);\n out += displayRow(' UDT', stats[id.UDT].match, stats[id.UDT].empty, stats[id.UDT].nomatch, stats[id.UDT].total);\n out += displayRow(' AND', stats[id.AND].match, stats[id.AND].empty, stats[id.AND].nomatch, stats[id.AND].total);\n out += displayRow(' NOT', stats[id.NOT].match, stats[id.NOT].empty, stats[id.NOT].nomatch, stats[id.NOT].total);\n out += displayRow('TOTAL', totals.match, totals.empty, totals.nomatch, totals.total);\n return out;\n };\n /*\n Display rule/udt\n */\n this.displayHits = type => {\n let out = '';\n const displayRow = (m, e, n, t, name) => {\n totals.match += m;\n totals.empty += e;\n totals.nomatch += n;\n totals.total += t;\n const mm = normalize(m);\n const ee = normalize(e);\n const nn = normalize(n);\n const tt = normalize(t);\n return `| ${mm} | ${ee} | ${nn} | ${tt} | ${name}\\n`;\n };\n if (typeof type === 'string' && type.toLowerCase()[0] === 'a') {\n ruleStats.sort(sortAlpha);\n udtStats.sort(sortAlpha);\n out += ' RULES/UDTS ALPHABETICALLY\\n';\n } else if (typeof type === 'string' && type.toLowerCase()[0] === 'i') {\n ruleStats.sort(sortIndex);\n udtStats.sort(sortIndex);\n out += ' RULES/UDTS BY INDEX\\n';\n } else {\n ruleStats.sort(sortHits);\n udtStats.sort(sortHits);\n out += ' RULES/UDTS BY HIT COUNT\\n';\n }\n out += '| MATCH | EMPTY | NOMATCH | TOTAL | NAME\\n';\n for (let i = 0; i < ruleStats.length; i += 1) {\n let r = ruleStats[i];\n if (r.total) {\n out += displayRow(r.match, r.empty, r.nomatch, r.total, r.name);\n }\n }\n for (let i = 0; i < udtStats.length; i += 1) {\n let r = udtStats[i];\n if (r.total) {\n out += displayRow(r.match, r.empty, r.nomatch, r.total, r.name);\n }\n }\n return out;\n };\n const normalize = n => {\n if (n < 10) {\n return ` ${n}`;\n }\n if (n < 100) {\n return ` ${n}`;\n }\n if (n < 1000) {\n return ` ${n}`;\n }\n if (n < 10000) {\n return ` ${n}`;\n }\n if (n < 100000) {\n return ` ${n}`;\n }\n if (n < 1000000) {\n return ` ${n}`;\n }\n return `${n}`;\n };\n const sortAlpha = (lhs, rhs) => {\n if (lhs.lower < rhs.lower) {\n return -1;\n }\n if (lhs.lower > rhs.lower) {\n return 1;\n }\n return 0;\n };\n const sortHits = (lhs, rhs) => {\n if (lhs.total < rhs.total) {\n return 1;\n }\n if (lhs.total > rhs.total) {\n return -1;\n }\n return sortAlpha(lhs, rhs);\n };\n const sortIndex = (lhs, rhs) => {\n if (lhs.index < rhs.index) {\n return -1;\n }\n if (lhs.index > rhs.index) {\n return 1;\n }\n return 0;\n };\n const EmptyStat = function fnempty() {\n this.empty = 0;\n this.match = 0;\n this.nomatch = 0;\n this.total = 0;\n };\n /* Zero out all stats */\n const clear = () => {\n stats.length = 0;\n totals = new EmptyStat();\n stats[id.ALT] = new EmptyStat();\n stats[id.CAT] = new EmptyStat();\n stats[id.REP] = new EmptyStat();\n stats[id.RNM] = new EmptyStat();\n stats[id.TRG] = new EmptyStat();\n stats[id.TBS] = new EmptyStat();\n stats[id.TLS] = new EmptyStat();\n stats[id.UDT] = new EmptyStat();\n stats[id.AND] = new EmptyStat();\n stats[id.NOT] = new EmptyStat();\n ruleStats.length = 0;\n for (let i = 0; i < rules.length; i += 1) {\n ruleStats.push({\n empty: 0,\n match: 0,\n nomatch: 0,\n total: 0,\n name: rules[i].name,\n lower: rules[i].lower,\n index: rules[i].index\n });\n }\n if (udts.length > 0) {\n udtStats.length = 0;\n for (let i = 0; i < udts.length; i += 1) {\n udtStats.push({\n empty: 0,\n match: 0,\n nomatch: 0,\n total: 0,\n name: udts[i].name,\n lower: udts[i].lower,\n index: udts[i].index\n });\n }\n }\n };\n /* increment the designated operator hit count by one */\n const incStat = (stat, state) => {\n stat.total += 1;\n switch (state) {\n case id.EMPTY:\n stat.empty += 1;\n break;\n case id.MATCH:\n stat.match += 1;\n break;\n case id.NOMATCH:\n stat.nomatch += 1;\n break;\n default:\n throw new Error(`${thisFileName}collect(): incStat(): unrecognized state: ${state}`);\n }\n };\n};\nconst utilities = {\n // utility functions\n stringToChars: string => [...string].map(cp => cp.codePointAt(0)),\n charsToString: (chars, beg, len) => {\n let subChars = chars;\n while (1) {\n if (beg === undefined || beg < 0) {\n break;\n }\n if (len === undefined) {\n subChars = chars.slice(beg);\n break;\n }\n if (len <= 0) {\n // always an empty string\n return '';\n }\n subChars = chars.slice(beg, beg + len);\n break;\n }\n return String.fromCodePoint(...subChars);\n }\n};\nconst identifiers = {\n // Identifies the operator type.\n // NB: These must match the values in apg-js 4.3.0, apg-lib/identifiers.\n /* the original ABNF operators */\n ALT: 1 /* alternation */,\n CAT: 2 /* concatenation */,\n REP: 3 /* repetition */,\n RNM: 4 /* rule name */,\n TRG: 5 /* terminal range */,\n TBS: 6 /* terminal binary string, case sensitive */,\n TLS: 7 /* terminal literal string, case insensitive */,\n\n /* the super set, SABNF operators */\n UDT: 11 /* user-defined terminal */,\n AND: 12 /* positive look ahead */,\n NOT: 13 /* negative look ahead */,\n\n // Used by the parser and the user's `RNM` and `UDT` callback functions.\n // Identifies the parser state as it traverses the parse tree nodes.\n // - *ACTIVE* - indicates the downward direction through the parse tree node.\n // - *MATCH* - indicates the upward direction and a phrase, of length \\> 0, has been successfully matched\n // - *EMPTY* - indicates the upward direction and a phrase, of length = 0, has been successfully matched\n // - *NOMATCH* - indicates the upward direction and the parser failed to match any phrase at all\n ACTIVE: 100,\n MATCH: 101,\n EMPTY: 102,\n NOMATCH: 103,\n // Used by [`AST` translator](./ast.html) (semantic analysis) and the user's callback functions\n // to indicate the direction of flow through the `AST` nodes.\n // - *SEM_PRE* - indicates the downward (pre-branch) direction through the `AST` node.\n // - *SEM_POST* - indicates the upward (post-branch) direction through the `AST` node.\n SEM_PRE: 200,\n SEM_POST: 201,\n // Ignored. Retained for backwords compatibility.\n SEM_OK: 300,\n idName: s => {\n switch (s) {\n case identifiers.ALT:\n return 'ALT';\n case identifiers.CAT:\n return 'CAT';\n case identifiers.REP:\n return 'REP';\n case identifiers.RNM:\n return 'RNM';\n case identifiers.TRG:\n return 'TRG';\n case identifiers.TBS:\n return 'TBS';\n case identifiers.TLS:\n return 'TLS';\n case identifiers.UDT:\n return 'UDT';\n case identifiers.AND:\n return 'AND';\n case identifiers.NOT:\n return 'NOT';\n case identifiers.ACTIVE:\n return 'ACTIVE';\n case identifiers.EMPTY:\n return 'EMPTY';\n case identifiers.MATCH:\n return 'MATCH';\n case identifiers.NOMATCH:\n return 'NOMATCH';\n case identifiers.SEM_PRE:\n return 'SEM_PRE';\n case identifiers.SEM_POST:\n return 'SEM_POST';\n case identifiers.SEM_OK:\n return 'SEM_OK';\n default:\n return 'UNRECOGNIZED STATE';\n }\n }\n};","import { identifiers, utilities } from 'apg-lite';\nconst serverUrlTemplate = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n if (Array.isArray(data) === false) {\n throw new Error(\"parser's user data must be an array\");\n }\n data.push(['server-url-template', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n }\n return identifiers.SEM_OK;\n};\nexport default serverUrlTemplate;","import { identifiers, utilities } from 'apg-lite';\nconst serverVariable = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n if (Array.isArray(data) === false) {\n throw new Error(\"parser's user data must be an array\");\n }\n data.push(['server-variable', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n }\n return identifiers.SEM_OK;\n};\nexport default serverVariable;","import { identifiers, utilities } from 'apg-lite';\nconst serverVariableName = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n if (Array.isArray(data) === false) {\n throw new Error(\"parser's user data must be an array\");\n }\n data.push(['server-variable-name', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n }\n return identifiers.SEM_OK;\n};\nexport default serverVariableName;","import { identifiers, utilities } from 'apg-lite';\nconst literals = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n if (Array.isArray(data) === false) {\n throw new Error(\"parser's user data must be an array\");\n }\n data.push(['literals', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n }\n return identifiers.SEM_OK;\n};\nexport default literals;","import { Ast as AST, Parser } from 'apg-lite';\nimport Grammar from \"../server-url-templating.mjs\";\nimport serverURLTemplateCallback from \"./callbacks/server-url-template.mjs\";\nimport serverVariableCallback from \"./callbacks/server-variable.mjs\";\nimport serverVariableNameCallback from \"./callbacks/server-variable-name.mjs\";\nimport literalsCallback from \"./callbacks/literals.mjs\";\nconst grammar = new Grammar();\nconst parse = serverURLTemplate => {\n const parser = new Parser();\n parser.ast = new AST();\n parser.ast.callbacks['server-url-template'] = serverURLTemplateCallback;\n parser.ast.callbacks['server-variable'] = serverVariableCallback;\n parser.ast.callbacks['server-variable-name'] = serverVariableNameCallback;\n parser.ast.callbacks['literals'] = literalsCallback;\n const result = parser.parse(grammar, 'server-url-template', serverURLTemplate);\n return {\n result,\n ast: parser.ast\n };\n};\nexport default parse;","import parse from \"./parse/index.mjs\";\n/**\n * Test if a string is a server URL template.\n *\n * @param {string} serverURLTemplate\n * @param {Object} [options={}] - An object.\n * @param {boolean} [options.strict=true] - A boolean indicating presence of at least one `Server Variable` AST node.\n * @returns {boolean}\n */\nconst test = (serverURLTemplate, {\n strict = false\n} = {}) => {\n try {\n const parseResult = parse(serverURLTemplate);\n if (!parseResult.result.success) return false;\n const parts = [];\n parseResult.ast.translate(parts);\n const hasServerVariable = parts.some(([type]) => type === 'server-variable');\n if (!strict && !hasServerVariable) {\n try {\n new URL(serverURLTemplate, 'https://vladimirgorej.com');\n return true;\n } catch {\n return false;\n }\n }\n return strict ? hasServerVariable : true;\n } catch {\n return false;\n }\n};\nexport default test;","import parse from \"./parse/index.mjs\";\nconst isEncoded = serverVariableValue => {\n try {\n return typeof serverVariableValue === 'string' && decodeURIComponent(serverVariableValue) !== serverVariableValue;\n } catch {\n return false;\n }\n};\nexport const encodeServerVariable = serverVariableValue => {\n if (isEncoded(serverVariableValue)) {\n return serverVariableValue;\n }\n return encodeURIComponent(serverVariableValue).replace(/%5B/g, '[').replace(/%5D/g, ']');\n};\nconst significantTypes = ['literals', 'server-variable-name'];\nconst substitute = (serverURLTemplate, serverVariables, options = {}) => {\n const defaultOptions = {\n encoder: encodeServerVariable\n };\n const mergedOptions = {\n ...defaultOptions,\n ...options\n };\n const parseResult = parse(serverURLTemplate);\n if (!parseResult.result.success) return serverURLTemplate;\n const parts = [];\n parseResult.ast.translate(parts);\n const substitutedParts = parts.filter(([type]) => significantTypes.includes(type)).map(([type, value]) => {\n if (type === 'server-variable-name') {\n return Object.hasOwn(serverVariables, value) ? mergedOptions.encoder(serverVariables[value], value) : `{${value}}`;\n }\n return value;\n });\n return substitutedParts.join('');\n};\nexport default substitute;","// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved
\n// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
\n//\n// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)\nexport default function grammar() {\n // ```\n // SUMMARY\n // rules = 13\n // udts = 0\n // opcodes = 65\n // --- ABNF original opcodes\n // ALT = 7\n // CAT = 4\n // REP = 5\n // RNM = 16\n // TLS = 27\n // TBS = 1\n // TRG = 5\n // --- SABNF superset opcodes\n // UDT = 0\n // AND = 0\n // NOT = 0\n // characters = [0 - 1114111]\n // ```\n /* OBJECT IDENTIFIER (for internal parser use) */\n this.grammarObject = 'grammarObject';\n\n /* RULES */\n this.rules = [];\n this.rules[0] = {\n name: 'path-template',\n lower: 'path-template',\n index: 0,\n isBkr: false\n };\n this.rules[1] = {\n name: 'path-segment',\n lower: 'path-segment',\n index: 1,\n isBkr: false\n };\n this.rules[2] = {\n name: 'slash',\n lower: 'slash',\n index: 2,\n isBkr: false\n };\n this.rules[3] = {\n name: 'path-literal',\n lower: 'path-literal',\n index: 3,\n isBkr: false\n };\n this.rules[4] = {\n name: 'template-expression',\n lower: 'template-expression',\n index: 4,\n isBkr: false\n };\n this.rules[5] = {\n name: 'template-expression-param-name',\n lower: 'template-expression-param-name',\n index: 5,\n isBkr: false\n };\n this.rules[6] = {\n name: 'pchar',\n lower: 'pchar',\n index: 6,\n isBkr: false\n };\n this.rules[7] = {\n name: 'unreserved',\n lower: 'unreserved',\n index: 7,\n isBkr: false\n };\n this.rules[8] = {\n name: 'pct-encoded',\n lower: 'pct-encoded',\n index: 8,\n isBkr: false\n };\n this.rules[9] = {\n name: 'sub-delims',\n lower: 'sub-delims',\n index: 9,\n isBkr: false\n };\n this.rules[10] = {\n name: 'ALPHA',\n lower: 'alpha',\n index: 10,\n isBkr: false\n };\n this.rules[11] = {\n name: 'DIGIT',\n lower: 'digit',\n index: 11,\n isBkr: false\n };\n this.rules[12] = {\n name: 'HEXDIG',\n lower: 'hexdig',\n index: 12,\n isBkr: false\n };\n\n /* UDTS */\n this.udts = [];\n\n /* OPCODES */\n /* path-template */\n this.rules[0].opcodes = [];\n this.rules[0].opcodes[0] = {\n type: 2,\n children: [1, 2, 6]\n }; // CAT\n this.rules[0].opcodes[1] = {\n type: 4,\n index: 2\n }; // RNM(slash)\n this.rules[0].opcodes[2] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[0].opcodes[3] = {\n type: 2,\n children: [4, 5]\n }; // CAT\n this.rules[0].opcodes[4] = {\n type: 4,\n index: 1\n }; // RNM(path-segment)\n this.rules[0].opcodes[5] = {\n type: 4,\n index: 2\n }; // RNM(slash)\n this.rules[0].opcodes[6] = {\n type: 3,\n min: 0,\n max: 1\n }; // REP\n this.rules[0].opcodes[7] = {\n type: 4,\n index: 1\n }; // RNM(path-segment)\n\n /* path-segment */\n this.rules[1].opcodes = [];\n this.rules[1].opcodes[0] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[1].opcodes[1] = {\n type: 1,\n children: [2, 3]\n }; // ALT\n this.rules[1].opcodes[2] = {\n type: 4,\n index: 3\n }; // RNM(path-literal)\n this.rules[1].opcodes[3] = {\n type: 4,\n index: 4\n }; // RNM(template-expression)\n\n /* slash */\n this.rules[2].opcodes = [];\n this.rules[2].opcodes[0] = {\n type: 7,\n string: [47]\n }; // TLS\n\n /* path-literal */\n this.rules[3].opcodes = [];\n this.rules[3].opcodes[0] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[3].opcodes[1] = {\n type: 4,\n index: 6\n }; // RNM(pchar)\n\n /* template-expression */\n this.rules[4].opcodes = [];\n this.rules[4].opcodes[0] = {\n type: 2,\n children: [1, 2, 3]\n }; // CAT\n this.rules[4].opcodes[1] = {\n type: 7,\n string: [123]\n }; // TLS\n this.rules[4].opcodes[2] = {\n type: 4,\n index: 5\n }; // RNM(template-expression-param-name)\n this.rules[4].opcodes[3] = {\n type: 7,\n string: [125]\n }; // TLS\n\n /* template-expression-param-name */\n this.rules[5].opcodes = [];\n this.rules[5].opcodes[0] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[5].opcodes[1] = {\n type: 1,\n children: [2, 3, 4]\n }; // ALT\n this.rules[5].opcodes[2] = {\n type: 5,\n min: 0,\n max: 122\n }; // TRG\n this.rules[5].opcodes[3] = {\n type: 6,\n string: [124]\n }; // TBS\n this.rules[5].opcodes[4] = {\n type: 5,\n min: 126,\n max: 1114111\n }; // TRG\n\n /* pchar */\n this.rules[6].opcodes = [];\n this.rules[6].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5]\n }; // ALT\n this.rules[6].opcodes[1] = {\n type: 4,\n index: 7\n }; // RNM(unreserved)\n this.rules[6].opcodes[2] = {\n type: 4,\n index: 8\n }; // RNM(pct-encoded)\n this.rules[6].opcodes[3] = {\n type: 4,\n index: 9\n }; // RNM(sub-delims)\n this.rules[6].opcodes[4] = {\n type: 7,\n string: [58]\n }; // TLS\n this.rules[6].opcodes[5] = {\n type: 7,\n string: [64]\n }; // TLS\n\n /* unreserved */\n this.rules[7].opcodes = [];\n this.rules[7].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5, 6]\n }; // ALT\n this.rules[7].opcodes[1] = {\n type: 4,\n index: 10\n }; // RNM(ALPHA)\n this.rules[7].opcodes[2] = {\n type: 4,\n index: 11\n }; // RNM(DIGIT)\n this.rules[7].opcodes[3] = {\n type: 7,\n string: [45]\n }; // TLS\n this.rules[7].opcodes[4] = {\n type: 7,\n string: [46]\n }; // TLS\n this.rules[7].opcodes[5] = {\n type: 7,\n string: [95]\n }; // TLS\n this.rules[7].opcodes[6] = {\n type: 7,\n string: [126]\n }; // TLS\n\n /* pct-encoded */\n this.rules[8].opcodes = [];\n this.rules[8].opcodes[0] = {\n type: 2,\n children: [1, 2, 3]\n }; // CAT\n this.rules[8].opcodes[1] = {\n type: 7,\n string: [37]\n }; // TLS\n this.rules[8].opcodes[2] = {\n type: 4,\n index: 12\n }; // RNM(HEXDIG)\n this.rules[8].opcodes[3] = {\n type: 4,\n index: 12\n }; // RNM(HEXDIG)\n\n /* sub-delims */\n this.rules[9].opcodes = [];\n this.rules[9].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n }; // ALT\n this.rules[9].opcodes[1] = {\n type: 7,\n string: [33]\n }; // TLS\n this.rules[9].opcodes[2] = {\n type: 7,\n string: [36]\n }; // TLS\n this.rules[9].opcodes[3] = {\n type: 7,\n string: [38]\n }; // TLS\n this.rules[9].opcodes[4] = {\n type: 7,\n string: [39]\n }; // TLS\n this.rules[9].opcodes[5] = {\n type: 7,\n string: [40]\n }; // TLS\n this.rules[9].opcodes[6] = {\n type: 7,\n string: [41]\n }; // TLS\n this.rules[9].opcodes[7] = {\n type: 7,\n string: [42]\n }; // TLS\n this.rules[9].opcodes[8] = {\n type: 7,\n string: [43]\n }; // TLS\n this.rules[9].opcodes[9] = {\n type: 7,\n string: [44]\n }; // TLS\n this.rules[9].opcodes[10] = {\n type: 7,\n string: [59]\n }; // TLS\n this.rules[9].opcodes[11] = {\n type: 7,\n string: [61]\n }; // TLS\n\n /* ALPHA */\n this.rules[10].opcodes = [];\n this.rules[10].opcodes[0] = {\n type: 1,\n children: [1, 2]\n }; // ALT\n this.rules[10].opcodes[1] = {\n type: 5,\n min: 65,\n max: 90\n }; // TRG\n this.rules[10].opcodes[2] = {\n type: 5,\n min: 97,\n max: 122\n }; // TRG\n\n /* DIGIT */\n this.rules[11].opcodes = [];\n this.rules[11].opcodes[0] = {\n type: 5,\n min: 48,\n max: 57\n }; // TRG\n\n /* HEXDIG */\n this.rules[12].opcodes = [];\n this.rules[12].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5, 6, 7]\n }; // ALT\n this.rules[12].opcodes[1] = {\n type: 4,\n index: 11\n }; // RNM(DIGIT)\n this.rules[12].opcodes[2] = {\n type: 7,\n string: [97]\n }; // TLS\n this.rules[12].opcodes[3] = {\n type: 7,\n string: [98]\n }; // TLS\n this.rules[12].opcodes[4] = {\n type: 7,\n string: [99]\n }; // TLS\n this.rules[12].opcodes[5] = {\n type: 7,\n string: [100]\n }; // TLS\n this.rules[12].opcodes[6] = {\n type: 7,\n string: [101]\n }; // TLS\n this.rules[12].opcodes[7] = {\n type: 7,\n string: [102]\n }; // TLS\n\n // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n this.toString = function toString() {\n let str = \"\";\n str += \"; OpenAPI Path Templating ABNF syntax\\n\";\n str += \"; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\n\";\n str += \"path-template = slash *( path-segment slash ) [ path-segment ]\\n\";\n str += \"path-segment = 1*( path-literal / template-expression )\\n\";\n str += \"slash = \\\"/\\\"\\n\";\n str += \"path-literal = 1*pchar\\n\";\n str += \"template-expression = \\\"{\\\" template-expression-param-name \\\"}\\\"\\n\";\n str += \"template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\";\n str += \"\\n\";\n str += \"; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\n\";\n str += \"pchar = unreserved / pct-encoded / sub-delims / \\\":\\\" / \\\"@\\\"\\n\";\n str += \"unreserved = ALPHA / DIGIT / \\\"-\\\" / \\\".\\\" / \\\"_\\\" / \\\"~\\\"\\n\";\n str += \" ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\\n\";\n str += \"pct-encoded = \\\"%\\\" HEXDIG HEXDIG\\n\";\n str += \" ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1\\n\";\n str += \"sub-delims = \\\"!\\\" / \\\"$\\\" / \\\"&\\\" / \\\"'\\\" / \\\"(\\\" / \\\")\\\"\\n\";\n str += \" / \\\"*\\\" / \\\"+\\\" / \\\",\\\" / \\\";\\\" / \\\"=\\\"\\n\";\n str += \" ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\\n\";\n str += \"\\n\";\n str += \"; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\n\";\n str += \"ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\\n\";\n str += \"DIGIT = %x30-39 ; 0-9\\n\";\n str += \"HEXDIG = DIGIT / \\\"A\\\" / \\\"B\\\" / \\\"C\\\" / \\\"D\\\" / \\\"E\\\" / \\\"F\\\"\\n\";\n return str;\n };\n}","import { identifiers, utilities } from 'apg-lite';\nconst slash = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n data.push(['slash', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n } else if (state === identifiers.SEM_POST) {\n /* not used in this example */\n }\n return identifiers.SEM_OK;\n};\nexport default slash;","import { identifiers, utilities } from 'apg-lite';\nconst pathTemplate = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n if (Array.isArray(data) === false) {\n throw new Error(\"parser's user data must be an array\");\n }\n data.push(['path-template', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n }\n return identifiers.SEM_OK;\n};\nexport default pathTemplate;","import { identifiers, utilities } from 'apg-lite';\nconst pathLiteral = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n data.push(['path-literal', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n } else if (state === identifiers.SEM_POST) {\n /* not used in this example */\n }\n return identifiers.SEM_OK;\n};\nexport default pathLiteral;","import { identifiers, utilities } from 'apg-lite';\nconst templateExpression = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n data.push(['template-expression', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n } else if (state === identifiers.SEM_POST) {\n /* not used in this example */\n }\n return identifiers.SEM_OK;\n};\nexport default templateExpression;","import { identifiers, utilities } from 'apg-lite';\nconst templateExpressionParamName = (state, chars, phraseIndex, phraseLength, data) => {\n if (state === identifiers.SEM_PRE) {\n data.push(['template-expression-param-name', utilities.charsToString(chars, phraseIndex, phraseLength)]);\n } else if (state === identifiers.SEM_POST) {\n /* not used in this example */\n }\n return identifiers.SEM_OK;\n};\nexport default templateExpressionParamName;","import { Ast as AST, Parser } from 'apg-lite';\nimport Grammar from \"../path-templating.mjs\";\nimport slashCallback from \"./callbacks/slash.mjs\";\nimport pathTemplateCallback from \"./callbacks/path-template.mjs\";\nimport pathLiteralCallback from \"./callbacks/path-literal.mjs\";\nimport templateExpressionCallback from \"./callbacks/template-expression.mjs\";\nimport templateExpressionParamNameCallback from \"./callbacks/template-expression-param-name.mjs\";\nconst grammar = new Grammar();\nconst parse = pathTemplate => {\n const parser = new Parser();\n parser.ast = new AST();\n parser.ast.callbacks['path-template'] = pathTemplateCallback;\n parser.ast.callbacks['slash'] = slashCallback;\n parser.ast.callbacks['path-literal'] = pathLiteralCallback;\n parser.ast.callbacks['template-expression'] = templateExpressionCallback;\n parser.ast.callbacks['template-expression-param-name'] = templateExpressionParamNameCallback;\n const result = parser.parse(grammar, 'path-template', pathTemplate);\n return {\n result,\n ast: parser.ast\n };\n};\nexport default parse;","import parse from \"./parse/index.mjs\";\nconst isEncoded = parameterValue => {\n try {\n return typeof parameterValue === 'string' && decodeURIComponent(parameterValue) !== parameterValue;\n } catch {\n return false;\n }\n};\nexport const encodePathComponent = parameterValue => {\n if (isEncoded(parameterValue)) {\n return parameterValue;\n }\n return encodeURIComponent(parameterValue).replace(/%5B/g, '[').replace(/%5D/g, ']');\n};\nconst significantTypes = ['slash', 'path-literal', 'template-expression-param-name'];\nconst resolve = (pathTemplate, parameters, options = {}) => {\n const defaultOptions = {\n encoder: encodePathComponent\n };\n const mergedOptions = {\n ...defaultOptions,\n ...options\n };\n const parseResult = parse(pathTemplate);\n if (!parseResult.result.success) return pathTemplate;\n const parts = [];\n parseResult.ast.translate(parts);\n const resolvedParts = parts.filter(([type]) => significantTypes.includes(type)).map(([type, value]) => {\n if (type === 'template-expression-param-name') {\n return Object.hasOwn(parameters, value) ? mergedOptions.encoder(parameters[value], value) : `{${value}}`;\n }\n return value;\n });\n return resolvedParts.join('');\n};\nexport default resolve;","import { resolve as resolvePathTemplate } from 'openapi-path-templating';\n\n// These functions will update the request.\n// They'll be given {req, value, paramter, spec, operation}.\n\nexport default {\n body: bodyBuilder,\n header: headerBuilder,\n query: queryBuilder,\n path: pathBuilder,\n formData: formDataBuilder\n};\n\n// Add the body to the request\nfunction bodyBuilder({\n req,\n value\n}) {\n if (value !== undefined) {\n req.body = value;\n }\n}\n\n// Add a form data object.\nfunction formDataBuilder({\n req,\n value,\n parameter\n}) {\n if (value === false && parameter.type === 'boolean') {\n value = 'false';\n }\n if (value === 0 && ['number', 'integer'].indexOf(parameter.type) > -1) {\n value = '0';\n }\n if (value) {\n req.form = req.form || {};\n req.form[parameter.name] = {\n collectionFormat: parameter.collectionFormat,\n value\n };\n } else if (parameter.allowEmptyValue && value !== undefined) {\n req.form = req.form || {};\n const paramName = parameter.name;\n req.form[paramName] = req.form[paramName] || {};\n req.form[paramName].allowEmptyValue = true;\n }\n}\n\n// Add a header to the request\nfunction headerBuilder({\n req,\n parameter,\n value\n}) {\n req.headers = req.headers || {};\n if (typeof value !== 'undefined') {\n req.headers[parameter.name] = value;\n }\n}\n\n// Replace path paramters, with values ( ie: the URL )\nfunction pathBuilder({\n req,\n value,\n parameter,\n baseURL\n}) {\n if (value !== undefined) {\n const pathname = req.url.replace(baseURL, '');\n const resolvedPathname = resolvePathTemplate(pathname, {\n [parameter.name]: value\n });\n req.url = baseURL + resolvedPathname;\n }\n}\n\n// Add a query to the `query` object, which will later be stringified into the URL's search\nfunction queryBuilder({\n req,\n value,\n parameter\n}) {\n req.query = req.query || {};\n if (value === false && parameter.type === 'boolean') {\n value = 'false';\n }\n if (value === 0 && ['number', 'integer'].indexOf(parameter.type) > -1) {\n value = '0';\n }\n if (value) {\n req.query[parameter.name] = {\n collectionFormat: parameter.collectionFormat,\n value\n };\n } else if (parameter.allowEmptyValue && value !== undefined) {\n const paramName = parameter.name;\n req.query[paramName] = req.query[paramName] || {};\n req.query[paramName].allowEmptyValue = true;\n }\n}","import { resolve as resolvePathTemplate } from 'openapi-path-templating';\nimport stylize, { encodeCharacters } from './style-serializer.js';\nimport serialize from './content-serializer.js';\nimport { serialize as serializeCookie } from '../../helpers/cookie.js';\nexport function path({\n req,\n value,\n parameter,\n baseURL\n}) {\n const {\n name,\n style,\n explode,\n content\n } = parameter;\n if (value === undefined) return;\n const pathname = req.url.replace(baseURL, '');\n let resolvedPathname;\n if (content) {\n const effectiveMediaType = Object.keys(content)[0];\n resolvedPathname = resolvePathTemplate(pathname, {\n [name]: value\n }, {\n encoder: val => encodeCharacters(serialize(val, effectiveMediaType))\n });\n } else {\n resolvedPathname = resolvePathTemplate(pathname, {\n [name]: value\n }, {\n encoder: val => stylize({\n key: parameter.name,\n value: val,\n style: style || 'simple',\n explode: explode !== null && explode !== void 0 ? explode : false,\n escape: 'reserved'\n })\n });\n }\n req.url = baseURL + resolvedPathname;\n}\nexport function query({\n req,\n value,\n parameter\n}) {\n req.query = req.query || {};\n if (value !== undefined && parameter.content) {\n const effectiveMediaType = Object.keys(parameter.content)[0];\n const serializedValue = serialize(value, effectiveMediaType);\n if (serializedValue) {\n req.query[parameter.name] = serializedValue;\n } else if (parameter.allowEmptyValue) {\n const paramName = parameter.name;\n req.query[paramName] = req.query[paramName] || {};\n req.query[paramName].allowEmptyValue = true;\n }\n return;\n }\n if (value === false) {\n value = 'false';\n }\n if (value === 0) {\n value = '0';\n }\n if (value) {\n const {\n style,\n explode,\n allowReserved\n } = parameter;\n req.query[parameter.name] = {\n value,\n serializationOption: {\n style,\n explode,\n allowReserved\n }\n };\n } else if (parameter.allowEmptyValue && value !== undefined) {\n const paramName = parameter.name;\n req.query[paramName] = req.query[paramName] || {};\n req.query[paramName].allowEmptyValue = true;\n }\n}\nconst PARAMETER_HEADER_BLACKLIST = ['accept', 'authorization', 'content-type'];\nexport function header({\n req,\n parameter,\n value\n}) {\n req.headers = req.headers || {};\n if (PARAMETER_HEADER_BLACKLIST.indexOf(parameter.name.toLowerCase()) > -1) {\n return;\n }\n if (value !== undefined && parameter.content) {\n const effectiveMediaType = Object.keys(parameter.content)[0];\n req.headers[parameter.name] = serialize(value, effectiveMediaType);\n return;\n }\n if (value !== undefined && !(Array.isArray(value) && value.length === 0)) {\n req.headers[parameter.name] = stylize({\n key: parameter.name,\n value,\n style: parameter.style || 'simple',\n explode: typeof parameter.explode === 'undefined' ? false : parameter.explode,\n escape: false\n });\n }\n}\nexport function cookie({\n req,\n parameter,\n value\n}) {\n const {\n name: cookieName\n } = parameter;\n req.headers = req.headers || {};\n if (value !== undefined && parameter.content) {\n const effectiveMediaType = Object.keys(parameter.content)[0];\n const cookieValue = serialize(value, effectiveMediaType);\n req.headers.Cookie = serializeCookie({\n [cookieName]: cookieValue\n });\n return;\n }\n if (value !== undefined && !(Array.isArray(value) && value.length === 0)) {\n var _parameter$explode;\n const serializedValue = stylize({\n key: parameter.name,\n value,\n escape: false,\n style: parameter.style || 'form',\n explode: (_parameter$explode = parameter.explode) !== null && _parameter$explode !== void 0 ? _parameter$explode : false\n });\n const cookieValue = Array.isArray(value) && parameter.explode ? `${cookieName}=${serializedValue}` : serializedValue;\n req.headers.Cookie = serializeCookie({\n [cookieName]: cookieValue\n });\n }\n}","/*\n Serializer that serializes according to a media type instead of OpenAPI's\n `style` + `explode` constructs.\n*/\n\nexport default function serialize(value, mediaType) {\n if (mediaType.includes('application/json')) {\n if (typeof value === 'string') {\n // Assume the user has a JSON string\n return value;\n }\n if (Array.isArray(value)) {\n value = value.map(v => {\n try {\n return JSON.parse(v);\n } catch (e) {\n return v;\n }\n });\n }\n return JSON.stringify(value);\n }\n return String(value);\n}","// copyright: Copyright (c) 2024 Lowell D. Thomas, all rights reserved
\n// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
\n//\n// Generated by apg-js, Version 4.4.0 [apg-js](https://github.com/ldthomas/apg-js)\nexport default function grammar() {\n // ```\n // SUMMARY\n // rules = 30\n // udts = 0\n // opcodes = 139\n // --- ABNF original opcodes\n // ALT = 12\n // CAT = 12\n // REP = 13\n // RNM = 41\n // TLS = 35\n // TBS = 10\n // TRG = 16\n // --- SABNF superset opcodes\n // UDT = 0\n // AND = 0\n // NOT = 0\n // characters = [0 - 127]\n // ```\n /* OBJECT IDENTIFIER (for internal parser use) */\n this.grammarObject = 'grammarObject';\n\n /* RULES */\n this.rules = [];\n this.rules[0] = {\n name: 'lenient-cookie-string',\n lower: 'lenient-cookie-string',\n index: 0,\n isBkr: false\n };\n this.rules[1] = {\n name: 'lenient-cookie-entry',\n lower: 'lenient-cookie-entry',\n index: 1,\n isBkr: false\n };\n this.rules[2] = {\n name: 'lenient-cookie-pair',\n lower: 'lenient-cookie-pair',\n index: 2,\n isBkr: false\n };\n this.rules[3] = {\n name: 'lenient-cookie-pair-invalid',\n lower: 'lenient-cookie-pair-invalid',\n index: 3,\n isBkr: false\n };\n this.rules[4] = {\n name: 'lenient-cookie-name',\n lower: 'lenient-cookie-name',\n index: 4,\n isBkr: false\n };\n this.rules[5] = {\n name: 'lenient-cookie-value',\n lower: 'lenient-cookie-value',\n index: 5,\n isBkr: false\n };\n this.rules[6] = {\n name: 'lenient-quoted-value',\n lower: 'lenient-quoted-value',\n index: 6,\n isBkr: false\n };\n this.rules[7] = {\n name: 'lenient-quoted-char',\n lower: 'lenient-quoted-char',\n index: 7,\n isBkr: false\n };\n this.rules[8] = {\n name: 'lenient-cookie-octet',\n lower: 'lenient-cookie-octet',\n index: 8,\n isBkr: false\n };\n this.rules[9] = {\n name: 'cookie-string',\n lower: 'cookie-string',\n index: 9,\n isBkr: false\n };\n this.rules[10] = {\n name: 'cookie-pair',\n lower: 'cookie-pair',\n index: 10,\n isBkr: false\n };\n this.rules[11] = {\n name: 'cookie-name',\n lower: 'cookie-name',\n index: 11,\n isBkr: false\n };\n this.rules[12] = {\n name: 'cookie-value',\n lower: 'cookie-value',\n index: 12,\n isBkr: false\n };\n this.rules[13] = {\n name: 'cookie-octet',\n lower: 'cookie-octet',\n index: 13,\n isBkr: false\n };\n this.rules[14] = {\n name: 'OWS',\n lower: 'ows',\n index: 14,\n isBkr: false\n };\n this.rules[15] = {\n name: 'token',\n lower: 'token',\n index: 15,\n isBkr: false\n };\n this.rules[16] = {\n name: 'tchar',\n lower: 'tchar',\n index: 16,\n isBkr: false\n };\n this.rules[17] = {\n name: 'CHAR',\n lower: 'char',\n index: 17,\n isBkr: false\n };\n this.rules[18] = {\n name: 'CTL',\n lower: 'ctl',\n index: 18,\n isBkr: false\n };\n this.rules[19] = {\n name: 'separators',\n lower: 'separators',\n index: 19,\n isBkr: false\n };\n this.rules[20] = {\n name: 'SP',\n lower: 'sp',\n index: 20,\n isBkr: false\n };\n this.rules[21] = {\n name: 'HT',\n lower: 'ht',\n index: 21,\n isBkr: false\n };\n this.rules[22] = {\n name: 'ALPHA',\n lower: 'alpha',\n index: 22,\n isBkr: false\n };\n this.rules[23] = {\n name: 'DIGIT',\n lower: 'digit',\n index: 23,\n isBkr: false\n };\n this.rules[24] = {\n name: 'DQUOTE',\n lower: 'dquote',\n index: 24,\n isBkr: false\n };\n this.rules[25] = {\n name: 'WSP',\n lower: 'wsp',\n index: 25,\n isBkr: false\n };\n this.rules[26] = {\n name: 'HTAB',\n lower: 'htab',\n index: 26,\n isBkr: false\n };\n this.rules[27] = {\n name: 'CRLF',\n lower: 'crlf',\n index: 27,\n isBkr: false\n };\n this.rules[28] = {\n name: 'CR',\n lower: 'cr',\n index: 28,\n isBkr: false\n };\n this.rules[29] = {\n name: 'LF',\n lower: 'lf',\n index: 29,\n isBkr: false\n };\n\n /* UDTS */\n this.udts = [];\n\n /* OPCODES */\n /* lenient-cookie-string */\n this.rules[0].opcodes = [];\n this.rules[0].opcodes[0] = {\n type: 2,\n children: [1, 2]\n }; // CAT\n this.rules[0].opcodes[1] = {\n type: 4,\n index: 1\n }; // RNM(lenient-cookie-entry)\n this.rules[0].opcodes[2] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[0].opcodes[3] = {\n type: 2,\n children: [4, 5, 6]\n }; // CAT\n this.rules[0].opcodes[4] = {\n type: 7,\n string: [59]\n }; // TLS\n this.rules[0].opcodes[5] = {\n type: 4,\n index: 14\n }; // RNM(OWS)\n this.rules[0].opcodes[6] = {\n type: 4,\n index: 1\n }; // RNM(lenient-cookie-entry)\n\n /* lenient-cookie-entry */\n this.rules[1].opcodes = [];\n this.rules[1].opcodes[0] = {\n type: 1,\n children: [1, 2]\n }; // ALT\n this.rules[1].opcodes[1] = {\n type: 4,\n index: 2\n }; // RNM(lenient-cookie-pair)\n this.rules[1].opcodes[2] = {\n type: 4,\n index: 3\n }; // RNM(lenient-cookie-pair-invalid)\n\n /* lenient-cookie-pair */\n this.rules[2].opcodes = [];\n this.rules[2].opcodes[0] = {\n type: 2,\n children: [1, 2, 3, 4, 5, 6, 7]\n }; // CAT\n this.rules[2].opcodes[1] = {\n type: 4,\n index: 14\n }; // RNM(OWS)\n this.rules[2].opcodes[2] = {\n type: 4,\n index: 4\n }; // RNM(lenient-cookie-name)\n this.rules[2].opcodes[3] = {\n type: 4,\n index: 14\n }; // RNM(OWS)\n this.rules[2].opcodes[4] = {\n type: 7,\n string: [61]\n }; // TLS\n this.rules[2].opcodes[5] = {\n type: 4,\n index: 14\n }; // RNM(OWS)\n this.rules[2].opcodes[6] = {\n type: 4,\n index: 5\n }; // RNM(lenient-cookie-value)\n this.rules[2].opcodes[7] = {\n type: 4,\n index: 14\n }; // RNM(OWS)\n\n /* lenient-cookie-pair-invalid */\n this.rules[3].opcodes = [];\n this.rules[3].opcodes[0] = {\n type: 2,\n children: [1, 2, 4]\n }; // CAT\n this.rules[3].opcodes[1] = {\n type: 4,\n index: 14\n }; // RNM(OWS)\n this.rules[3].opcodes[2] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[3].opcodes[3] = {\n type: 4,\n index: 16\n }; // RNM(tchar)\n this.rules[3].opcodes[4] = {\n type: 4,\n index: 14\n }; // RNM(OWS)\n\n /* lenient-cookie-name */\n this.rules[4].opcodes = [];\n this.rules[4].opcodes[0] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[4].opcodes[1] = {\n type: 1,\n children: [2, 3, 4]\n }; // ALT\n this.rules[4].opcodes[2] = {\n type: 5,\n min: 33,\n max: 58\n }; // TRG\n this.rules[4].opcodes[3] = {\n type: 6,\n string: [60]\n }; // TBS\n this.rules[4].opcodes[4] = {\n type: 5,\n min: 62,\n max: 126\n }; // TRG\n\n /* lenient-cookie-value */\n this.rules[5].opcodes = [];\n this.rules[5].opcodes[0] = {\n type: 1,\n children: [1, 6]\n }; // ALT\n this.rules[5].opcodes[1] = {\n type: 2,\n children: [2, 3]\n }; // CAT\n this.rules[5].opcodes[2] = {\n type: 4,\n index: 6\n }; // RNM(lenient-quoted-value)\n this.rules[5].opcodes[3] = {\n type: 3,\n min: 0,\n max: 1\n }; // REP\n this.rules[5].opcodes[4] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[5].opcodes[5] = {\n type: 4,\n index: 8\n }; // RNM(lenient-cookie-octet)\n this.rules[5].opcodes[6] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[5].opcodes[7] = {\n type: 4,\n index: 8\n }; // RNM(lenient-cookie-octet)\n\n /* lenient-quoted-value */\n this.rules[6].opcodes = [];\n this.rules[6].opcodes[0] = {\n type: 2,\n children: [1, 2, 4]\n }; // CAT\n this.rules[6].opcodes[1] = {\n type: 4,\n index: 24\n }; // RNM(DQUOTE)\n this.rules[6].opcodes[2] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[6].opcodes[3] = {\n type: 4,\n index: 7\n }; // RNM(lenient-quoted-char)\n this.rules[6].opcodes[4] = {\n type: 4,\n index: 24\n }; // RNM(DQUOTE)\n\n /* lenient-quoted-char */\n this.rules[7].opcodes = [];\n this.rules[7].opcodes[0] = {\n type: 1,\n children: [1, 2]\n }; // ALT\n this.rules[7].opcodes[1] = {\n type: 5,\n min: 32,\n max: 33\n }; // TRG\n this.rules[7].opcodes[2] = {\n type: 5,\n min: 35,\n max: 126\n }; // TRG\n\n /* lenient-cookie-octet */\n this.rules[8].opcodes = [];\n this.rules[8].opcodes[0] = {\n type: 1,\n children: [1, 2, 3]\n }; // ALT\n this.rules[8].opcodes[1] = {\n type: 5,\n min: 33,\n max: 43\n }; // TRG\n this.rules[8].opcodes[2] = {\n type: 5,\n min: 45,\n max: 58\n }; // TRG\n this.rules[8].opcodes[3] = {\n type: 5,\n min: 60,\n max: 126\n }; // TRG\n\n /* cookie-string */\n this.rules[9].opcodes = [];\n this.rules[9].opcodes[0] = {\n type: 2,\n children: [1, 2]\n }; // CAT\n this.rules[9].opcodes[1] = {\n type: 4,\n index: 10\n }; // RNM(cookie-pair)\n this.rules[9].opcodes[2] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[9].opcodes[3] = {\n type: 2,\n children: [4, 5, 6]\n }; // CAT\n this.rules[9].opcodes[4] = {\n type: 7,\n string: [59]\n }; // TLS\n this.rules[9].opcodes[5] = {\n type: 4,\n index: 20\n }; // RNM(SP)\n this.rules[9].opcodes[6] = {\n type: 4,\n index: 10\n }; // RNM(cookie-pair)\n\n /* cookie-pair */\n this.rules[10].opcodes = [];\n this.rules[10].opcodes[0] = {\n type: 2,\n children: [1, 2, 3]\n }; // CAT\n this.rules[10].opcodes[1] = {\n type: 4,\n index: 11\n }; // RNM(cookie-name)\n this.rules[10].opcodes[2] = {\n type: 7,\n string: [61]\n }; // TLS\n this.rules[10].opcodes[3] = {\n type: 4,\n index: 12\n }; // RNM(cookie-value)\n\n /* cookie-name */\n this.rules[11].opcodes = [];\n this.rules[11].opcodes[0] = {\n type: 4,\n index: 15\n }; // RNM(token)\n\n /* cookie-value */\n this.rules[12].opcodes = [];\n this.rules[12].opcodes[0] = {\n type: 1,\n children: [1, 6]\n }; // ALT\n this.rules[12].opcodes[1] = {\n type: 2,\n children: [2, 3, 5]\n }; // CAT\n this.rules[12].opcodes[2] = {\n type: 4,\n index: 24\n }; // RNM(DQUOTE)\n this.rules[12].opcodes[3] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[12].opcodes[4] = {\n type: 4,\n index: 13\n }; // RNM(cookie-octet)\n this.rules[12].opcodes[5] = {\n type: 4,\n index: 24\n }; // RNM(DQUOTE)\n this.rules[12].opcodes[6] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[12].opcodes[7] = {\n type: 4,\n index: 13\n }; // RNM(cookie-octet)\n\n /* cookie-octet */\n this.rules[13].opcodes = [];\n this.rules[13].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5]\n }; // ALT\n this.rules[13].opcodes[1] = {\n type: 6,\n string: [33]\n }; // TBS\n this.rules[13].opcodes[2] = {\n type: 5,\n min: 35,\n max: 43\n }; // TRG\n this.rules[13].opcodes[3] = {\n type: 5,\n min: 45,\n max: 58\n }; // TRG\n this.rules[13].opcodes[4] = {\n type: 5,\n min: 60,\n max: 91\n }; // TRG\n this.rules[13].opcodes[5] = {\n type: 5,\n min: 93,\n max: 126\n }; // TRG\n\n /* OWS */\n this.rules[14].opcodes = [];\n this.rules[14].opcodes[0] = {\n type: 3,\n min: 0,\n max: Infinity\n }; // REP\n this.rules[14].opcodes[1] = {\n type: 2,\n children: [2, 4]\n }; // CAT\n this.rules[14].opcodes[2] = {\n type: 3,\n min: 0,\n max: 1\n }; // REP\n this.rules[14].opcodes[3] = {\n type: 4,\n index: 27\n }; // RNM(CRLF)\n this.rules[14].opcodes[4] = {\n type: 4,\n index: 25\n }; // RNM(WSP)\n\n /* token */\n this.rules[15].opcodes = [];\n this.rules[15].opcodes[0] = {\n type: 3,\n min: 1,\n max: Infinity\n }; // REP\n this.rules[15].opcodes[1] = {\n type: 4,\n index: 16\n }; // RNM(tchar)\n\n /* tchar */\n this.rules[16].opcodes = [];\n this.rules[16].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]\n }; // ALT\n this.rules[16].opcodes[1] = {\n type: 7,\n string: [33]\n }; // TLS\n this.rules[16].opcodes[2] = {\n type: 7,\n string: [35]\n }; // TLS\n this.rules[16].opcodes[3] = {\n type: 7,\n string: [36]\n }; // TLS\n this.rules[16].opcodes[4] = {\n type: 7,\n string: [37]\n }; // TLS\n this.rules[16].opcodes[5] = {\n type: 7,\n string: [38]\n }; // TLS\n this.rules[16].opcodes[6] = {\n type: 7,\n string: [39]\n }; // TLS\n this.rules[16].opcodes[7] = {\n type: 7,\n string: [42]\n }; // TLS\n this.rules[16].opcodes[8] = {\n type: 7,\n string: [43]\n }; // TLS\n this.rules[16].opcodes[9] = {\n type: 7,\n string: [45]\n }; // TLS\n this.rules[16].opcodes[10] = {\n type: 7,\n string: [46]\n }; // TLS\n this.rules[16].opcodes[11] = {\n type: 7,\n string: [94]\n }; // TLS\n this.rules[16].opcodes[12] = {\n type: 7,\n string: [95]\n }; // TLS\n this.rules[16].opcodes[13] = {\n type: 7,\n string: [96]\n }; // TLS\n this.rules[16].opcodes[14] = {\n type: 7,\n string: [124]\n }; // TLS\n this.rules[16].opcodes[15] = {\n type: 7,\n string: [126]\n }; // TLS\n this.rules[16].opcodes[16] = {\n type: 4,\n index: 23\n }; // RNM(DIGIT)\n this.rules[16].opcodes[17] = {\n type: 4,\n index: 22\n }; // RNM(ALPHA)\n\n /* CHAR */\n this.rules[17].opcodes = [];\n this.rules[17].opcodes[0] = {\n type: 5,\n min: 1,\n max: 127\n }; // TRG\n\n /* CTL */\n this.rules[18].opcodes = [];\n this.rules[18].opcodes[0] = {\n type: 1,\n children: [1, 2]\n }; // ALT\n this.rules[18].opcodes[1] = {\n type: 5,\n min: 0,\n max: 31\n }; // TRG\n this.rules[18].opcodes[2] = {\n type: 6,\n string: [127]\n }; // TBS\n\n /* separators */\n this.rules[19].opcodes = [];\n this.rules[19].opcodes[0] = {\n type: 1,\n children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n }; // ALT\n this.rules[19].opcodes[1] = {\n type: 7,\n string: [40]\n }; // TLS\n this.rules[19].opcodes[2] = {\n type: 7,\n string: [41]\n }; // TLS\n this.rules[19].opcodes[3] = {\n type: 7,\n string: [60]\n }; // TLS\n this.rules[19].opcodes[4] = {\n type: 7,\n string: [62]\n }; // TLS\n this.rules[19].opcodes[5] = {\n type: 7,\n string: [64]\n }; // TLS\n this.rules[19].opcodes[6] = {\n type: 7,\n string: [44]\n }; // TLS\n this.rules[19].opcodes[7] = {\n type: 7,\n string: [59]\n }; // TLS\n this.rules[19].opcodes[8] = {\n type: 7,\n string: [58]\n }; // TLS\n this.rules[19].opcodes[9] = {\n type: 7,\n string: [92]\n }; // TLS\n this.rules[19].opcodes[10] = {\n type: 6,\n string: [34]\n }; // TBS\n this.rules[19].opcodes[11] = {\n type: 7,\n string: [47]\n }; // TLS\n this.rules[19].opcodes[12] = {\n type: 7,\n string: [91]\n }; // TLS\n this.rules[19].opcodes[13] = {\n type: 7,\n string: [93]\n }; // TLS\n this.rules[19].opcodes[14] = {\n type: 7,\n string: [63]\n }; // TLS\n this.rules[19].opcodes[15] = {\n type: 7,\n string: [61]\n }; // TLS\n this.rules[19].opcodes[16] = {\n type: 7,\n string: [123]\n }; // TLS\n this.rules[19].opcodes[17] = {\n type: 7,\n string: [125]\n }; // TLS\n this.rules[19].opcodes[18] = {\n type: 4,\n index: 20\n }; // RNM(SP)\n this.rules[19].opcodes[19] = {\n type: 4,\n index: 21\n }; // RNM(HT)\n\n /* SP */\n this.rules[20].opcodes = [];\n this.rules[20].opcodes[0] = {\n type: 6,\n string: [32]\n }; // TBS\n\n /* HT */\n this.rules[21].opcodes = [];\n this.rules[21].opcodes[0] = {\n type: 6,\n string: [9]\n }; // TBS\n\n /* ALPHA */\n this.rules[22].opcodes = [];\n this.rules[22].opcodes[0] = {\n type: 1,\n children: [1, 2]\n }; // ALT\n this.rules[22].opcodes[1] = {\n type: 5,\n min: 65,\n max: 90\n }; // TRG\n this.rules[22].opcodes[2] = {\n type: 5,\n min: 97,\n max: 122\n }; // TRG\n\n /* DIGIT */\n this.rules[23].opcodes = [];\n this.rules[23].opcodes[0] = {\n type: 5,\n min: 48,\n max: 57\n }; // TRG\n\n /* DQUOTE */\n this.rules[24].opcodes = [];\n this.rules[24].opcodes[0] = {\n type: 6,\n string: [34]\n }; // TBS\n\n /* WSP */\n this.rules[25].opcodes = [];\n this.rules[25].opcodes[0] = {\n type: 1,\n children: [1, 2]\n }; // ALT\n this.rules[25].opcodes[1] = {\n type: 4,\n index: 20\n }; // RNM(SP)\n this.rules[25].opcodes[2] = {\n type: 4,\n index: 26\n }; // RNM(HTAB)\n\n /* HTAB */\n this.rules[26].opcodes = [];\n this.rules[26].opcodes[0] = {\n type: 6,\n string: [9]\n }; // TBS\n\n /* CRLF */\n this.rules[27].opcodes = [];\n this.rules[27].opcodes[0] = {\n type: 2,\n children: [1, 2]\n }; // CAT\n this.rules[27].opcodes[1] = {\n type: 4,\n index: 28\n }; // RNM(CR)\n this.rules[27].opcodes[2] = {\n type: 4,\n index: 29\n }; // RNM(LF)\n\n /* CR */\n this.rules[28].opcodes = [];\n this.rules[28].opcodes[0] = {\n type: 6,\n string: [13]\n }; // TBS\n\n /* LF */\n this.rules[29].opcodes = [];\n this.rules[29].opcodes[0] = {\n type: 6,\n string: [10]\n }; // TBS\n\n // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n this.toString = function toString() {\n let str = \"\";\n str += \"; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\n\";\n str += \"lenient-cookie-string = lenient-cookie-entry *( \\\";\\\" OWS lenient-cookie-entry )\\n\";\n str += \"lenient-cookie-entry = lenient-cookie-pair / lenient-cookie-pair-invalid\\n\";\n str += \"lenient-cookie-pair = OWS lenient-cookie-name OWS \\\"=\\\" OWS lenient-cookie-value OWS\\n\";\n str += \"lenient-cookie-pair-invalid = OWS 1*tchar OWS ; Allow for standalone entries like \\\"fizz\\\" to be ignored\\n\";\n str += \"lenient-cookie-name = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except \\\"=\\\"\\n\";\n str += \"lenient-cookie-value = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\\n\";\n str += \"lenient-quoted-value = DQUOTE *( lenient-quoted-char ) DQUOTE\\n\";\n str += \"lenient-quoted-char = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\\n\";\n str += \"lenient-cookie-octet = %x21-2B / %x2D-3A / %x3C-7E\\n\";\n str += \" ; Allow all printable characters except CTLs, semicolon and SP\\n\";\n str += \"\\n\";\n str += \"; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\n\";\n str += \"cookie-string = cookie-pair *( \\\";\\\" SP cookie-pair )\\n\";\n str += \"\\n\";\n str += \"; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\\n\";\n str += \"; https://www.rfc-editor.org/errata/eid5518\\n\";\n str += \"cookie-pair = cookie-name \\\"=\\\" cookie-value\\n\";\n str += \"cookie-name = token\\n\";\n str += \"cookie-value = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\\n\";\n str += \" ; https://www.rfc-editor.org/errata/eid8242\\n\";\n str += \"cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\\n\";\n str += \" ; US-ASCII characters excluding CTLs,\\n\";\n str += \" ; whitespace, DQUOTE, comma, semicolon,\\n\";\n str += \" ; and backslash\\n\";\n str += \"\\n\";\n str += \"; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\\n\";\n str += \"OWS = *( [ CRLF ] WSP ) ; \\\"optional\\\" whitespace\\n\";\n str += \"\\n\";\n str += \"; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\\n\";\n str += \"token = 1*(tchar)\\n\";\n str += \"tchar = \\\"!\\\" / \\\"#\\\" / \\\"$\\\" / \\\"%\\\" / \\\"&\\\" / \\\"'\\\" / \\\"*\\\"\\n\";\n str += \" / \\\"+\\\" / \\\"-\\\" / \\\".\\\" / \\\"^\\\" / \\\"_\\\" / \\\"`\\\" / \\\"|\\\" / \\\"~\\\"\\n\";\n str += \" / DIGIT / ALPHA\\n\";\n str += \" ; any VCHAR, except delimiters\\n\";\n str += \"\\n\";\n str += \"; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\\n\";\n str += \"CHAR = %x01-7F ; any US-ASCII character (octets 0 - 127)\\n\";\n str += \"CTL = %x00-1F / %x7F ; any US-ASCII control character\\n\";\n str += \"separators = \\\"(\\\" / \\\")\\\" / \\\"<\\\" / \\\">\\\" / \\\"@\\\" / \\\",\\\" / \\\";\\\" / \\\":\\\" / \\\"\\\\\\\" / %x22 / \\\"/\\\" / \\\"[\\\" / \\\"]\\\" / \\\"?\\\" / \\\"=\\\" / \\\"{\\\" / \\\"}\\\" / SP / HT\\n\";\n str += \"SP = %x20 ; US-ASCII SP, space (32)\\n\";\n str += \"HT = %x09 ; US-ASCII HT, horizontal-tab (9)\\n\";\n str += \"\\n\";\n str += \"; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\n\";\n str += \"ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\\n\";\n str += \"DIGIT = %x30-39 ; 0-9\\n\";\n str += \"DQUOTE = %x22 ; \\\" (Double Quote)\\n\";\n str += \"WSP = SP / HTAB ; white space\\n\";\n str += \"HTAB = %x09 ; horizontal tab\\n\";\n str += \"CRLF = CR LF ; Internet standard newline\\n\";\n str += \"CR = %x0D ; carriage return\\n\";\n str += \"LF = %x0A ; linefeed\\n\";\n return str;\n };\n}","import { Ast as AST, Parser } from 'apg-lite';\nimport Grammar from \"../../grammar.mjs\";\nimport cookieStringCallback from \"./callbacks/cookie-string.mjs\";\nimport cookiePairCallback from \"./callbacks/cookie-pair.mjs\";\nimport cookieNameCallback from \"./callbacks/cookie-name.mjs\";\nimport cookieValueCallback from \"./callbacks/cookie-value.mjs\";\nconst grammar = new Grammar();\nconst parse = (cookieString, {\n strict = true\n} = {}) => {\n const parser = new Parser();\n parser.ast = new AST();\n if (strict) {\n parser.ast.callbacks['cookie-string'] = cookieStringCallback;\n parser.ast.callbacks['cookie-pair'] = cookiePairCallback;\n parser.ast.callbacks['cookie-name'] = cookieNameCallback;\n parser.ast.callbacks['cookie-value'] = cookieValueCallback;\n } else {\n parser.ast.callbacks['lenient-cookie-string'] = cookieStringCallback;\n parser.ast.callbacks['lenient-cookie-pair'] = cookiePairCallback;\n parser.ast.callbacks['lenient-cookie-name'] = cookieNameCallback;\n parser.ast.callbacks['lenient-cookie-value'] = cookieValueCallback;\n }\n const startRule = strict ? 'cookie-string' : 'lenient-cookie-string';\n const result = parser.parse(grammar, startRule, cookieString);\n return {\n result,\n ast: parser.ast\n };\n};\nexport default parse;","export const percentEncodeChar = char => {\n if (typeof char !== 'string' || [...char].length !== 1) {\n throw new TypeError('Input must be a single character string.');\n }\n const codePoint = char.codePointAt(0);\n if (codePoint <= 0x7f) {\n // ASCII range: Encode as %XX\n return `%${codePoint.toString(16).toUpperCase().padStart(2, '0')}`;\n } else {\n // Non-ASCII range: Use encodeURIComponent to handle UTF-8 encoding\n return encodeURIComponent(char);\n }\n};\nexport const toBase64url = base64 => {\n return base64.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/g, '');\n};\nexport const toBase64 = base64url => {\n const base64 = base64url.replace(/-/g, '+').replace(/_/g, '/');\n const padding = '='.repeat((4 - base64.length % 4) % 4);\n return `${base64}${padding}`;\n};\nexport const isQuoted = value => {\n return value.length >= 2 && value.startsWith('\"') && value.endsWith('\"');\n};\nexport const unquote = value => {\n return isQuoted(value) ? value.slice(1, -1) : value;\n};\nexport const quote = value => {\n return `\"${value}\"`;\n};\nexport const identity = a => a;\nexport const noop = () => {};","import { Parser } from 'apg-lite';\nimport Grammar from \"../../grammar.mjs\";\nimport { isQuoted } from \"../../utils.mjs\";\nconst parser = new Parser();\nconst grammar = new Grammar();\nconst testCookieValue = (cookieValue, {\n strict = true,\n quoted = null\n} = {}) => {\n try {\n const startRule = strict ? 'cookie-value' : 'lenient-cookie-value';\n const result = parser.parse(grammar, startRule, cookieValue);\n if (typeof quoted === 'boolean') {\n return result.success && quoted === isQuoted(cookieValue);\n }\n return result.success;\n } catch {\n return false;\n }\n};\nexport default testCookieValue;","const base64Encoder = input => {\n const bytes = new TextEncoder().encode(input);\n const binaryString = bytes.reduce((acc, byte) => acc + String.fromCharCode(byte), '');\n return btoa(binaryString);\n};\nexport default base64Encoder;","import testCookieValue from \"../../../cookie/test/cookie-value.mjs\";\nimport base64Encoder from \"./base64.node.mjs\";\nimport { isQuoted as isQuotedPredicate, unquote, quote } from \"../../../utils.mjs\";\nconst cookieValueStrictBase64Encoder = (cookieValue, encoder = base64Encoder) => {\n const value = String(cookieValue);\n\n // return early if the value is already valid\n if (testCookieValue(value)) return value;\n\n // detect if the value is quoted\n const isQuoted = isQuotedPredicate(value);\n\n // remove quotes if present for processing\n const valueToEncode = isQuoted ? unquote(value) : value;\n\n // base64 encode the value\n const base64EncodedValue = encoder(valueToEncode);\n\n // return quoted if input was quoted, unquoted otherwise\n return isQuoted ? quote(base64EncodedValue) : base64EncodedValue;\n};\nexport default cookieValueStrictBase64Encoder;","import { toBase64url } from \"../../../utils.mjs\";\nimport base64Encoder from \"./base64.browser.mjs\";\nconst base64urlEncoder = input => {\n return toBase64url(base64Encoder(input));\n};\nexport default base64urlEncoder;","import cookieValueStrictBase64Encoder from \"./cookie-value-strict-base64.mjs\";\nimport base64urlEncoder from \"./base64url.node.mjs\";\nconst cookieValueStrictBase64urlEncoder = cookieValue => {\n return cookieValueStrictBase64Encoder(cookieValue, base64urlEncoder);\n};\nexport default cookieValueStrictBase64urlEncoder;","import { Parser } from 'apg-lite';\nimport Grammar from \"../../grammar.mjs\";\nconst parser = new Parser();\nconst grammar = new Grammar();\nconst testCookieName = (cookieName, {\n strict = true\n} = {}) => {\n try {\n const startRule = strict ? 'cookie-name' : 'lenient-cookie-name';\n return parser.parse(grammar, startRule, cookieName).success;\n } catch {\n return false;\n }\n};\nexport default testCookieName;","import testCookieName from \"../../../cookie/test/cookie-name.mjs\";\nconst cookieNameStrictValidator = cookieName => {\n if (!testCookieName(cookieName)) {\n throw new TypeError(`Invalid cookie name: ${cookieName}`);\n }\n};\nexport default cookieNameStrictValidator;","import testCookieValue from \"../../../cookie/test/cookie-value.mjs\";\nconst cookieValueStrictValidator = cookieValue => {\n if (!testCookieValue(cookieValue)) {\n throw new TypeError(`Invalid cookie value: ${cookieValue}`);\n }\n};\nexport default cookieValueStrictValidator;","import cookieValueStrictBase64urlEncoder from \"./encoders/cookie-value-strict-base64url.mjs\";\nimport cookieNameStrictValidator from \"./validators/cookie-name-strict.mjs\";\nimport cookieValueStrictValidator from \"./validators/cookie-value-strict.mjs\";\nimport { identity } from \"../../utils.mjs\";\nconst defaultOptions = {\n encoders: {\n name: identity,\n value: cookieValueStrictBase64urlEncoder\n },\n validators: {\n name: cookieNameStrictValidator,\n value: cookieValueStrictValidator\n }\n};\nconst serialize = (name, value, options = {}) => {\n const mergedOptions = {\n ...defaultOptions,\n ...options,\n encoders: {\n ...defaultOptions.encoders,\n ...options.encoders\n },\n validators: {\n ...defaultOptions.validators,\n ...options.validators\n }\n };\n const encodedName = mergedOptions.encoders.name(name);\n const encodedValue = mergedOptions.encoders.value(value);\n mergedOptions.validators.name(encodedName);\n mergedOptions.validators.value(encodedValue);\n return `${encodedName}=${encodedValue}`;\n};\nexport default serialize;","import serializeSetCookie from \"../../set-cookie/serialize/index.mjs\";\nconst serialize = (cookiePairs, options = {}) => {\n const cookiePairEntries = Array.isArray(cookiePairs) ? cookiePairs : typeof cookiePairs === 'object' && cookiePairs !== null ? Object.entries(cookiePairs) : [];\n return cookiePairEntries.map(([name, value]) => serializeSetCookie(name, value, options)).join('; ');\n};\nexport default serialize;","import { Parser } from 'apg-lite';\nimport Grammar from \"../../../grammar.mjs\";\nimport { percentEncodeChar, isQuoted as isQuotedPredicate, unquote, quote } from \"../../../utils.mjs\";\nimport testCookieValue from \"../../../cookie/test/cookie-value.mjs\";\nconst parser = new Parser();\nconst grammar = new Grammar();\nconst cookieValueStrictPercentEncoder = cookieValue => {\n const value = String(cookieValue);\n\n // return early if the value is already valid\n if (testCookieValue(value)) return value;\n\n // detect if the value is quoted\n const isQuoted = isQuotedPredicate(value);\n\n // remove quotes if present for processing\n const valueToEncode = isQuoted ? unquote(value) : value;\n let result = '';\n for (const char of valueToEncode) {\n result += parser.parse(grammar, 'cookie-octet', char).success ? char : percentEncodeChar(char);\n }\n\n // return quoted if input was quoted, unquoted otherwise\n return isQuoted ? quote(result) : result;\n};\nexport default cookieValueStrictPercentEncoder;","import { Parser } from 'apg-lite';\nimport Grammar from \"../../../grammar.mjs\";\nimport { percentEncodeChar, isQuoted as isQuotedPredicate, unquote, quote } from \"../../../utils.mjs\";\nimport testCookieValue from \"../../../cookie/test/cookie-value.mjs\";\nconst parser = new Parser();\nconst grammar = new Grammar();\nconst cookieValueLenientPercentEncoder = cookieValue => {\n const value = String(cookieValue);\n\n // return early if the value is already valid\n if (testCookieValue(value, {\n strict: false\n })) return value;\n\n // detect if the value is quoted\n const isQuoted = isQuotedPredicate(value);\n\n // remove quotes if present for processing\n const valueToEncode = isQuoted ? unquote(value) : value;\n const startRule = isQuoted ? 'lenient-quoted-char' : 'lenient-cookie-octet';\n let result = '';\n for (const char of valueToEncode) {\n result += parser.parse(grammar, startRule, char).success ? char : percentEncodeChar(char);\n }\n\n // return quoted if input was quoted, unquoted otherwise\n return isQuoted ? quote(result) : result;\n};\nexport default cookieValueLenientPercentEncoder;","import testCookieName from \"../../../cookie/test/cookie-name.mjs\";\nconst cookieNameLenientValidator = cookieName => {\n if (!testCookieName(cookieName, {\n strict: false\n })) {\n throw new TypeError(`Invalid cookie name: ${cookieName}`);\n }\n};\nexport default cookieNameLenientValidator;","import { mergeDeepRight } from 'ramda';\nimport { serializeCookie, cookieValueStrictPercentEncoder, cookieNameLenientValidator, cookieValueStrictValidator, identity } from '@swaggerexpert/cookie';\nconst eqSignPE = '%3D';\nconst ampersandPE = '%26';\nexport const valuePercentEncoder = cookieValue => cookieValueStrictPercentEncoder(cookieValue).replace(/[=&]/gu, match => match === '=' ? eqSignPE : ampersandPE);\nexport const serialize = (cookiePairs, options = {}) => {\n const defaultOptions = {\n encoders: {\n name: identity,\n value: valuePercentEncoder\n },\n validators: {\n name: cookieNameLenientValidator,\n value: cookieValueStrictValidator\n }\n };\n return serializeCookie(cookiePairs, mergeDeepRight(defaultOptions, options));\n};","/* eslint-disable no-undef, no-restricted-globals */\n\nconst globalObject = (() => {\n // new standardized access to the global object\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n\n // WebWorker specific access\n if (typeof self !== 'undefined') {\n return self;\n }\n return window;\n})();\nconst {\n btoa\n} = globalObject;\nexport default btoa;","// This function runs after the common function,\n// `src/execute/index.js#buildRequest`\nimport { isPlainObject } from 'ramda-adjunct';\nimport btoa from '../../helpers/btoa.node.js';\nexport default function buildRequest(options, req) {\n const {\n operation,\n requestBody,\n securities,\n spec,\n attachContentTypeForEmptyPayload\n } = options;\n let {\n requestContentType\n } = options;\n req = applySecurities({\n request: req,\n securities,\n operation,\n spec\n });\n const requestBodyDef = operation.requestBody || {};\n const requestBodyMediaTypes = Object.keys(requestBodyDef.content || {});\n const isExplicitContentTypeValid = requestContentType && requestBodyMediaTypes.indexOf(requestContentType) > -1;\n\n // for OAS3: set the Content-Type\n if (requestBody || attachContentTypeForEmptyPayload) {\n // does the passed requestContentType appear in the requestBody definition?\n\n if (requestContentType && isExplicitContentTypeValid) {\n req.headers['Content-Type'] = requestContentType;\n } else if (!requestContentType) {\n const firstMediaType = requestBodyMediaTypes[0];\n if (firstMediaType) {\n req.headers['Content-Type'] = firstMediaType;\n requestContentType = firstMediaType;\n }\n }\n } else if (requestContentType && isExplicitContentTypeValid) {\n req.headers['Content-Type'] = requestContentType;\n }\n if (!options.responseContentType && operation.responses) {\n const mediaTypes = Object.entries(operation.responses).filter(([key, value]) => {\n const code = parseInt(key, 10);\n return code >= 200 && code < 300 && isPlainObject(value.content);\n }).reduce((acc, [, value]) => acc.concat(Object.keys(value.content)), []);\n if (mediaTypes.length > 0) {\n req.headers.accept = mediaTypes.join(', ');\n }\n }\n\n // for OAS3: add requestBody to request\n if (requestBody) {\n if (requestContentType) {\n if (requestBodyMediaTypes.indexOf(requestContentType) > -1) {\n // only attach body if the requestBody has a definition for the\n // contentType that has been explicitly set\n if (requestContentType === 'application/x-www-form-urlencoded' || requestContentType === 'multipart/form-data') {\n if (typeof requestBody === 'object') {\n var _requestBodyDef$conte, _requestBodyDef$conte2;\n const encoding = (_requestBodyDef$conte = (_requestBodyDef$conte2 = requestBodyDef.content[requestContentType]) === null || _requestBodyDef$conte2 === void 0 ? void 0 : _requestBodyDef$conte2.encoding) !== null && _requestBodyDef$conte !== void 0 ? _requestBodyDef$conte : {};\n req.form = {};\n Object.keys(requestBody).forEach(k => {\n let value;\n try {\n value = JSON.parse(requestBody[k]);\n } catch {\n value = requestBody[k];\n }\n req.form[k] = {\n value,\n encoding: encoding[k] || {}\n };\n });\n } else if (typeof requestBody === 'string') {\n var _requestBodyDef$conte3, _requestBodyDef$conte4;\n const encoding = (_requestBodyDef$conte3 = (_requestBodyDef$conte4 = requestBodyDef.content[requestContentType]) === null || _requestBodyDef$conte4 === void 0 ? void 0 : _requestBodyDef$conte4.encoding) !== null && _requestBodyDef$conte3 !== void 0 ? _requestBodyDef$conte3 : {};\n try {\n req.form = {};\n const form = JSON.parse(requestBody);\n Object.entries(form).forEach(([key, value]) => {\n req.form[key] = {\n value,\n encoding: encoding[key] || {}\n };\n });\n } catch {\n req.form = requestBody;\n }\n } else {\n req.form = requestBody;\n }\n } else {\n req.body = requestBody;\n }\n }\n } else {\n req.body = requestBody;\n }\n }\n return req;\n}\n\n// Add security values, to operations - that declare their need on them\n// Adapted from the Swagger2 implementation\nexport function applySecurities({\n request,\n securities = {},\n operation = {},\n spec\n}) {\n var _spec$components;\n const result = {\n ...request\n };\n const {\n authorized = {}\n } = securities;\n const security = operation.security || spec.security || [];\n const isAuthorized = authorized && !!Object.keys(authorized).length;\n const securityDef = (spec === null || spec === void 0 || (_spec$components = spec.components) === null || _spec$components === void 0 ? void 0 : _spec$components.securitySchemes) || {};\n result.headers = result.headers || {};\n result.query = result.query || {};\n if (!Object.keys(securities).length || !isAuthorized || !security || Array.isArray(operation.security) && !operation.security.length) {\n return request;\n }\n security.forEach(securityObj => {\n Object.keys(securityObj).forEach(key => {\n const auth = authorized[key];\n const schema = securityDef[key];\n if (!auth) {\n return;\n }\n const value = auth.value || auth;\n const {\n type\n } = schema;\n if (auth) {\n if (type === 'apiKey') {\n if (schema.in === 'query') {\n result.query[schema.name] = value;\n }\n if (schema.in === 'header') {\n result.headers[schema.name] = value;\n }\n if (schema.in === 'cookie') {\n result.cookies[schema.name] = value;\n }\n } else if (type === 'http') {\n if (/^basic$/i.test(schema.scheme)) {\n const username = value.username || '';\n const password = value.password || '';\n const encoded = btoa(`${username}:${password}`);\n result.headers.Authorization = `Basic ${encoded}`;\n }\n if (/^bearer$/i.test(schema.scheme)) {\n result.headers.Authorization = `Bearer ${value}`;\n }\n } else if (type === 'oauth2' || type === 'openIdConnect') {\n const token = auth.token || {};\n const tokenName = schema['x-tokenName'] || 'access_token';\n const tokenValue = token[tokenName];\n let tokenType = token.token_type;\n if (!tokenType || tokenType.toLowerCase() === 'bearer') {\n tokenType = 'Bearer';\n }\n result.headers.Authorization = `${tokenType} ${tokenValue}`;\n }\n }\n });\n });\n return result;\n}","import btoa from '../../helpers/btoa.node.js';\n\n// This function runs after the common function,\n// `src/execute/index.js#buildRequest`\nexport default function buildRequest(options, req) {\n const {\n spec,\n operation,\n securities,\n requestContentType,\n responseContentType,\n attachContentTypeForEmptyPayload\n } = options;\n // Add securities, which are applicable\n req = applySecurities({\n request: req,\n securities,\n operation,\n spec\n });\n if (req.body || req.form || attachContentTypeForEmptyPayload) {\n // all following conditionals are Swagger2 only\n if (requestContentType) {\n req.headers['Content-Type'] = requestContentType;\n } else if (Array.isArray(operation.consumes)) {\n [req.headers['Content-Type']] = operation.consumes;\n } else if (Array.isArray(spec.consumes)) {\n [req.headers['Content-Type']] = spec.consumes;\n } else if (operation.parameters && operation.parameters.filter(p => p.type === 'file').length) {\n req.headers['Content-Type'] = 'multipart/form-data';\n } else if (operation.parameters && operation.parameters.filter(p => p.in === 'formData').length) {\n req.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n }\n } else if (requestContentType) {\n const isBodyParamPresent = operation.parameters && operation.parameters.filter(p => p.in === 'body').length > 0;\n const isFormDataParamPresent = operation.parameters && operation.parameters.filter(p => p.in === 'formData').length > 0;\n if (isBodyParamPresent || isFormDataParamPresent) {\n req.headers['Content-Type'] = requestContentType;\n }\n }\n if (!responseContentType && Array.isArray(operation.produces) && operation.produces.length > 0) {\n req.headers.accept = operation.produces.join(', ');\n }\n return req;\n}\n\n// Add security values, to operations - that declare their need on them\nexport function applySecurities({\n request,\n securities = {},\n operation = {},\n spec\n}) {\n const result = {\n ...request\n };\n const {\n authorized = {},\n specSecurity = []\n } = securities;\n const security = operation.security || specSecurity;\n const isAuthorized = authorized && !!Object.keys(authorized).length;\n const securityDef = spec.securityDefinitions;\n result.headers = result.headers || {};\n result.query = result.query || {};\n if (!Object.keys(securities).length || !isAuthorized || !security || Array.isArray(operation.security) && !operation.security.length) {\n return request;\n }\n security.forEach(securityObj => {\n Object.keys(securityObj).forEach(key => {\n const auth = authorized[key];\n if (!auth) {\n return;\n }\n const {\n token\n } = auth;\n const value = auth.value || auth;\n const schema = securityDef[key];\n const {\n type\n } = schema;\n const tokenName = schema['x-tokenName'] || 'access_token';\n const oauthToken = token && token[tokenName];\n let tokenType = token && token.token_type;\n if (auth) {\n if (type === 'apiKey') {\n const inType = schema.in === 'query' ? 'query' : 'headers';\n result[inType] = result[inType] || {};\n result[inType][schema.name] = value;\n } else if (type === 'basic') {\n if (value.header) {\n result.headers.authorization = value.header;\n } else {\n const username = value.username || '';\n const password = value.password || '';\n value.base64 = btoa(`${username}:${password}`);\n result.headers.authorization = `Basic ${value.base64}`;\n }\n } else if (type === 'oauth2' && oauthToken) {\n tokenType = !tokenType || tokenType.toLowerCase() === 'bearer' ? 'Bearer' : tokenType;\n result.headers.authorization = `${tokenType} ${oauthToken}`;\n }\n }\n });\n });\n return result;\n}","// iterate over each operation, and fire a callback with details\n// `find=true` will stop iterating, when the cb returns truthy\nexport default function eachOperation(spec, cb, find) {\n if (!spec || typeof spec !== 'object' || !spec.paths || typeof spec.paths !== 'object') {\n return null;\n }\n const {\n paths\n } = spec;\n\n // Iterate over the spec, collecting operations\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (const pathName in paths) {\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (const method in paths[pathName]) {\n if (method.toUpperCase() === 'PARAMETERS') {\n continue; // eslint-disable-line no-continue\n }\n const operation = paths[pathName][method];\n if (!operation || typeof operation !== 'object') {\n continue; // eslint-disable-line no-continue\n }\n const operationObj = {\n spec,\n pathName,\n method: method.toUpperCase(),\n operation\n };\n const cbValue = cb(operationObj);\n if (find && cbValue) {\n return operationObj;\n }\n }\n }\n return undefined;\n}","import eachOperation from './each-operation.js';\n\n// Will stop iterating over the operations and return the operationObj\n// as soon as predicate returns true\nexport default function findOperation(spec, predicate) {\n return eachOperation(spec, predicate, true) || null;\n}","export default function idFromPathMethodLegacy(pathName, method) {\n return `${method.toLowerCase()}-${pathName}`;\n}","import findOperation from './find-operation.js';\nimport opId from './op-id.js';\nimport idFromPathMethodLegacy from './id-from-path-method/legacy.js';\nexport default function getOperationRaw(spec, id) {\n if (!spec || !spec.paths) {\n return null;\n }\n return findOperation(spec, ({\n pathName,\n method,\n operation\n }) => {\n if (!operation || typeof operation !== 'object') {\n return false;\n }\n const rawOperationId = operation.operationId; // straight from the source\n const operationId = opId(operation, pathName, method);\n const legacyOperationId = idFromPathMethodLegacy(pathName, method);\n return [operationId, legacyOperationId, rawOperationId].some(val => val && val === id);\n });\n}","import { url } from '@swagger-api/apidom-reference/configuration/empty';\nconst {\n isHttpUrl\n} = url;\nexport default isHttpUrl;","import { identity, has } from 'ramda';\nimport { isPlainObject, isNonEmptyString } from 'ramda-adjunct';\nimport { test as testServerURLTemplate, substitute as substituteServerURLTemplate } from 'openapi-server-url-templating';\nimport { ApiDOMStructuredError } from '@swagger-api/apidom-error';\nimport { url } from '@swagger-api/apidom-reference/configuration/empty';\nimport { DEFAULT_BASE_URL, DEFAULT_OPENAPI_3_SERVER, TRAVERSE_LIMIT } from '../constants.js';\nimport stockHttp from '../http/index.js';\nimport { serializeRequest } from '../http/serializers/request/index.js';\nimport SWAGGER2_PARAMETER_BUILDERS from './swagger2/parameter-builders.js';\nimport * as OAS3_PARAMETER_BUILDERS from './oas3/parameter-builders.js';\nimport oas3BuildRequest from './oas3/build-request.js';\nimport swagger2BuildRequest from './swagger2/build-request.js';\nimport { getOperationRaw, idFromPathMethodLegacy } from '../helpers/index.js';\nimport { isOpenAPI3 } from '../helpers/openapi-predicates.js';\nimport { serialize as serializeCookie } from '../helpers/cookie.js';\nconst arrayOrEmpty = ar => Array.isArray(ar) ? ar : [];\nconst findObjectSchema = (schema, {\n recurse = true,\n depth = 1\n} = {}) => {\n if (!isPlainObject(schema)) return undefined;\n\n // check if the schema is an object type\n if (schema.type === 'object' || Array.isArray(schema.type) && schema.type.includes('object')) {\n return schema;\n }\n if (depth > TRAVERSE_LIMIT) return undefined;\n if (recurse) {\n // traverse oneOf keyword first\n const oneOfResult = Array.isArray(schema.oneOf) ? schema.oneOf.find(subschema => findObjectSchema(subschema, {\n recurse,\n depth: depth + 1\n })) : undefined;\n if (oneOfResult) return oneOfResult;\n\n // traverse anyOf keyword second\n const anyOfResult = Array.isArray(schema.anyOf) ? schema.anyOf.find(subschema => findObjectSchema(subschema, {\n recurse,\n depth: depth + 1\n })) : undefined;\n if (anyOfResult) return anyOfResult;\n }\n return undefined;\n};\nconst parseJsonObject = ({\n value,\n silentFail = false\n}) => {\n try {\n const parsedValue = JSON.parse(value);\n if (typeof parsedValue === 'object') {\n return parsedValue;\n }\n if (!silentFail) {\n throw new Error('Expected JSON serialized object');\n }\n } catch {\n if (!silentFail) {\n throw new Error('Could not parse object parameter value string as JSON Object');\n }\n }\n return value;\n};\n\n/**\n * `parseURIReference` function simulates the behavior of `node:url` parse function.\n * New WHATWG URL API is not capable of parsing relative references natively,\n * but can be adapter by utilizing the `base` parameter.\n */\nconst parseURIReference = uriReference => {\n try {\n return new URL(uriReference);\n } catch {\n const parsedURL = new URL(uriReference, DEFAULT_BASE_URL);\n const pathname = String(uriReference).startsWith('/') ? parsedURL.pathname : parsedURL.pathname.substring(1);\n return {\n hash: parsedURL.hash,\n host: '',\n hostname: '',\n href: '',\n origin: '',\n password: '',\n pathname,\n port: '',\n protocol: '',\n search: parsedURL.search,\n searchParams: parsedURL.searchParams\n };\n }\n};\nclass OperationNotFoundError extends ApiDOMStructuredError {}\nconst findParametersWithName = (name, parameters) => parameters.filter(p => p.name === name);\n\n// removes parameters that have duplicate 'in' and 'name' properties\nconst deduplicateParameters = parameters => {\n const paramsMap = {};\n parameters.forEach(p => {\n if (!paramsMap[p.in]) {\n paramsMap[p.in] = {};\n }\n paramsMap[p.in][p.name] = p;\n });\n const dedupedParameters = [];\n Object.keys(paramsMap).forEach(i => {\n Object.keys(paramsMap[i]).forEach(p => {\n dedupedParameters.push(paramsMap[i][p]);\n });\n });\n return dedupedParameters;\n};\n\n// For stubbing in tests\nexport const self = {\n buildRequest\n};\n\n// Execute request, with the given operationId and parameters\n// pathName/method or operationId is optional\nexport function execute({\n http: userHttp,\n fetch,\n // This is legacy\n spec,\n operationId,\n pathName,\n method,\n parameters,\n securities,\n ...extras\n}) {\n // Provide default fetch implementation\n const http = userHttp || fetch || stockHttp; // Default to _our_ http\n\n if (pathName && method && !operationId) {\n operationId = idFromPathMethodLegacy(pathName, method);\n }\n const request = self.buildRequest({\n spec,\n operationId,\n parameters,\n securities,\n http,\n ...extras\n });\n if (request.body && (isPlainObject(request.body) || Array.isArray(request.body))) {\n request.body = JSON.stringify(request.body);\n }\n\n // Build request and execute it\n return http(request);\n}\n\n// Build a request, which can be handled by the `http.js` implementation.\nexport function buildRequest(options) {\n const {\n spec,\n operationId,\n responseContentType,\n scheme,\n requestInterceptor,\n responseInterceptor,\n contextUrl,\n userFetch,\n server,\n serverVariables,\n http,\n signal,\n serverVariableEncoder\n } = options;\n let {\n parameters,\n parameterBuilders,\n baseURL\n } = options;\n const specIsOAS3 = isOpenAPI3(spec);\n if (!parameterBuilders) {\n // user did not provide custom parameter builders\n if (specIsOAS3) {\n parameterBuilders = OAS3_PARAMETER_BUILDERS;\n } else {\n parameterBuilders = SWAGGER2_PARAMETER_BUILDERS;\n }\n }\n\n // Set credentials with 'http.withCredentials' value\n const credentials = http && http.withCredentials ? 'include' : 'same-origin';\n\n // Base Template\n let req = {\n url: '',\n credentials,\n headers: {},\n cookies: {}\n };\n if (signal) {\n req.signal = signal;\n }\n if (requestInterceptor) {\n req.requestInterceptor = requestInterceptor;\n }\n if (responseInterceptor) {\n req.responseInterceptor = responseInterceptor;\n }\n if (userFetch) {\n req.userFetch = userFetch;\n }\n const operationRaw = getOperationRaw(spec, operationId);\n if (!operationRaw) {\n throw new OperationNotFoundError(`Operation ${operationId} not found`);\n }\n const {\n operation = {},\n method,\n pathName\n } = operationRaw;\n baseURL = baseURL !== null && baseURL !== void 0 ? baseURL : baseUrl({\n spec,\n scheme,\n contextUrl,\n server,\n serverVariables,\n pathName,\n method,\n serverVariableEncoder\n });\n req.url += baseURL;\n\n // Mostly for testing\n if (!operationId) {\n // Not removing req.cookies causes testing issues and would\n // change our interface, so we're always sure to remove it.\n // See the same statement lower down in this function for\n // more context.\n delete req.cookies;\n return req;\n }\n req.url += pathName; // Have not yet replaced the path parameters\n req.method = `${method}`.toUpperCase();\n parameters = parameters || {};\n const path = spec.paths[pathName] || {};\n if (responseContentType) {\n req.headers.accept = responseContentType;\n }\n const combinedParameters = deduplicateParameters([].concat(arrayOrEmpty(operation.parameters)) // operation parameters\n .concat(arrayOrEmpty(path.parameters))); // path parameters\n\n // REVIEW: OAS3: have any key names or parameter shapes changed?\n // Any new features that need to be plugged in here?\n\n // Add values to request\n combinedParameters.forEach(parameter => {\n const builder = parameterBuilders[parameter.in];\n let value;\n if (parameter.in === 'body' && parameter.schema && parameter.schema.properties) {\n value = parameters;\n }\n value = parameter && parameter.name && parameters[parameter.name];\n if (typeof value === 'undefined') {\n // check for `name-in` formatted key\n value = parameter && parameter.name && parameters[`${parameter.in}.${parameter.name}`];\n } else if (findParametersWithName(parameter.name, combinedParameters).length > 1) {\n // value came from `parameters[parameter.name]`\n // check to see if this is an ambiguous parameter\n // eslint-disable-next-line no-console\n console.warn(`Parameter '${parameter.name}' is ambiguous because the defined spec has more than one parameter with the name: '${parameter.name}' and the passed-in parameter values did not define an 'in' value.`);\n }\n if (value === null) {\n return;\n }\n if (typeof parameter.default !== 'undefined' && typeof value === 'undefined') {\n value = parameter.default;\n }\n if (typeof value === 'undefined' && parameter.required && !parameter.allowEmptyValue) {\n throw new Error(`Required parameter ${parameter.name} is not provided`);\n }\n if (specIsOAS3 && typeof value === 'string') {\n if (has('type', parameter.schema) && findObjectSchema(parameter.schema, {\n recurse: false\n })) {\n value = parseJsonObject({\n value,\n silentFail: false\n });\n } else if (findObjectSchema(parameter.schema, {\n recurse: true\n })) {\n value = parseJsonObject({\n value,\n silentFail: true\n });\n }\n }\n if (builder) {\n builder({\n req,\n parameter,\n value,\n operation,\n spec,\n baseURL\n });\n }\n });\n\n // Do version-specific tasks, then return those results.\n const versionSpecificOptions = {\n ...options,\n operation\n };\n if (specIsOAS3) {\n req = oas3BuildRequest(versionSpecificOptions, req);\n } else {\n // If not OAS3, then treat as Swagger2.\n req = swagger2BuildRequest(versionSpecificOptions, req);\n }\n\n // If the cookie convenience object exists in our request,\n // serialize its content and then delete the cookie object.\n if (req.cookies && Object.keys(req.cookies).length > 0) {\n const cookieString = serializeCookie(req.cookies);\n if (isNonEmptyString(req.headers.Cookie)) {\n req.headers.Cookie += `; ${cookieString}`;\n } else {\n req.headers.Cookie = cookieString;\n }\n }\n if (req.cookies) {\n // even if no cookies were defined, we need to remove\n // the cookies key from our request, or many legacy\n // tests will break.\n delete req.cookies;\n }\n\n // Will add the query object into the URL, if it exists\n // ... will also create a FormData instance, if multipart/form-data (eg: a file)\n return serializeRequest(req);\n}\nconst stripNonAlpha = str => str ? str.replace(/\\W/g, '') : null;\n\n// be careful when modifying this! it is a publicly-exposed method.\nexport function baseUrl(obj) {\n const specIsOAS3 = isOpenAPI3(obj.spec);\n return specIsOAS3 ? oas3BaseUrl(obj) : swagger2BaseUrl(obj);\n}\nconst isNonEmptyServerList = value => Array.isArray(value) && value.length > 0;\nfunction oas3BaseUrl({\n spec,\n pathName,\n method,\n server,\n contextUrl,\n serverVariables = {},\n serverVariableEncoder\n}) {\n var _spec$paths, _spec$paths2;\n let servers = [];\n let selectedServerUrl = '';\n let selectedServerObj;\n\n // compute the servers (this will be taken care of by ApiDOM refrator plugins in future\n const operationLevelServers = spec === null || spec === void 0 || (_spec$paths = spec.paths) === null || _spec$paths === void 0 || (_spec$paths = _spec$paths[pathName]) === null || _spec$paths === void 0 || (_spec$paths = _spec$paths[(method || '').toLowerCase()]) === null || _spec$paths === void 0 ? void 0 : _spec$paths.servers;\n const pathItemLevelServers = spec === null || spec === void 0 || (_spec$paths2 = spec.paths) === null || _spec$paths2 === void 0 || (_spec$paths2 = _spec$paths2[pathName]) === null || _spec$paths2 === void 0 ? void 0 : _spec$paths2.servers;\n const rootLevelServers = spec === null || spec === void 0 ? void 0 : spec.servers;\n servers = isNonEmptyServerList(operationLevelServers) // eslint-disable-line no-nested-ternary\n ? operationLevelServers : isNonEmptyServerList(pathItemLevelServers) // eslint-disable-line no-nested-ternary\n ? pathItemLevelServers : isNonEmptyServerList(rootLevelServers) ? rootLevelServers : [DEFAULT_OPENAPI_3_SERVER];\n\n // pick the first server that matches the server url\n if (server) {\n selectedServerObj = servers.find(srv => srv.url === server);\n if (selectedServerObj) selectedServerUrl = server;\n }\n\n // default to the first server if we don't have one by now\n if (!selectedServerUrl) {\n [selectedServerObj] = servers;\n selectedServerUrl = selectedServerObj.url;\n }\n if (testServerURLTemplate(selectedServerUrl, {\n strict: true\n })) {\n const selectedServerVariables = Object.entries({\n ...selectedServerObj.variables\n }).reduce((acc, [serverVariableName, serverVariable]) => {\n acc[serverVariableName] = serverVariable.default;\n return acc;\n }, {});\n selectedServerUrl = substituteServerURLTemplate(selectedServerUrl, {\n ...selectedServerVariables,\n ...serverVariables\n }, {\n encoder: typeof serverVariableEncoder === 'function' ? serverVariableEncoder : identity\n });\n }\n return buildOas3UrlWithContext(selectedServerUrl, contextUrl);\n}\nfunction buildOas3UrlWithContext(ourUrl = '', contextUrl = '') {\n // relative server url should be resolved against contextUrl\n const parsedUrl = ourUrl && contextUrl ? parseURIReference(url.resolve(contextUrl, ourUrl)) : parseURIReference(ourUrl);\n const parsedContextUrl = parseURIReference(contextUrl);\n const computedScheme = stripNonAlpha(parsedUrl.protocol) || stripNonAlpha(parsedContextUrl.protocol);\n const computedHost = parsedUrl.host || parsedContextUrl.host;\n const computedPath = parsedUrl.pathname;\n let res;\n if (computedScheme && computedHost) {\n res = `${computedScheme}://${computedHost + computedPath}`;\n\n // if last character is '/', trim it off\n } else {\n res = computedPath;\n }\n return res[res.length - 1] === '/' ? res.slice(0, -1) : res;\n}\n\n// Compose the baseUrl ( scheme + host + basePath )\nfunction swagger2BaseUrl({\n spec,\n scheme,\n contextUrl = ''\n}) {\n const parsedContextUrl = parseURIReference(contextUrl);\n const firstSchemeInSpec = Array.isArray(spec.schemes) ? spec.schemes[0] : null;\n const computedScheme = scheme || firstSchemeInSpec || stripNonAlpha(parsedContextUrl.protocol) || 'http';\n const computedHost = spec.host || parsedContextUrl.host || '';\n const computedPath = spec.basePath || '';\n let res;\n if (computedScheme && computedHost) {\n // we have what we need for an absolute URL\n res = `${computedScheme}://${computedHost + computedPath}`;\n } else {\n // if not, a relative URL will have to do\n res = computedPath;\n }\n\n // If last character is '/', trim it off\n return res[res.length - 1] === '/' ? res.slice(0, -1) : res;\n}","// The subtree resolver is a higher-level interface that allows you to\n// get the same result that you would from `Swagger.resolve`, but focuses on\n// a subtree of your object.\n//\n// It makes several assumptions that allow you to think less about what resolve,\n// specmap, and normalizeSwagger are doing: if this is not suitable for you,\n// you can emulate `resolveSubtree`'s behavior by talking to the traditional\n// resolver directly.\n//\n// By providing a top-level `obj` and a `path` to resolve within, the subtree\n// at `path` will be resolved and normalized in the context of your top-level\n// `obj`. You'll get the resolved subtree you're interest in as a return value\n// (or, you can use `returnEntireTree` to get everything back).\n//\n// This is useful for cases where resolving your entire object is unnecessary\n// and/or non-performant; we use this interface for lazily resolving operations\n// and models in Swagger-UI, which allows us to handle larger OpenAPI descriptions.\n//\n// It's likely that Swagger-Client will rely entirely on lazy resolving in\n// future versions.\n//\n// TODO: move the remarks above into project documentation\nimport resolve from '../resolver/index.js';\nimport genericResolverStrategy from '../resolver/strategies/generic/index.js';\nimport openApi2ResolverStrategy from '../resolver/strategies/openapi-2/index.js';\nimport openApi30ResolverStrategy from '../resolver/strategies/openapi-3-0/index.js';\nimport { isOpenAPI31 } from '../helpers/openapi-predicates.js';\nconst resolveSubtree = async (obj, path, options = {}) => {\n const {\n returnEntireTree,\n baseDoc,\n requestInterceptor,\n responseInterceptor,\n parameterMacro,\n modelPropertyMacro,\n useCircularStructures,\n strategies\n } = options;\n const resolveOptions = {\n spec: obj,\n pathDiscriminator: path,\n baseDoc,\n requestInterceptor,\n responseInterceptor,\n parameterMacro,\n modelPropertyMacro,\n useCircularStructures,\n strategies\n };\n const strategy = strategies.find(strg => strg.match(obj));\n const normalized = strategy.normalize(obj);\n const result = await resolve({\n spec: normalized,\n ...resolveOptions,\n allowMetaPatches: true,\n skipNormalization: !isOpenAPI31(obj)\n });\n if (!returnEntireTree && Array.isArray(path) && path.length) {\n result.spec = path.reduce((acc, pathSegment) => acc === null || acc === void 0 ? void 0 : acc[pathSegment], result.spec) || null;\n }\n return result;\n};\nexport const makeResolveSubtree = defaultOptions => async (obj, path, options = {}) => {\n const mergedOptions = {\n ...defaultOptions,\n ...options\n };\n return resolveSubtree(obj, path, mergedOptions);\n};\nexport default makeResolveSubtree({\n strategies: [openApi30ResolverStrategy, openApi2ResolverStrategy, genericResolverStrategy]\n});","// src/utils/react.ts\nimport * as React from \"react\";\n\n// src/utils/react-is.ts\nvar IS_REACT_19 = /* @__PURE__ */React.version.startsWith(\"19\");\nvar REACT_ELEMENT_TYPE = /* @__PURE__ */Symbol.for(IS_REACT_19 ? \"react.transitional.element\" : \"react.element\");\nvar REACT_PORTAL_TYPE = /* @__PURE__ */Symbol.for(\"react.portal\");\nvar REACT_FRAGMENT_TYPE = /* @__PURE__ */Symbol.for(\"react.fragment\");\nvar REACT_STRICT_MODE_TYPE = /* @__PURE__ */Symbol.for(\"react.strict_mode\");\nvar REACT_PROFILER_TYPE = /* @__PURE__ */Symbol.for(\"react.profiler\");\nvar REACT_CONSUMER_TYPE = /* @__PURE__ */Symbol.for(\"react.consumer\");\nvar REACT_CONTEXT_TYPE = /* @__PURE__ */Symbol.for(\"react.context\");\nvar REACT_FORWARD_REF_TYPE = /* @__PURE__ */Symbol.for(\"react.forward_ref\");\nvar REACT_SUSPENSE_TYPE = /* @__PURE__ */Symbol.for(\"react.suspense\");\nvar REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */Symbol.for(\"react.suspense_list\");\nvar REACT_MEMO_TYPE = /* @__PURE__ */Symbol.for(\"react.memo\");\nvar REACT_LAZY_TYPE = /* @__PURE__ */Symbol.for(\"react.lazy\");\nvar REACT_OFFSCREEN_TYPE = /* @__PURE__ */Symbol.for(\"react.offscreen\");\nvar REACT_CLIENT_REFERENCE = /* @__PURE__ */Symbol.for(\"react.client.reference\");\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nfunction isValidElementType(type) {\n return typeof type === \"string\" || typeof type === \"function\" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || typeof type === \"object\" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0) ? true : false;\n}\nfunction typeOf(object) {\n if (typeof object === \"object\" && object !== null) {\n const {\n $$typeof\n } = object;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (object = object.type, object) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return object;\n default:\n switch (object = object && object.$$typeof, object) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n}\nfunction isContextConsumer(object) {\n return IS_REACT_19 ? typeOf(object) === REACT_CONSUMER_TYPE : typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\n\n// src/utils/warning.ts\nfunction warning(message) {\n if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n console.error(message);\n }\n try {\n throw new Error(message);\n } catch (e) {}\n}\n\n// src/connect/verifySubselectors.ts\nfunction verify(selector, methodName) {\n if (!selector) {\n throw new Error(`Unexpected value for ${methodName} in connect.`);\n } else if (methodName === \"mapStateToProps\" || methodName === \"mapDispatchToProps\") {\n if (!Object.prototype.hasOwnProperty.call(selector, \"dependsOnOwnProps\")) {\n warning(`The selector for ${methodName} of connect did not specify a value for dependsOnOwnProps.`);\n }\n }\n}\nfunction verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps) {\n verify(mapStateToProps, \"mapStateToProps\");\n verify(mapDispatchToProps, \"mapDispatchToProps\");\n verify(mergeProps, \"mergeProps\");\n}\n\n// src/connect/selectorFactory.ts\nfunction pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, {\n areStatesEqual,\n areOwnPropsEqual,\n areStatePropsEqual\n}) {\n let hasRunAtLeastOnce = false;\n let state;\n let ownProps;\n let stateProps;\n let dispatchProps;\n let mergedProps;\n function handleFirstCall(firstState, firstOwnProps) {\n state = firstState;\n ownProps = firstOwnProps;\n stateProps = mapStateToProps(state, ownProps);\n dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n hasRunAtLeastOnce = true;\n return mergedProps;\n }\n function handleNewPropsAndNewState() {\n stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleNewProps() {\n if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);\n if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);\n mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleNewState() {\n const nextStateProps = mapStateToProps(state, ownProps);\n const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n stateProps = nextStateProps;\n if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n return mergedProps;\n }\n function handleSubsequentCalls(nextState, nextOwnProps) {\n const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n const stateChanged = !areStatesEqual(nextState, state, nextOwnProps, ownProps);\n state = nextState;\n ownProps = nextOwnProps;\n if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n if (propsChanged) return handleNewProps();\n if (stateChanged) return handleNewState();\n return mergedProps;\n }\n return function pureFinalPropsSelector(nextState, nextOwnProps) {\n return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n };\n}\nfunction finalPropsSelectorFactory(dispatch, {\n initMapStateToProps,\n initMapDispatchToProps,\n initMergeProps,\n ...options\n}) {\n const mapStateToProps = initMapStateToProps(dispatch, options);\n const mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n const mergeProps = initMergeProps(dispatch, options);\n if (process.env.NODE_ENV !== \"production\") {\n verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps);\n }\n return pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}\n\n// src/utils/bindActionCreators.ts\nfunction bindActionCreators(actionCreators, dispatch) {\n const boundActionCreators = {};\n for (const key in actionCreators) {\n const actionCreator = actionCreators[key];\n if (typeof actionCreator === \"function\") {\n boundActionCreators[key] = (...args) => dispatch(actionCreator(...args));\n }\n }\n return boundActionCreators;\n}\n\n// src/utils/isPlainObject.ts\nfunction isPlainObject(obj) {\n if (typeof obj !== \"object\" || obj === null) return false;\n const proto = Object.getPrototypeOf(obj);\n if (proto === null) return true;\n let baseProto = proto;\n while (Object.getPrototypeOf(baseProto) !== null) {\n baseProto = Object.getPrototypeOf(baseProto);\n }\n return proto === baseProto;\n}\n\n// src/utils/verifyPlainObject.ts\nfunction verifyPlainObject(value, displayName, methodName) {\n if (!isPlainObject(value)) {\n warning(`${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`);\n }\n}\n\n// src/connect/wrapMapToProps.ts\nfunction wrapMapToPropsConstant(getConstant) {\n return function initConstantSelector(dispatch) {\n const constant = getConstant(dispatch);\n function constantSelector() {\n return constant;\n }\n constantSelector.dependsOnOwnProps = false;\n return constantSelector;\n };\n}\nfunction getDependsOnOwnProps(mapToProps) {\n return mapToProps.dependsOnOwnProps ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\nfunction wrapMapToPropsFunc(mapToProps, methodName) {\n return function initProxySelector(dispatch, {\n displayName\n }) {\n const proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch, void 0);\n };\n proxy.dependsOnOwnProps = true;\n proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n proxy.mapToProps = mapToProps;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n let props = proxy(stateOrDispatch, ownProps);\n if (typeof props === \"function\") {\n proxy.mapToProps = props;\n proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n props = proxy(stateOrDispatch, ownProps);\n }\n if (process.env.NODE_ENV !== \"production\") verifyPlainObject(props, displayName, methodName);\n return props;\n };\n return proxy;\n };\n}\n\n// src/connect/invalidArgFactory.ts\nfunction createInvalidArgFactory(arg, name) {\n return (dispatch, options) => {\n throw new Error(`Invalid value of type ${typeof arg} for ${name} argument when connecting component ${options.wrappedComponentName}.`);\n };\n}\n\n// src/connect/mapDispatchToProps.ts\nfunction mapDispatchToPropsFactory(mapDispatchToProps) {\n return mapDispatchToProps && typeof mapDispatchToProps === \"object\" ? wrapMapToPropsConstant(dispatch =>\n // @ts-ignore\n bindActionCreators(mapDispatchToProps, dispatch)) : !mapDispatchToProps ? wrapMapToPropsConstant(dispatch => ({\n dispatch\n })) : typeof mapDispatchToProps === \"function\" ?\n // @ts-ignore\n wrapMapToPropsFunc(mapDispatchToProps, \"mapDispatchToProps\") : createInvalidArgFactory(mapDispatchToProps, \"mapDispatchToProps\");\n}\n\n// src/connect/mapStateToProps.ts\nfunction mapStateToPropsFactory(mapStateToProps) {\n return !mapStateToProps ? wrapMapToPropsConstant(() => ({})) : typeof mapStateToProps === \"function\" ?\n // @ts-ignore\n wrapMapToPropsFunc(mapStateToProps, \"mapStateToProps\") : createInvalidArgFactory(mapStateToProps, \"mapStateToProps\");\n}\n\n// src/connect/mergeProps.ts\nfunction defaultMergeProps(stateProps, dispatchProps, ownProps) {\n return {\n ...ownProps,\n ...stateProps,\n ...dispatchProps\n };\n}\nfunction wrapMergePropsFunc(mergeProps) {\n return function initMergePropsProxy(dispatch, {\n displayName,\n areMergedPropsEqual\n }) {\n let hasRunOnce = false;\n let mergedProps;\n return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n if (hasRunOnce) {\n if (!areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;\n } else {\n hasRunOnce = true;\n mergedProps = nextMergedProps;\n if (process.env.NODE_ENV !== \"production\") verifyPlainObject(mergedProps, displayName, \"mergeProps\");\n }\n return mergedProps;\n };\n };\n}\nfunction mergePropsFactory(mergeProps) {\n return !mergeProps ? () => defaultMergeProps : typeof mergeProps === \"function\" ? wrapMergePropsFunc(mergeProps) : createInvalidArgFactory(mergeProps, \"mergeProps\");\n}\n\n// src/utils/batch.ts\nfunction defaultNoopBatch(callback) {\n callback();\n}\n\n// src/utils/Subscription.ts\nfunction createListenerCollection() {\n let first = null;\n let last = null;\n return {\n clear() {\n first = null;\n last = null;\n },\n notify() {\n defaultNoopBatch(() => {\n let listener = first;\n while (listener) {\n listener.callback();\n listener = listener.next;\n }\n });\n },\n get() {\n const listeners = [];\n let listener = first;\n while (listener) {\n listeners.push(listener);\n listener = listener.next;\n }\n return listeners;\n },\n subscribe(callback) {\n let isSubscribed = true;\n const listener = last = {\n callback,\n next: null,\n prev: last\n };\n if (listener.prev) {\n listener.prev.next = listener;\n } else {\n first = listener;\n }\n return function unsubscribe() {\n if (!isSubscribed || first === null) return;\n isSubscribed = false;\n if (listener.next) {\n listener.next.prev = listener.prev;\n } else {\n last = listener.prev;\n }\n if (listener.prev) {\n listener.prev.next = listener.next;\n } else {\n first = listener.next;\n }\n };\n }\n };\n}\nvar nullListeners = {\n notify() {},\n get: () => []\n};\nfunction createSubscription(store, parentSub) {\n let unsubscribe;\n let listeners = nullListeners;\n let subscriptionsAmount = 0;\n let selfSubscribed = false;\n function addNestedSub(listener) {\n trySubscribe();\n const cleanupListener = listeners.subscribe(listener);\n let removed = false;\n return () => {\n if (!removed) {\n removed = true;\n cleanupListener();\n tryUnsubscribe();\n }\n };\n }\n function notifyNestedSubs() {\n listeners.notify();\n }\n function handleChangeWrapper() {\n if (subscription.onStateChange) {\n subscription.onStateChange();\n }\n }\n function isSubscribed() {\n return selfSubscribed;\n }\n function trySubscribe() {\n subscriptionsAmount++;\n if (!unsubscribe) {\n unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);\n listeners = createListenerCollection();\n }\n }\n function tryUnsubscribe() {\n subscriptionsAmount--;\n if (unsubscribe && subscriptionsAmount === 0) {\n unsubscribe();\n unsubscribe = void 0;\n listeners.clear();\n listeners = nullListeners;\n }\n }\n function trySubscribeSelf() {\n if (!selfSubscribed) {\n selfSubscribed = true;\n trySubscribe();\n }\n }\n function tryUnsubscribeSelf() {\n if (selfSubscribed) {\n selfSubscribed = false;\n tryUnsubscribe();\n }\n }\n const subscription = {\n addNestedSub,\n notifyNestedSubs,\n handleChangeWrapper,\n isSubscribed,\n trySubscribe: trySubscribeSelf,\n tryUnsubscribe: tryUnsubscribeSelf,\n getListeners: () => listeners\n };\n return subscription;\n}\n\n// src/utils/useIsomorphicLayoutEffect.ts\nvar canUseDOM = () => !!(typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\");\nvar isDOM = /* @__PURE__ */canUseDOM();\nvar isRunningInReactNative = () => typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\";\nvar isReactNative = /* @__PURE__ */isRunningInReactNative();\nvar getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;\nvar useIsomorphicLayoutEffect = /* @__PURE__ */getUseIsomorphicLayoutEffect();\n\n// src/utils/shallowEqual.ts\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n for (let i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}\n\n// src/utils/hoistStatics.ts\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n $$typeof: true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n $$typeof: true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {\n [ForwardRef]: FORWARD_REF_STATICS,\n [Memo]: MEMO_STATICS\n};\nfunction getStatics(component) {\n if (isMemo(component)) {\n return MEMO_STATICS;\n }\n return TYPE_STATICS[component[\"$$typeof\"]] || REACT_STATICS;\n}\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent) {\n if (typeof sourceComponent !== \"string\") {\n if (objectPrototype) {\n const inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent);\n }\n }\n let keys = getOwnPropertyNames(sourceComponent);\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n const targetStatics = getStatics(targetComponent);\n const sourceStatics = getStatics(sourceComponent);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!KNOWN_STATICS[key] && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try {\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n return targetComponent;\n}\n\n// src/components/Context.ts\nvar ContextKey = /* @__PURE__ */Symbol.for(`react-redux-context`);\nvar gT = typeof globalThis !== \"undefined\" ? globalThis : (/* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */\n{});\nfunction getContext() {\n if (!React.createContext) return {};\n const contextMap = gT[ContextKey] ??= /* @__PURE__ */new Map();\n let realContext = contextMap.get(React.createContext);\n if (!realContext) {\n realContext = React.createContext(null);\n if (process.env.NODE_ENV !== \"production\") {\n realContext.displayName = \"ReactRedux\";\n }\n contextMap.set(React.createContext, realContext);\n }\n return realContext;\n}\nvar ReactReduxContext = /* @__PURE__ */getContext();\n\n// src/components/connect.tsx\nvar NO_SUBSCRIPTION_ARRAY = [null, null];\nvar stringifyComponent = Comp => {\n try {\n return JSON.stringify(Comp);\n } catch (err) {\n return String(Comp);\n }\n};\nfunction useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {\n useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies);\n}\nfunction captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs) {\n lastWrapperProps.current = wrapperProps;\n renderIsScheduled.current = false;\n if (childPropsFromStoreUpdate.current) {\n childPropsFromStoreUpdate.current = null;\n notifyNestedSubs();\n }\n}\nfunction subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, additionalSubscribeListener) {\n if (!shouldHandleStateChanges) return () => {};\n let didUnsubscribe = false;\n let lastThrownError = null;\n const checkForUpdates = () => {\n if (didUnsubscribe || !isMounted.current) {\n return;\n }\n const latestStoreState = store.getState();\n let newChildProps, error;\n try {\n newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current);\n } catch (e) {\n error = e;\n lastThrownError = e;\n }\n if (!error) {\n lastThrownError = null;\n }\n if (newChildProps === lastChildProps.current) {\n if (!renderIsScheduled.current) {\n notifyNestedSubs();\n }\n } else {\n lastChildProps.current = newChildProps;\n childPropsFromStoreUpdate.current = newChildProps;\n renderIsScheduled.current = true;\n additionalSubscribeListener();\n }\n };\n subscription.onStateChange = checkForUpdates;\n subscription.trySubscribe();\n checkForUpdates();\n const unsubscribeWrapper = () => {\n didUnsubscribe = true;\n subscription.tryUnsubscribe();\n subscription.onStateChange = null;\n if (lastThrownError) {\n throw lastThrownError;\n }\n };\n return unsubscribeWrapper;\n}\nfunction strictEqual(a, b) {\n return a === b;\n}\nvar hasWarnedAboutDeprecatedPureOption = false;\nfunction connect(mapStateToProps, mapDispatchToProps, mergeProps, {\n // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence.\n // @ts-ignore\n pure,\n areStatesEqual = strictEqual,\n areOwnPropsEqual = shallowEqual,\n areStatePropsEqual = shallowEqual,\n areMergedPropsEqual = shallowEqual,\n // use React's forwardRef to expose a ref of the wrapped component\n forwardRef = false,\n // the context consumer to use\n context = ReactReduxContext\n} = {}) {\n if (process.env.NODE_ENV !== \"production\") {\n if (pure !== void 0 && !hasWarnedAboutDeprecatedPureOption) {\n hasWarnedAboutDeprecatedPureOption = true;\n warning('The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component');\n }\n }\n const Context = context;\n const initMapStateToProps = mapStateToPropsFactory(mapStateToProps);\n const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps);\n const initMergeProps = mergePropsFactory(mergeProps);\n const shouldHandleStateChanges = Boolean(mapStateToProps);\n const wrapWithConnect = WrappedComponent => {\n if (process.env.NODE_ENV !== \"production\") {\n const isValid = /* @__PURE__ */isValidElementType(WrappedComponent);\n if (!isValid) throw new Error(`You must pass a component to the function returned by connect. Instead received ${stringifyComponent(WrappedComponent)}`);\n }\n const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || \"Component\";\n const displayName = `Connect(${wrappedComponentName})`;\n const selectorFactoryOptions = {\n shouldHandleStateChanges,\n displayName,\n wrappedComponentName,\n WrappedComponent,\n // @ts-ignore\n initMapStateToProps,\n initMapDispatchToProps,\n initMergeProps,\n areStatesEqual,\n areStatePropsEqual,\n areOwnPropsEqual,\n areMergedPropsEqual\n };\n function ConnectFunction(props) {\n const [propsContext, reactReduxForwardedRef, wrapperProps] = React.useMemo(() => {\n const {\n reactReduxForwardedRef: reactReduxForwardedRef2,\n ...wrapperProps2\n } = props;\n return [props.context, reactReduxForwardedRef2, wrapperProps2];\n }, [props]);\n const ContextToUse = React.useMemo(() => {\n let ResultContext = Context;\n if (propsContext?.Consumer) {\n if (process.env.NODE_ENV !== \"production\") {\n const isValid = /* @__PURE__ */isContextConsumer(\n // @ts-ignore\n /* @__PURE__ */\n React.createElement(propsContext.Consumer, null));\n if (!isValid) {\n throw new Error(\"You must pass a valid React context consumer as `props.context`\");\n }\n ResultContext = propsContext;\n }\n }\n return ResultContext;\n }, [propsContext, Context]);\n const contextValue = React.useContext(ContextToUse);\n const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n if (process.env.NODE_ENV !== \"production\" && !didStoreComeFromProps && !didStoreComeFromContext) {\n throw new Error(`Could not find \"store\" in the context of \"${displayName}\". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to ${displayName} in connect options.`);\n }\n const store = didStoreComeFromProps ? props.store : contextValue.store;\n const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState;\n const childPropsSelector = React.useMemo(() => {\n return finalPropsSelectorFactory(store.dispatch, selectorFactoryOptions);\n }, [store]);\n const [subscription, notifyNestedSubs] = React.useMemo(() => {\n if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY;\n const subscription2 = createSubscription(store, didStoreComeFromProps ? void 0 : contextValue.subscription);\n const notifyNestedSubs2 = subscription2.notifyNestedSubs.bind(subscription2);\n return [subscription2, notifyNestedSubs2];\n }, [store, didStoreComeFromProps, contextValue]);\n const overriddenContextValue = React.useMemo(() => {\n if (didStoreComeFromProps) {\n return contextValue;\n }\n return {\n ...contextValue,\n subscription\n };\n }, [didStoreComeFromProps, contextValue, subscription]);\n const lastChildProps = React.useRef(void 0);\n const lastWrapperProps = React.useRef(wrapperProps);\n const childPropsFromStoreUpdate = React.useRef(void 0);\n const renderIsScheduled = React.useRef(false);\n const isMounted = React.useRef(false);\n const latestSubscriptionCallbackError = React.useRef(void 0);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n const actualChildPropsSelector = React.useMemo(() => {\n const selector = () => {\n if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n return childPropsFromStoreUpdate.current;\n }\n return childPropsSelector(store.getState(), wrapperProps);\n };\n return selector;\n }, [store, wrapperProps]);\n const subscribeForReact = React.useMemo(() => {\n const subscribe = reactListener => {\n if (!subscription) {\n return () => {};\n }\n return subscribeUpdates(shouldHandleStateChanges, store, subscription,\n // @ts-ignore\n childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, reactListener);\n };\n return subscribe;\n }, [subscription]);\n useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs]);\n let actualChildProps;\n try {\n actualChildProps = React.useSyncExternalStore(\n // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing\n subscribeForReact,\n // TODO This is incredibly hacky. We've already processed the store update and calculated new child props,\n // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`.\n actualChildPropsSelector, getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector);\n } catch (err) {\n if (latestSubscriptionCallbackError.current) {\n ;\n err.message += `\nThe error may be correlated with this previous error:\n${latestSubscriptionCallbackError.current.stack}\n\n`;\n }\n throw err;\n }\n useIsomorphicLayoutEffect(() => {\n latestSubscriptionCallbackError.current = void 0;\n childPropsFromStoreUpdate.current = void 0;\n lastChildProps.current = actualChildProps;\n });\n const renderedWrappedComponent = React.useMemo(() => {\n return (\n // @ts-ignore\n /* @__PURE__ */\n React.createElement(WrappedComponent, {\n ...actualChildProps,\n ref: reactReduxForwardedRef\n })\n );\n }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]);\n const renderedChild = React.useMemo(() => {\n if (shouldHandleStateChanges) {\n return /* @__PURE__ */React.createElement(ContextToUse.Provider, {\n value: overriddenContextValue\n }, renderedWrappedComponent);\n }\n return renderedWrappedComponent;\n }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n return renderedChild;\n }\n const _Connect = React.memo(ConnectFunction);\n const Connect = _Connect;\n Connect.WrappedComponent = WrappedComponent;\n Connect.displayName = ConnectFunction.displayName = displayName;\n if (forwardRef) {\n const _forwarded = React.forwardRef(function forwardConnectRef(props, ref) {\n return /* @__PURE__ */React.createElement(Connect, {\n ...props,\n reactReduxForwardedRef: ref\n });\n });\n const forwarded = _forwarded;\n forwarded.displayName = displayName;\n forwarded.WrappedComponent = WrappedComponent;\n return /* @__PURE__ */hoistNonReactStatics(forwarded, WrappedComponent);\n }\n return /* @__PURE__ */hoistNonReactStatics(Connect, WrappedComponent);\n };\n return wrapWithConnect;\n}\nvar connect_default = connect;\n\n// src/components/Provider.tsx\nfunction Provider(providerProps) {\n const {\n children,\n context,\n serverState,\n store\n } = providerProps;\n const contextValue = React.useMemo(() => {\n const subscription = createSubscription(store);\n const baseContextValue = {\n store,\n subscription,\n getServerState: serverState ? () => serverState : void 0\n };\n if (process.env.NODE_ENV === \"production\") {\n return baseContextValue;\n } else {\n const {\n identityFunctionCheck = \"once\",\n stabilityCheck = \"once\"\n } = providerProps;\n return /* @__PURE__ */Object.assign(baseContextValue, {\n stabilityCheck,\n identityFunctionCheck\n });\n }\n }, [store, serverState]);\n const previousState = React.useMemo(() => store.getState(), [store]);\n useIsomorphicLayoutEffect(() => {\n const {\n subscription\n } = contextValue;\n subscription.onStateChange = subscription.notifyNestedSubs;\n subscription.trySubscribe();\n if (previousState !== store.getState()) {\n subscription.notifyNestedSubs();\n }\n return () => {\n subscription.tryUnsubscribe();\n subscription.onStateChange = void 0;\n };\n }, [contextValue, previousState]);\n const Context = context || ReactReduxContext;\n return /* @__PURE__ */React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\nvar Provider_default = Provider;\n\n// src/hooks/useReduxContext.ts\nfunction createReduxContextHook(context = ReactReduxContext) {\n return function useReduxContext2() {\n const contextValue = React.useContext(context);\n if (process.env.NODE_ENV !== \"production\" && !contextValue) {\n throw new Error(\"could not find react-redux context value; please ensure the component is wrapped in a \");\n }\n return contextValue;\n };\n}\nvar useReduxContext = /* @__PURE__ */createReduxContextHook();\n\n// src/hooks/useStore.ts\nfunction createStoreHook(context = ReactReduxContext) {\n const useReduxContext2 = context === ReactReduxContext ? useReduxContext :\n // @ts-ignore\n createReduxContextHook(context);\n const useStore2 = () => {\n const {\n store\n } = useReduxContext2();\n return store;\n };\n Object.assign(useStore2, {\n withTypes: () => useStore2\n });\n return useStore2;\n}\nvar useStore = /* @__PURE__ */createStoreHook();\n\n// src/hooks/useDispatch.ts\nfunction createDispatchHook(context = ReactReduxContext) {\n const useStore2 = context === ReactReduxContext ? useStore : createStoreHook(context);\n const useDispatch2 = () => {\n const store = useStore2();\n return store.dispatch;\n };\n Object.assign(useDispatch2, {\n withTypes: () => useDispatch2\n });\n return useDispatch2;\n}\nvar useDispatch = /* @__PURE__ */createDispatchHook();\n\n// src/hooks/useSelector.ts\nimport { useSyncExternalStoreWithSelector } from \"use-sync-external-store/with-selector.js\";\nvar refEquality = (a, b) => a === b;\nfunction createSelectorHook(context = ReactReduxContext) {\n const useReduxContext2 = context === ReactReduxContext ? useReduxContext : createReduxContextHook(context);\n const useSelector2 = (selector, equalityFnOrOptions = {}) => {\n const {\n equalityFn = refEquality\n } = typeof equalityFnOrOptions === \"function\" ? {\n equalityFn: equalityFnOrOptions\n } : equalityFnOrOptions;\n if (process.env.NODE_ENV !== \"production\") {\n if (!selector) {\n throw new Error(`You must pass a selector to useSelector`);\n }\n if (typeof selector !== \"function\") {\n throw new Error(`You must pass a function as a selector to useSelector`);\n }\n if (typeof equalityFn !== \"function\") {\n throw new Error(`You must pass a function as an equality function to useSelector`);\n }\n }\n const reduxContext = useReduxContext2();\n const {\n store,\n subscription,\n getServerState\n } = reduxContext;\n const firstRun = React.useRef(true);\n const wrappedSelector = React.useCallback({\n [selector.name](state) {\n const selected = selector(state);\n if (process.env.NODE_ENV !== \"production\") {\n const {\n devModeChecks = {}\n } = typeof equalityFnOrOptions === \"function\" ? {} : equalityFnOrOptions;\n const {\n identityFunctionCheck,\n stabilityCheck\n } = reduxContext;\n const {\n identityFunctionCheck: finalIdentityFunctionCheck,\n stabilityCheck: finalStabilityCheck\n } = {\n stabilityCheck,\n identityFunctionCheck,\n ...devModeChecks\n };\n if (finalStabilityCheck === \"always\" || finalStabilityCheck === \"once\" && firstRun.current) {\n const toCompare = selector(state);\n if (!equalityFn(selected, toCompare)) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({\n stack\n } = e);\n }\n console.warn(\"Selector \" + (selector.name || \"unknown\") + \" returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization\", {\n state,\n selected,\n selected2: toCompare,\n stack\n });\n }\n }\n if (finalIdentityFunctionCheck === \"always\" || finalIdentityFunctionCheck === \"once\" && firstRun.current) {\n if (selected === state) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({\n stack\n } = e);\n }\n console.warn(\"Selector \" + (selector.name || \"unknown\") + \" returned the root state when called. This can lead to unnecessary rerenders.\\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.\", {\n stack\n });\n }\n }\n if (firstRun.current) firstRun.current = false;\n }\n return selected;\n }\n }[selector.name], [selector]);\n const selectedState = useSyncExternalStoreWithSelector(subscription.addNestedSub, store.getState, getServerState || store.getState, wrappedSelector, equalityFn);\n React.useDebugValue(selectedState);\n return selectedState;\n };\n Object.assign(useSelector2, {\n withTypes: () => useSelector2\n });\n return useSelector2;\n}\nvar useSelector = /* @__PURE__ */createSelectorHook();\n\n// src/exports.ts\nvar batch = defaultNoopBatch;\nexport { Provider_default as Provider, ReactReduxContext, batch, connect_default as connect, createDispatchHook, createSelectorHook, createStoreHook, shallowEqual, useDispatch, useSelector, useStore };\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(e);\n for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nexport { _objectWithoutProperties as default };","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nexport { _arrayWithoutHoles as default };","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nexport { _iterableToArray as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableSpread as default };","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nexport { _toConsumableArray as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _excluded = [\"language\", \"children\", \"style\", \"customStyle\", \"codeTagProps\", \"useInlineStyles\", \"showLineNumbers\", \"showInlineLineNumbers\", \"startingLineNumber\", \"lineNumberContainerStyle\", \"lineNumberStyle\", \"wrapLines\", \"wrapLongLines\", \"lineProps\", \"renderer\", \"PreTag\", \"CodeTag\", \"code\", \"astGenerator\"];\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nimport React from 'react';\nimport createElement from './create-element';\nimport checkForListedLanguage from './checkForListedLanguage';\nvar newLineRegex = /\\n/g;\nfunction getNewLines(str) {\n return str.match(newLineRegex);\n}\nfunction getAllLineNumbers(_ref) {\n var lines = _ref.lines,\n startingLineNumber = _ref.startingLineNumber,\n style = _ref.style;\n return lines.map(function (_, i) {\n var number = i + startingLineNumber;\n return /*#__PURE__*/React.createElement(\"span\", {\n key: \"line-\".concat(i),\n className: \"react-syntax-highlighter-line-number\",\n style: typeof style === 'function' ? style(number) : style\n }, \"\".concat(number, \"\\n\"));\n });\n}\nfunction AllLineNumbers(_ref2) {\n var codeString = _ref2.codeString,\n codeStyle = _ref2.codeStyle,\n _ref2$containerStyle = _ref2.containerStyle,\n containerStyle = _ref2$containerStyle === void 0 ? {\n \"float\": 'left',\n paddingRight: '10px'\n } : _ref2$containerStyle,\n _ref2$numberStyle = _ref2.numberStyle,\n numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle,\n startingLineNumber = _ref2.startingLineNumber;\n return /*#__PURE__*/React.createElement(\"code\", {\n style: Object.assign({}, codeStyle, containerStyle)\n }, getAllLineNumbers({\n lines: codeString.replace(/\\n$/, '').split('\\n'),\n style: numberStyle,\n startingLineNumber: startingLineNumber\n }));\n}\nfunction getEmWidthOfNumber(num) {\n return \"\".concat(num.toString().length, \".25em\");\n}\nfunction getInlineLineNumber(lineNumber, inlineLineNumberStyle) {\n return {\n type: 'element',\n tagName: 'span',\n properties: {\n key: \"line-number--\".concat(lineNumber),\n className: ['comment', 'linenumber', 'react-syntax-highlighter-line-number'],\n style: inlineLineNumberStyle\n },\n children: [{\n type: 'text',\n value: lineNumber\n }]\n };\n}\nfunction assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber) {\n // minimally necessary styling for line numbers\n var defaultLineNumberStyle = {\n display: 'inline-block',\n minWidth: getEmWidthOfNumber(largestLineNumber),\n paddingRight: '1em',\n textAlign: 'right',\n userSelect: 'none'\n };\n // prep custom styling\n var customLineNumberStyle = typeof lineNumberStyle === 'function' ? lineNumberStyle(lineNumber) : lineNumberStyle;\n // combine\n var assembledStyle = _objectSpread(_objectSpread({}, defaultLineNumberStyle), customLineNumberStyle);\n return assembledStyle;\n}\nfunction createLineElement(_ref3) {\n var children = _ref3.children,\n lineNumber = _ref3.lineNumber,\n lineNumberStyle = _ref3.lineNumberStyle,\n largestLineNumber = _ref3.largestLineNumber,\n showInlineLineNumbers = _ref3.showInlineLineNumbers,\n _ref3$lineProps = _ref3.lineProps,\n lineProps = _ref3$lineProps === void 0 ? {} : _ref3$lineProps,\n _ref3$className = _ref3.className,\n className = _ref3$className === void 0 ? [] : _ref3$className,\n showLineNumbers = _ref3.showLineNumbers,\n wrapLongLines = _ref3.wrapLongLines,\n _ref3$wrapLines = _ref3.wrapLines,\n wrapLines = _ref3$wrapLines === void 0 ? false : _ref3$wrapLines;\n var properties = wrapLines ? _objectSpread({}, typeof lineProps === 'function' ? lineProps(lineNumber) : lineProps) : {};\n properties['className'] = properties['className'] ? [].concat(_toConsumableArray(properties['className'].trim().split(/\\s+/)), _toConsumableArray(className)) : className;\n if (lineNumber && showInlineLineNumbers) {\n var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);\n children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));\n }\n if (wrapLongLines & showLineNumbers) {\n properties.style = _objectSpread({\n display: 'flex'\n }, properties.style);\n }\n return {\n type: 'element',\n tagName: 'span',\n properties: properties,\n children: children\n };\n}\nfunction flattenCodeTree(tree) {\n var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var newTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n if (node.type === 'text') {\n newTree.push(createLineElement({\n children: [node],\n className: _toConsumableArray(new Set(className))\n }));\n } else if (node.children) {\n var classNames = className.concat(node.properties.className);\n flattenCodeTree(node.children, classNames).forEach(function (i) {\n return newTree.push(i);\n });\n }\n }\n return newTree;\n}\nfunction processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines) {\n var _ref4;\n var tree = flattenCodeTree(codeTree.value);\n var newTree = [];\n var lastLineBreakIndex = -1;\n var index = 0;\n function createWrappedLine(children, lineNumber) {\n var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return createLineElement({\n children: children,\n lineNumber: lineNumber,\n lineNumberStyle: lineNumberStyle,\n largestLineNumber: largestLineNumber,\n showInlineLineNumbers: showInlineLineNumbers,\n lineProps: lineProps,\n className: className,\n showLineNumbers: showLineNumbers,\n wrapLongLines: wrapLongLines,\n wrapLines: wrapLines\n });\n }\n function createUnwrappedLine(children, lineNumber) {\n if (showLineNumbers && lineNumber && showInlineLineNumbers) {\n var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);\n children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));\n }\n return children;\n }\n function createLine(children, lineNumber) {\n var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return wrapLines || className.length > 0 ? createWrappedLine(children, lineNumber, className) : createUnwrappedLine(children, lineNumber);\n }\n var _loop = function _loop() {\n var node = tree[index];\n var value = node.children[0].value;\n var newLines = getNewLines(value);\n if (newLines) {\n var splitValue = value.split('\\n');\n splitValue.forEach(function (text, i) {\n var lineNumber = showLineNumbers && newTree.length + startingLineNumber;\n var newChild = {\n type: 'text',\n value: \"\".concat(text, \"\\n\")\n };\n\n // if it's the first line\n if (i === 0) {\n var _children = tree.slice(lastLineBreakIndex + 1, index).concat(createLineElement({\n children: [newChild],\n className: node.properties.className\n }));\n var _line = createLine(_children, lineNumber);\n newTree.push(_line);\n\n // if it's the last line\n } else if (i === splitValue.length - 1) {\n var stringChild = tree[index + 1] && tree[index + 1].children && tree[index + 1].children[0];\n var lastLineInPreviousSpan = {\n type: 'text',\n value: \"\".concat(text)\n };\n if (stringChild) {\n var newElem = createLineElement({\n children: [lastLineInPreviousSpan],\n className: node.properties.className\n });\n tree.splice(index + 1, 0, newElem);\n } else {\n var _children2 = [lastLineInPreviousSpan];\n var _line2 = createLine(_children2, lineNumber, node.properties.className);\n newTree.push(_line2);\n }\n\n // if it's neither the first nor the last line\n } else {\n var _children3 = [newChild];\n var _line3 = createLine(_children3, lineNumber, node.properties.className);\n newTree.push(_line3);\n }\n });\n lastLineBreakIndex = index;\n }\n index++;\n };\n while (index < tree.length) {\n _loop();\n }\n if (lastLineBreakIndex !== tree.length - 1) {\n var children = tree.slice(lastLineBreakIndex + 1, tree.length);\n if (children && children.length) {\n var lineNumber = showLineNumbers && newTree.length + startingLineNumber;\n var line = createLine(children, lineNumber);\n newTree.push(line);\n }\n }\n return wrapLines ? newTree : (_ref4 = []).concat.apply(_ref4, newTree);\n}\nfunction defaultRenderer(_ref5) {\n var rows = _ref5.rows,\n stylesheet = _ref5.stylesheet,\n useInlineStyles = _ref5.useInlineStyles;\n return rows.map(function (node, i) {\n return createElement({\n node: node,\n stylesheet: stylesheet,\n useInlineStyles: useInlineStyles,\n key: \"code-segement\".concat(i)\n });\n });\n}\n\n// only highlight.js has the highlightAuto method\nfunction isHighlightJs(astGenerator) {\n return astGenerator && typeof astGenerator.highlightAuto !== 'undefined';\n}\nfunction getCodeTree(_ref6) {\n var astGenerator = _ref6.astGenerator,\n language = _ref6.language,\n code = _ref6.code,\n defaultCodeValue = _ref6.defaultCodeValue;\n // figure out whether we're using lowlight/highlight or refractor/prism\n // then attempt highlighting accordingly\n\n // lowlight/highlight?\n if (isHighlightJs(astGenerator)) {\n var hasLanguage = checkForListedLanguage(astGenerator, language);\n if (language === 'text') {\n return {\n value: defaultCodeValue,\n language: 'text'\n };\n } else if (hasLanguage) {\n return astGenerator.highlight(language, code);\n } else {\n return astGenerator.highlightAuto(code);\n }\n }\n\n // must be refractor/prism, then\n try {\n return language && language !== 'text' ? {\n value: astGenerator.highlight(code, language)\n } : {\n value: defaultCodeValue\n };\n } catch (e) {\n return {\n value: defaultCodeValue\n };\n }\n}\nexport default function (defaultAstGenerator, defaultStyle) {\n return function SyntaxHighlighter(_ref7) {\n var language = _ref7.language,\n children = _ref7.children,\n _ref7$style = _ref7.style,\n style = _ref7$style === void 0 ? defaultStyle : _ref7$style,\n _ref7$customStyle = _ref7.customStyle,\n customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle,\n _ref7$codeTagProps = _ref7.codeTagProps,\n codeTagProps = _ref7$codeTagProps === void 0 ? {\n className: language ? \"language-\".concat(language) : undefined,\n style: _objectSpread(_objectSpread({}, style['code[class*=\"language-\"]']), style[\"code[class*=\\\"language-\".concat(language, \"\\\"]\")])\n } : _ref7$codeTagProps,\n _ref7$useInlineStyles = _ref7.useInlineStyles,\n useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles,\n _ref7$showLineNumbers = _ref7.showLineNumbers,\n showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers,\n _ref7$showInlineLineN = _ref7.showInlineLineNumbers,\n showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN,\n _ref7$startingLineNum = _ref7.startingLineNumber,\n startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum,\n lineNumberContainerStyle = _ref7.lineNumberContainerStyle,\n _ref7$lineNumberStyle = _ref7.lineNumberStyle,\n lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle,\n wrapLines = _ref7.wrapLines,\n _ref7$wrapLongLines = _ref7.wrapLongLines,\n wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines,\n _ref7$lineProps = _ref7.lineProps,\n lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps,\n renderer = _ref7.renderer,\n _ref7$PreTag = _ref7.PreTag,\n PreTag = _ref7$PreTag === void 0 ? 'pre' : _ref7$PreTag,\n _ref7$CodeTag = _ref7.CodeTag,\n CodeTag = _ref7$CodeTag === void 0 ? 'code' : _ref7$CodeTag,\n _ref7$code = _ref7.code,\n code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code,\n astGenerator = _ref7.astGenerator,\n rest = _objectWithoutProperties(_ref7, _excluded);\n astGenerator = astGenerator || defaultAstGenerator;\n var allLineNumbers = showLineNumbers ? /*#__PURE__*/React.createElement(AllLineNumbers, {\n containerStyle: lineNumberContainerStyle,\n codeStyle: codeTagProps.style || {},\n numberStyle: lineNumberStyle,\n startingLineNumber: startingLineNumber,\n codeString: code\n }) : null;\n var defaultPreStyle = style.hljs || style['pre[class*=\"language-\"]'] || {\n backgroundColor: '#fff'\n };\n var generatorClassName = isHighlightJs(astGenerator) ? 'hljs' : 'prismjs';\n var preProps = useInlineStyles ? Object.assign({}, rest, {\n style: Object.assign({}, defaultPreStyle, customStyle)\n }) : Object.assign({}, rest, {\n className: rest.className ? \"\".concat(generatorClassName, \" \").concat(rest.className) : generatorClassName,\n style: Object.assign({}, customStyle)\n });\n if (wrapLongLines) {\n codeTagProps.style = _objectSpread({\n whiteSpace: 'pre-wrap'\n }, codeTagProps.style);\n } else {\n codeTagProps.style = _objectSpread({\n whiteSpace: 'pre'\n }, codeTagProps.style);\n }\n if (!astGenerator) {\n return /*#__PURE__*/React.createElement(PreTag, preProps, allLineNumbers, /*#__PURE__*/React.createElement(CodeTag, codeTagProps, code));\n }\n\n /*\n * Some custom renderers rely on individual row elements so we need to turn wrapLines on\n * if renderer is provided and wrapLines is undefined.\n */\n if (wrapLines === undefined && renderer || wrapLongLines) wrapLines = true;\n renderer = renderer || defaultRenderer;\n var defaultCodeValue = [{\n type: 'text',\n value: code\n }];\n var codeTree = getCodeTree({\n astGenerator: astGenerator,\n language: language,\n code: code,\n defaultCodeValue: defaultCodeValue\n });\n if (codeTree.language === null) {\n codeTree.value = defaultCodeValue;\n }\n\n // determine largest line number so that we can force minWidth on all linenumber elements\n var lineCount = codeTree.value.length;\n if (lineCount === 1 && codeTree.value[0].type === 'text') {\n // Since codeTree for an unparsable text (e.g. 'a\\na\\na') is [{ type: 'text', value: 'a\\na\\na' }]\n lineCount = codeTree.value[0].value.split('\\n').length;\n }\n var largestLineNumber = lineCount + startingLineNumber;\n var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);\n return /*#__PURE__*/React.createElement(PreTag, preProps, /*#__PURE__*/React.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({\n rows: rows,\n stylesheet: style,\n useInlineStyles: useInlineStyles\n })));\n };\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nimport React from 'react';\n\n// Get all possible permutations of all power sets\n//\n// Super simple, non-algorithmic solution since the\n// number of class names will not be greater than 4\nfunction powerSetPermutations(arr) {\n var arrLength = arr.length;\n if (arrLength === 0 || arrLength === 1) return arr;\n if (arrLength === 2) {\n // prettier-ignore\n return [arr[0], arr[1], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0])];\n }\n if (arrLength === 3) {\n return [arr[0], arr[1], arr[2], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0])];\n }\n if (arrLength >= 4) {\n // Currently does not support more than 4 extra\n // class names (after `.token` has been removed)\n return [arr[0], arr[1], arr[2], arr[3], \"\".concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[3], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[3]), \"\".concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[3], \".\").concat(arr[0]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[2], \".\").concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[1], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[0], \".\").concat(arr[2], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[0], \".\").concat(arr[2]), \"\".concat(arr[3], \".\").concat(arr[1], \".\").concat(arr[2], \".\").concat(arr[0]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[0], \".\").concat(arr[1]), \"\".concat(arr[3], \".\").concat(arr[2], \".\").concat(arr[1], \".\").concat(arr[0])];\n }\n}\nvar classNameCombinations = {};\nfunction getClassNameCombinations(classNames) {\n if (classNames.length === 0 || classNames.length === 1) return classNames;\n var key = classNames.join('.');\n if (!classNameCombinations[key]) {\n classNameCombinations[key] = powerSetPermutations(classNames);\n }\n return classNameCombinations[key];\n}\nexport function createStyleObject(classNames) {\n var elementStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var stylesheet = arguments.length > 2 ? arguments[2] : undefined;\n var nonTokenClassNames = classNames.filter(function (className) {\n return className !== 'token';\n });\n var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);\n return classNamesCombinations.reduce(function (styleObject, className) {\n return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);\n }, elementStyle);\n}\nexport function createClassNameString(classNames) {\n return classNames.join(' ');\n}\nexport function createChildren(stylesheet, useInlineStyles) {\n var childrenCount = 0;\n return function (children) {\n childrenCount += 1;\n return children.map(function (child, i) {\n return createElement({\n node: child,\n stylesheet: stylesheet,\n useInlineStyles: useInlineStyles,\n key: \"code-segment-\".concat(childrenCount, \"-\").concat(i)\n });\n });\n };\n}\nexport default function createElement(_ref) {\n var node = _ref.node,\n stylesheet = _ref.stylesheet,\n _ref$style = _ref.style,\n style = _ref$style === void 0 ? {} : _ref$style,\n useInlineStyles = _ref.useInlineStyles,\n key = _ref.key;\n var properties = node.properties,\n type = node.type,\n TagName = node.tagName,\n value = node.value;\n if (type === 'text') {\n return value;\n } else if (TagName) {\n var childrenCreator = createChildren(stylesheet, useInlineStyles);\n var props;\n if (!useInlineStyles) {\n props = _objectSpread(_objectSpread({}, properties), {}, {\n className: createClassNameString(properties.className)\n });\n } else {\n var allStylesheetSelectors = Object.keys(stylesheet).reduce(function (classes, selector) {\n selector.split('.').forEach(function (className) {\n if (!classes.includes(className)) classes.push(className);\n });\n return classes;\n }, []);\n\n // For compatibility with older versions of react-syntax-highlighter\n var startingClassName = properties.className && properties.className.includes('token') ? ['token'] : [];\n var className = properties.className && startingClassName.concat(properties.className.filter(function (className) {\n return !allStylesheetSelectors.includes(className);\n }));\n props = _objectSpread(_objectSpread({}, properties), {}, {\n className: createClassNameString(className) || undefined,\n style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)\n });\n }\n var children = childrenCreator(node.children);\n return /*#__PURE__*/React.createElement(TagName, _extends({\n key: key\n }, props), children);\n }\n}","export default (function (astGenerator, language) {\n var langs = astGenerator.listLanguages();\n return langs.indexOf(language) !== -1;\n});","import highlight from './highlight';\nimport lowlight from 'lowlight/lib/core';\nvar SyntaxHighlighter = highlight(lowlight, {});\nSyntaxHighlighter.registerLanguage = lowlight.registerLanguage;\nexport default SyntaxHighlighter;","import javascript from \"highlight.js/lib/languages/javascript\";\nexport default javascript;","import json from \"highlight.js/lib/languages/json\";\nexport default json;","import xml from \"highlight.js/lib/languages/xml\";\nexport default xml;","import bash from \"highlight.js/lib/languages/bash\";\nexport default bash;","import yaml from \"highlight.js/lib/languages/yaml\";\nexport default yaml;","import http from \"highlight.js/lib/languages/http\";\nexport default http;","import powershell from \"highlight.js/lib/languages/powershell\";\nexport default powershell;","export default {\n \"hljs\": {\n \"display\": \"block\",\n \"overflowX\": \"auto\",\n \"padding\": \"0.5em\",\n \"background\": \"#333\",\n \"color\": \"white\"\n },\n \"hljs-name\": {\n \"fontWeight\": \"bold\"\n },\n \"hljs-strong\": {\n \"fontWeight\": \"bold\"\n },\n \"hljs-code\": {\n \"fontStyle\": \"italic\",\n \"color\": \"#888\"\n },\n \"hljs-emphasis\": {\n \"fontStyle\": \"italic\"\n },\n \"hljs-tag\": {\n \"color\": \"#62c8f3\"\n },\n \"hljs-variable\": {\n \"color\": \"#ade5fc\"\n },\n \"hljs-template-variable\": {\n \"color\": \"#ade5fc\"\n },\n \"hljs-selector-id\": {\n \"color\": \"#ade5fc\"\n },\n \"hljs-selector-class\": {\n \"color\": \"#ade5fc\"\n },\n \"hljs-string\": {\n \"color\": \"#a2fca2\"\n },\n \"hljs-bullet\": {\n \"color\": \"#d36363\"\n },\n \"hljs-type\": {\n \"color\": \"#ffa\"\n },\n \"hljs-title\": {\n \"color\": \"#ffa\"\n },\n \"hljs-section\": {\n \"color\": \"#ffa\"\n },\n \"hljs-attribute\": {\n \"color\": \"#ffa\"\n },\n \"hljs-quote\": {\n \"color\": \"#ffa\"\n },\n \"hljs-built_in\": {\n \"color\": \"#ffa\"\n },\n \"hljs-builtin-name\": {\n \"color\": \"#ffa\"\n },\n \"hljs-number\": {\n \"color\": \"#d36363\"\n },\n \"hljs-symbol\": {\n \"color\": \"#d36363\"\n },\n \"hljs-keyword\": {\n \"color\": \"#fcc28c\"\n },\n \"hljs-selector-tag\": {\n \"color\": \"#fcc28c\"\n },\n \"hljs-literal\": {\n \"color\": \"#fcc28c\"\n },\n \"hljs-comment\": {\n \"color\": \"#888\"\n },\n \"hljs-deletion\": {\n \"color\": \"#333\",\n \"backgroundColor\": \"#fc9b9b\"\n },\n \"hljs-regexp\": {\n \"color\": \"#c6b4f0\"\n },\n \"hljs-link\": {\n \"color\": \"#c6b4f0\"\n },\n \"hljs-meta\": {\n \"color\": \"#fc9b9b\"\n },\n \"hljs-addition\": {\n \"backgroundColor\": \"#a2fca2\",\n \"color\": \"#333\"\n }\n};","export default {\n \"hljs\": {\n \"display\": \"block\",\n \"overflowX\": \"auto\",\n \"padding\": \"0.5em\",\n \"background\": \"#222\",\n \"color\": \"#aaa\"\n },\n \"hljs-subst\": {\n \"color\": \"#aaa\"\n },\n \"hljs-section\": {\n \"color\": \"#fff\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-comment\": {\n \"color\": \"#444\"\n },\n \"hljs-quote\": {\n \"color\": \"#444\"\n },\n \"hljs-meta\": {\n \"color\": \"#444\"\n },\n \"hljs-string\": {\n \"color\": \"#ffcc33\"\n },\n \"hljs-symbol\": {\n \"color\": \"#ffcc33\"\n },\n \"hljs-bullet\": {\n \"color\": \"#ffcc33\"\n },\n \"hljs-regexp\": {\n \"color\": \"#ffcc33\"\n },\n \"hljs-number\": {\n \"color\": \"#00cc66\"\n },\n \"hljs-addition\": {\n \"color\": \"#00cc66\"\n },\n \"hljs-built_in\": {\n \"color\": \"#32aaee\"\n },\n \"hljs-builtin-name\": {\n \"color\": \"#32aaee\"\n },\n \"hljs-literal\": {\n \"color\": \"#32aaee\"\n },\n \"hljs-type\": {\n \"color\": \"#32aaee\"\n },\n \"hljs-template-variable\": {\n \"color\": \"#32aaee\"\n },\n \"hljs-attribute\": {\n \"color\": \"#32aaee\"\n },\n \"hljs-link\": {\n \"color\": \"#32aaee\"\n },\n \"hljs-keyword\": {\n \"color\": \"#6644aa\"\n },\n \"hljs-selector-tag\": {\n \"color\": \"#6644aa\"\n },\n \"hljs-name\": {\n \"color\": \"#6644aa\"\n },\n \"hljs-selector-id\": {\n \"color\": \"#6644aa\"\n },\n \"hljs-selector-class\": {\n \"color\": \"#6644aa\"\n },\n \"hljs-title\": {\n \"color\": \"#bb1166\"\n },\n \"hljs-variable\": {\n \"color\": \"#bb1166\"\n },\n \"hljs-deletion\": {\n \"color\": \"#bb1166\"\n },\n \"hljs-template-tag\": {\n \"color\": \"#bb1166\"\n },\n \"hljs-doctag\": {\n \"fontWeight\": \"bold\"\n },\n \"hljs-strong\": {\n \"fontWeight\": \"bold\"\n },\n \"hljs-emphasis\": {\n \"fontStyle\": \"italic\"\n }\n};","export default {\n \"hljs\": {\n \"display\": \"block\",\n \"overflowX\": \"auto\",\n \"padding\": \"0.5em\",\n \"background\": \"#272822\",\n \"color\": \"#ddd\"\n },\n \"hljs-tag\": {\n \"color\": \"#f92672\"\n },\n \"hljs-keyword\": {\n \"color\": \"#f92672\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-selector-tag\": {\n \"color\": \"#f92672\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-literal\": {\n \"color\": \"#f92672\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-strong\": {\n \"color\": \"#f92672\"\n },\n \"hljs-name\": {\n \"color\": \"#f92672\"\n },\n \"hljs-code\": {\n \"color\": \"#66d9ef\"\n },\n \"hljs-class .hljs-title\": {\n \"color\": \"white\"\n },\n \"hljs-attribute\": {\n \"color\": \"#bf79db\"\n },\n \"hljs-symbol\": {\n \"color\": \"#bf79db\"\n },\n \"hljs-regexp\": {\n \"color\": \"#bf79db\"\n },\n \"hljs-link\": {\n \"color\": \"#bf79db\"\n },\n \"hljs-string\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-bullet\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-subst\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-title\": {\n \"color\": \"#a6e22e\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-section\": {\n \"color\": \"#a6e22e\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-emphasis\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-type\": {\n \"color\": \"#a6e22e\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-built_in\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-builtin-name\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-selector-attr\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-selector-pseudo\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-addition\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-variable\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-template-tag\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-template-variable\": {\n \"color\": \"#a6e22e\"\n },\n \"hljs-comment\": {\n \"color\": \"#75715e\"\n },\n \"hljs-quote\": {\n \"color\": \"#75715e\"\n },\n \"hljs-deletion\": {\n \"color\": \"#75715e\"\n },\n \"hljs-meta\": {\n \"color\": \"#75715e\"\n },\n \"hljs-doctag\": {\n \"fontWeight\": \"bold\"\n },\n \"hljs-selector-id\": {\n \"fontWeight\": \"bold\"\n }\n};","export default {\n \"hljs\": {\n \"display\": \"block\",\n \"overflowX\": \"auto\",\n \"padding\": \"0.5em\",\n \"background\": \"#2E3440\",\n \"color\": \"#D8DEE9\"\n },\n \"hljs-subst\": {\n \"color\": \"#D8DEE9\"\n },\n \"hljs-selector-tag\": {\n \"color\": \"#81A1C1\"\n },\n \"hljs-selector-id\": {\n \"color\": \"#8FBCBB\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-selector-class\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-selector-attr\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-selector-pseudo\": {\n \"color\": \"#88C0D0\"\n },\n \"hljs-addition\": {\n \"backgroundColor\": \"rgba(163, 190, 140, 0.5)\"\n },\n \"hljs-deletion\": {\n \"backgroundColor\": \"rgba(191, 97, 106, 0.5)\"\n },\n \"hljs-built_in\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-type\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-class\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-function\": {\n \"color\": \"#88C0D0\"\n },\n \"hljs-function > .hljs-title\": {\n \"color\": \"#88C0D0\"\n },\n \"hljs-keyword\": {\n \"color\": \"#81A1C1\"\n },\n \"hljs-literal\": {\n \"color\": \"#81A1C1\"\n },\n \"hljs-symbol\": {\n \"color\": \"#81A1C1\"\n },\n \"hljs-number\": {\n \"color\": \"#B48EAD\"\n },\n \"hljs-regexp\": {\n \"color\": \"#EBCB8B\"\n },\n \"hljs-string\": {\n \"color\": \"#A3BE8C\"\n },\n \"hljs-title\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-params\": {\n \"color\": \"#D8DEE9\"\n },\n \"hljs-bullet\": {\n \"color\": \"#81A1C1\"\n },\n \"hljs-code\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-emphasis\": {\n \"fontStyle\": \"italic\"\n },\n \"hljs-formula\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-strong\": {\n \"fontWeight\": \"bold\"\n },\n \"hljs-link:hover\": {\n \"textDecoration\": \"underline\"\n },\n \"hljs-quote\": {\n \"color\": \"#4C566A\"\n },\n \"hljs-comment\": {\n \"color\": \"#4C566A\"\n },\n \"hljs-doctag\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-meta\": {\n \"color\": \"#5E81AC\"\n },\n \"hljs-meta-keyword\": {\n \"color\": \"#5E81AC\"\n },\n \"hljs-meta-string\": {\n \"color\": \"#A3BE8C\"\n },\n \"hljs-attr\": {\n \"color\": \"#8FBCBB\"\n },\n \"hljs-attribute\": {\n \"color\": \"#D8DEE9\"\n },\n \"hljs-builtin-name\": {\n \"color\": \"#81A1C1\"\n },\n \"hljs-name\": {\n \"color\": \"#81A1C1\"\n },\n \"hljs-section\": {\n \"color\": \"#88C0D0\"\n },\n \"hljs-tag\": {\n \"color\": \"#81A1C1\"\n },\n \"hljs-variable\": {\n \"color\": \"#D8DEE9\"\n },\n \"hljs-template-variable\": {\n \"color\": \"#D8DEE9\"\n },\n \"hljs-template-tag\": {\n \"color\": \"#5E81AC\"\n },\n \"abnf .hljs-attribute\": {\n \"color\": \"#88C0D0\"\n },\n \"abnf .hljs-symbol\": {\n \"color\": \"#EBCB8B\"\n },\n \"apache .hljs-attribute\": {\n \"color\": \"#88C0D0\"\n },\n \"apache .hljs-section\": {\n \"color\": \"#81A1C1\"\n },\n \"arduino .hljs-built_in\": {\n \"color\": \"#88C0D0\"\n },\n \"aspectj .hljs-meta\": {\n \"color\": \"#D08770\"\n },\n \"aspectj > .hljs-title\": {\n \"color\": \"#88C0D0\"\n },\n \"bnf .hljs-attribute\": {\n \"color\": \"#8FBCBB\"\n },\n \"clojure .hljs-name\": {\n \"color\": \"#88C0D0\"\n },\n \"clojure .hljs-symbol\": {\n \"color\": \"#EBCB8B\"\n },\n \"coq .hljs-built_in\": {\n \"color\": \"#88C0D0\"\n },\n \"cpp .hljs-meta-string\": {\n \"color\": \"#8FBCBB\"\n },\n \"css .hljs-built_in\": {\n \"color\": \"#88C0D0\"\n },\n \"css .hljs-keyword\": {\n \"color\": \"#D08770\"\n },\n \"diff .hljs-meta\": {\n \"color\": \"#8FBCBB\"\n },\n \"ebnf .hljs-attribute\": {\n \"color\": \"#8FBCBB\"\n },\n \"glsl .hljs-built_in\": {\n \"color\": \"#88C0D0\"\n },\n \"groovy .hljs-meta:not(:first-child)\": {\n \"color\": \"#D08770\"\n },\n \"haxe .hljs-meta\": {\n \"color\": \"#D08770\"\n },\n \"java .hljs-meta\": {\n \"color\": \"#D08770\"\n },\n \"ldif .hljs-attribute\": {\n \"color\": \"#8FBCBB\"\n },\n \"lisp .hljs-name\": {\n \"color\": \"#88C0D0\"\n },\n \"lua .hljs-built_in\": {\n \"color\": \"#88C0D0\"\n },\n \"moonscript .hljs-built_in\": {\n \"color\": \"#88C0D0\"\n },\n \"nginx .hljs-attribute\": {\n \"color\": \"#88C0D0\"\n },\n \"nginx .hljs-section\": {\n \"color\": \"#5E81AC\"\n },\n \"pf .hljs-built_in\": {\n \"color\": \"#88C0D0\"\n },\n \"processing .hljs-built_in\": {\n \"color\": \"#88C0D0\"\n },\n \"scss .hljs-keyword\": {\n \"color\": \"#81A1C1\"\n },\n \"stylus .hljs-keyword\": {\n \"color\": \"#81A1C1\"\n },\n \"swift .hljs-meta\": {\n \"color\": \"#D08770\"\n },\n \"vim .hljs-built_in\": {\n \"color\": \"#88C0D0\",\n \"fontStyle\": \"italic\"\n },\n \"yaml .hljs-meta\": {\n \"color\": \"#D08770\"\n }\n};","export default {\n \"hljs\": {\n \"display\": \"block\",\n \"overflowX\": \"auto\",\n \"padding\": \"0.5em\",\n \"background\": \"#282b2e\",\n \"color\": \"#e0e2e4\"\n },\n \"hljs-keyword\": {\n \"color\": \"#93c763\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-selector-tag\": {\n \"color\": \"#93c763\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-literal\": {\n \"color\": \"#93c763\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-selector-id\": {\n \"color\": \"#93c763\"\n },\n \"hljs-number\": {\n \"color\": \"#ffcd22\"\n },\n \"hljs-attribute\": {\n \"color\": \"#668bb0\"\n },\n \"hljs-code\": {\n \"color\": \"white\"\n },\n \"hljs-class .hljs-title\": {\n \"color\": \"white\"\n },\n \"hljs-section\": {\n \"color\": \"white\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-regexp\": {\n \"color\": \"#d39745\"\n },\n \"hljs-link\": {\n \"color\": \"#d39745\"\n },\n \"hljs-meta\": {\n \"color\": \"#557182\"\n },\n \"hljs-tag\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-name\": {\n \"color\": \"#8cbbad\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-bullet\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-subst\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-emphasis\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-type\": {\n \"color\": \"#8cbbad\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-built_in\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-selector-attr\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-selector-pseudo\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-addition\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-variable\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-template-tag\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-template-variable\": {\n \"color\": \"#8cbbad\"\n },\n \"hljs-string\": {\n \"color\": \"#ec7600\"\n },\n \"hljs-symbol\": {\n \"color\": \"#ec7600\"\n },\n \"hljs-comment\": {\n \"color\": \"#818e96\"\n },\n \"hljs-quote\": {\n \"color\": \"#818e96\"\n },\n \"hljs-deletion\": {\n \"color\": \"#818e96\"\n },\n \"hljs-selector-class\": {\n \"color\": \"#A082BD\"\n },\n \"hljs-doctag\": {\n \"fontWeight\": \"bold\"\n },\n \"hljs-title\": {\n \"fontWeight\": \"bold\"\n },\n \"hljs-strong\": {\n \"fontWeight\": \"bold\"\n }\n};","export default {\n \"hljs-comment\": {\n \"color\": \"#969896\"\n },\n \"hljs-quote\": {\n \"color\": \"#969896\"\n },\n \"hljs-variable\": {\n \"color\": \"#cc6666\"\n },\n \"hljs-template-variable\": {\n \"color\": \"#cc6666\"\n },\n \"hljs-tag\": {\n \"color\": \"#cc6666\"\n },\n \"hljs-name\": {\n \"color\": \"#cc6666\"\n },\n \"hljs-selector-id\": {\n \"color\": \"#cc6666\"\n },\n \"hljs-selector-class\": {\n \"color\": \"#cc6666\"\n },\n \"hljs-regexp\": {\n \"color\": \"#cc6666\"\n },\n \"hljs-deletion\": {\n \"color\": \"#cc6666\"\n },\n \"hljs-number\": {\n \"color\": \"#de935f\"\n },\n \"hljs-built_in\": {\n \"color\": \"#de935f\"\n },\n \"hljs-builtin-name\": {\n \"color\": \"#de935f\"\n },\n \"hljs-literal\": {\n \"color\": \"#de935f\"\n },\n \"hljs-type\": {\n \"color\": \"#de935f\"\n },\n \"hljs-params\": {\n \"color\": \"#de935f\"\n },\n \"hljs-meta\": {\n \"color\": \"#de935f\"\n },\n \"hljs-link\": {\n \"color\": \"#de935f\"\n },\n \"hljs-attribute\": {\n \"color\": \"#f0c674\"\n },\n \"hljs-string\": {\n \"color\": \"#b5bd68\"\n },\n \"hljs-symbol\": {\n \"color\": \"#b5bd68\"\n },\n \"hljs-bullet\": {\n \"color\": \"#b5bd68\"\n },\n \"hljs-addition\": {\n \"color\": \"#b5bd68\"\n },\n \"hljs-title\": {\n \"color\": \"#81a2be\"\n },\n \"hljs-section\": {\n \"color\": \"#81a2be\"\n },\n \"hljs-keyword\": {\n \"color\": \"#b294bb\"\n },\n \"hljs-selector-tag\": {\n \"color\": \"#b294bb\"\n },\n \"hljs\": {\n \"display\": \"block\",\n \"overflowX\": \"auto\",\n \"background\": \"#1d1f21\",\n \"color\": \"#c5c8c6\",\n \"padding\": \"0.5em\"\n },\n \"hljs-emphasis\": {\n \"fontStyle\": \"italic\"\n },\n \"hljs-strong\": {\n \"fontWeight\": \"bold\"\n }\n};","export default {\n \"hljs\": {\n \"display\": \"block\",\n \"overflowX\": \"auto\",\n \"padding\": \"0.5em\",\n \"color\": \"#000\",\n \"background\": \"#fff\"\n },\n \"hljs-subst\": {\n \"fontWeight\": \"normal\",\n \"color\": \"#000\"\n },\n \"hljs-title\": {\n \"fontWeight\": \"normal\",\n \"color\": \"#000\"\n },\n \"hljs-comment\": {\n \"color\": \"#808080\",\n \"fontStyle\": \"italic\"\n },\n \"hljs-quote\": {\n \"color\": \"#808080\",\n \"fontStyle\": \"italic\"\n },\n \"hljs-meta\": {\n \"color\": \"#808000\"\n },\n \"hljs-tag\": {\n \"background\": \"#efefef\"\n },\n \"hljs-section\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#000080\"\n },\n \"hljs-name\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#000080\"\n },\n \"hljs-literal\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#000080\"\n },\n \"hljs-keyword\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#000080\"\n },\n \"hljs-selector-tag\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#000080\"\n },\n \"hljs-type\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#000080\"\n },\n \"hljs-selector-id\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#000080\"\n },\n \"hljs-selector-class\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#000080\"\n },\n \"hljs-attribute\": {\n \"fontWeight\": \"bold\",\n \"color\": \"#0000ff\"\n },\n \"hljs-number\": {\n \"fontWeight\": \"normal\",\n \"color\": \"#0000ff\"\n },\n \"hljs-regexp\": {\n \"fontWeight\": \"normal\",\n \"color\": \"#0000ff\"\n },\n \"hljs-link\": {\n \"fontWeight\": \"normal\",\n \"color\": \"#0000ff\"\n },\n \"hljs-string\": {\n \"color\": \"#008000\",\n \"fontWeight\": \"bold\"\n },\n \"hljs-symbol\": {\n \"color\": \"#000\",\n \"background\": \"#d0eded\",\n \"fontStyle\": \"italic\"\n },\n \"hljs-bullet\": {\n \"color\": \"#000\",\n \"background\": \"#d0eded\",\n \"fontStyle\": \"italic\"\n },\n \"hljs-formula\": {\n \"color\": \"#000\",\n \"background\": \"#d0eded\",\n \"fontStyle\": \"italic\"\n },\n \"hljs-doctag\": {\n \"textDecoration\": \"underline\"\n },\n \"hljs-variable\": {\n \"color\": \"#660e7a\"\n },\n \"hljs-template-variable\": {\n \"color\": \"#660e7a\"\n },\n \"hljs-addition\": {\n \"background\": \"#baeeba\"\n },\n \"hljs-deletion\": {\n \"background\": \"#ffc8bd\"\n },\n \"hljs-emphasis\": {\n \"fontStyle\": \"italic\"\n },\n \"hljs-strong\": {\n \"fontWeight\": \"bold\"\n }\n};","var textarea;\nfunction decodeEntity(name) {\n textarea = textarea || document.createElement('textarea');\n textarea.innerHTML = '&' + name + ';';\n return textarea.value;\n}\n\n/**\n * Utility functions\n */\n\nfunction typeOf(obj) {\n return Object.prototype.toString.call(obj);\n}\nfunction isString(obj) {\n return typeOf(obj) === '[object String]';\n}\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction has(object, key) {\n return object ? hasOwn.call(object, key) : false;\n}\n\n// Extend objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = [].slice.call(arguments, 1);\n sources.forEach(function (source) {\n if (!source) {\n return;\n }\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n return obj;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar UNESCAPE_MD_RE = /\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) {\n return str;\n }\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) {\n return false;\n }\n // never used\n if (c >= 0xFDD0 && c <= 0xFDEF) {\n return false;\n }\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) {\n return false;\n }\n // control codes\n if (c >= 0x00 && c <= 0x08) {\n return false;\n }\n if (c === 0x0B) {\n return false;\n }\n if (c >= 0x0E && c <= 0x1F) {\n return false;\n }\n if (c >= 0x7F && c <= 0x9F) {\n return false;\n }\n // out of range\n if (c > 0x10FFFF) {\n return false;\n }\n return true;\n}\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n return String.fromCharCode(surrogate1, surrogate2);\n }\n return String.fromCharCode(c);\n}\nvar NAMED_ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n var decoded = decodeEntity(name);\n if (name !== decoded) {\n return decoded;\n } else if (name.charCodeAt(0) === 0x23 /* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n return match;\n}\nfunction replaceEntities(str) {\n if (str.indexOf('&') < 0) {\n return str;\n }\n return str.replace(NAMED_ENTITY_RE, replaceEntityPattern);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n return str;\n}\nvar utils = /*#__PURE__*/Object.freeze({\n isString: isString,\n has: has,\n assign: assign,\n unescapeMd: unescapeMd,\n isValidEntityCode: isValidEntityCode,\n fromCodePoint: fromCodePoint,\n replaceEntities: replaceEntities,\n escapeHtml: escapeHtml\n});\n\n/**\n * Renderer rules cache\n */\n\nvar rules = {};\n\n/**\n * Blockquotes\n */\n\nrules.blockquote_open = function /* tokens, idx, options, env */\n() {\n return '
\\n';\n};\nrules.blockquote_close = function (tokens, idx /*, options, env */) {\n return '
' + getBreak(tokens, idx);\n};\n\n/**\n * Code\n */\n\nrules.code = function (tokens, idx /*, options, env */) {\n if (tokens[idx].block) {\n return '
' + escapeHtml(tokens[idx].content) + '
' + getBreak(tokens, idx);\n }\n return '' + escapeHtml(tokens[idx].content) + '';\n};\n\n/**\n * Fenced code blocks\n */\n\nrules.fence = function (tokens, idx, options, env, instance) {\n var token = tokens[idx];\n var langClass = '';\n var langPrefix = options.langPrefix;\n var langName = '',\n fences,\n fenceName;\n var highlighted;\n if (token.params) {\n //\n // ```foo bar\n //\n // Try custom renderer \"foo\" first. That will simplify overwrite\n // for diagrams, latex, and any other fenced block with custom look\n //\n\n fences = token.params.split(/\\s+/g);\n fenceName = fences.join(' ');\n if (has(instance.rules.fence_custom, fences[0])) {\n return instance.rules.fence_custom[fences[0]](tokens, idx, options, env, instance);\n }\n langName = escapeHtml(replaceEntities(unescapeMd(fenceName)));\n langClass = ' class=\"' + langPrefix + langName + '\"';\n }\n if (options.highlight) {\n highlighted = options.highlight.apply(options.highlight, [token.content].concat(fences)) || escapeHtml(token.content);\n } else {\n highlighted = escapeHtml(token.content);\n }\n return '
' + highlighted + '
' + getBreak(tokens, idx);\n};\nrules.fence_custom = {};\n\n/**\n * Headings\n */\n\nrules.heading_open = function (tokens, idx /*, options, env */) {\n return '';\n};\nrules.heading_close = function (tokens, idx /*, options, env */) {\n return '\\n';\n};\n\n/**\n * Horizontal rules\n */\n\nrules.hr = function (tokens, idx, options /*, env */) {\n return (options.xhtmlOut ? '
' : '
') + getBreak(tokens, idx);\n};\n\n/**\n * Bullets\n */\n\nrules.bullet_list_open = function /* tokens, idx, options, env */\n() {\n return '
    \\n';\n};\nrules.bullet_list_close = function (tokens, idx /*, options, env */) {\n return '
' + getBreak(tokens, idx);\n};\n\n/**\n * List items\n */\n\nrules.list_item_open = function /* tokens, idx, options, env */\n() {\n return '
  • ';\n};\nrules.list_item_close = function /* tokens, idx, options, env */\n() {\n return '
  • \\n';\n};\n\n/**\n * Ordered list items\n */\n\nrules.ordered_list_open = function (tokens, idx /*, options, env */) {\n var token = tokens[idx];\n var order = token.order > 1 ? ' start=\"' + token.order + '\"' : '';\n return '\\n';\n};\nrules.ordered_list_close = function (tokens, idx /*, options, env */) {\n return '' + getBreak(tokens, idx);\n};\n\n/**\n * Paragraphs\n */\n\nrules.paragraph_open = function (tokens, idx /*, options, env */) {\n return tokens[idx].tight ? '' : '

    ';\n};\nrules.paragraph_close = function (tokens, idx /*, options, env */) {\n var addBreak = !(tokens[idx].tight && idx && tokens[idx - 1].type === 'inline' && !tokens[idx - 1].content);\n return (tokens[idx].tight ? '' : '

    ') + (addBreak ? getBreak(tokens, idx) : '');\n};\n\n/**\n * Links\n */\n\nrules.link_open = function (tokens, idx, options /* env */) {\n var title = tokens[idx].title ? ' title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\"' : '';\n var target = options.linkTarget ? ' target=\"' + options.linkTarget + '\"' : '';\n return '';\n};\nrules.link_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\n\n/**\n * Images\n */\n\nrules.image = function (tokens, idx, options /*, env */) {\n var src = ' src=\"' + escapeHtml(tokens[idx].src) + '\"';\n var title = tokens[idx].title ? ' title=\"' + escapeHtml(replaceEntities(tokens[idx].title)) + '\"' : '';\n var alt = ' alt=\"' + (tokens[idx].alt ? escapeHtml(replaceEntities(unescapeMd(tokens[idx].alt))) : '') + '\"';\n var suffix = options.xhtmlOut ? ' /' : '';\n return '';\n};\n\n/**\n * Tables\n */\n\nrules.table_open = function /* tokens, idx, options, env */\n() {\n return '\\n';\n};\nrules.table_close = function /* tokens, idx, options, env */\n() {\n return '
    \\n';\n};\nrules.thead_open = function /* tokens, idx, options, env */\n() {\n return '\\n';\n};\nrules.thead_close = function /* tokens, idx, options, env */\n() {\n return '\\n';\n};\nrules.tbody_open = function /* tokens, idx, options, env */\n() {\n return '\\n';\n};\nrules.tbody_close = function /* tokens, idx, options, env */\n() {\n return '\\n';\n};\nrules.tr_open = function /* tokens, idx, options, env */\n() {\n return '';\n};\nrules.tr_close = function /* tokens, idx, options, env */\n() {\n return '\\n';\n};\nrules.th_open = function (tokens, idx /*, options, env */) {\n var token = tokens[idx];\n return '';\n};\nrules.th_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\nrules.td_open = function (tokens, idx /*, options, env */) {\n var token = tokens[idx];\n return '';\n};\nrules.td_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\n\n/**\n * Bold\n */\n\nrules.strong_open = function /* tokens, idx, options, env */\n() {\n return '';\n};\nrules.strong_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\n\n/**\n * Italicize\n */\n\nrules.em_open = function /* tokens, idx, options, env */\n() {\n return '';\n};\nrules.em_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\n\n/**\n * Strikethrough\n */\n\nrules.del_open = function /* tokens, idx, options, env */\n() {\n return '';\n};\nrules.del_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\n\n/**\n * Insert\n */\n\nrules.ins_open = function /* tokens, idx, options, env */\n() {\n return '';\n};\nrules.ins_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\n\n/**\n * Highlight\n */\n\nrules.mark_open = function /* tokens, idx, options, env */\n() {\n return '';\n};\nrules.mark_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\n\n/**\n * Super- and sub-script\n */\n\nrules.sub = function (tokens, idx /*, options, env */) {\n return '' + escapeHtml(tokens[idx].content) + '';\n};\nrules.sup = function (tokens, idx /*, options, env */) {\n return '' + escapeHtml(tokens[idx].content) + '';\n};\n\n/**\n * Breaks\n */\n\nrules.hardbreak = function (tokens, idx, options /*, env */) {\n return options.xhtmlOut ? '
    \\n' : '
    \\n';\n};\nrules.softbreak = function (tokens, idx, options /*, env */) {\n return options.breaks ? options.xhtmlOut ? '
    \\n' : '
    \\n' : '\\n';\n};\n\n/**\n * Text\n */\n\nrules.text = function (tokens, idx /*, options, env */) {\n return escapeHtml(tokens[idx].content);\n};\n\n/**\n * Content\n */\n\nrules.htmlblock = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\nrules.htmltag = function (tokens, idx /*, options, env */) {\n return tokens[idx].content;\n};\n\n/**\n * Abbreviations, initialism\n */\n\nrules.abbr_open = function (tokens, idx /*, options, env */) {\n return '';\n};\nrules.abbr_close = function /* tokens, idx, options, env */\n() {\n return '';\n};\n\n/**\n * Footnotes\n */\n\nrules.footnote_ref = function (tokens, idx) {\n var n = Number(tokens[idx].id + 1).toString();\n var id = 'fnref' + n;\n if (tokens[idx].subId > 0) {\n id += ':' + tokens[idx].subId;\n }\n return '[' + n + ']';\n};\nrules.footnote_block_open = function (tokens, idx, options) {\n var hr = options.xhtmlOut ? '
    \\n' : '
    \\n';\n return hr + '
    \\n
      \\n';\n};\nrules.footnote_block_close = function () {\n return '
    \\n
    \\n';\n};\nrules.footnote_open = function (tokens, idx) {\n var id = Number(tokens[idx].id + 1).toString();\n return '
  • ';\n};\nrules.footnote_close = function () {\n return '
  • \\n';\n};\nrules.footnote_anchor = function (tokens, idx) {\n var n = Number(tokens[idx].id + 1).toString();\n var id = 'fnref' + n;\n if (tokens[idx].subId > 0) {\n id += ':' + tokens[idx].subId;\n }\n return ' ';\n};\n\n/**\n * Definition lists\n */\n\nrules.dl_open = function () {\n return '
    \\n';\n};\nrules.dt_open = function () {\n return '
    ';\n};\nrules.dd_open = function () {\n return '
    ';\n};\nrules.dl_close = function () {\n return '
    \\n';\n};\nrules.dt_close = function () {\n return '\\n';\n};\nrules.dd_close = function () {\n return '\\n';\n};\n\n/**\n * Helper functions\n */\n\nfunction nextToken(tokens, idx) {\n if (++idx >= tokens.length - 2) {\n return idx;\n }\n if (tokens[idx].type === 'paragraph_open' && tokens[idx].tight && tokens[idx + 1].type === 'inline' && tokens[idx + 1].content.length === 0 && tokens[idx + 2].type === 'paragraph_close' && tokens[idx + 2].tight) {\n return nextToken(tokens, idx + 2);\n }\n return idx;\n}\n\n/**\n * Check to see if `\\n` is needed before the next token.\n *\n * @param {Array} `tokens`\n * @param {Number} `idx`\n * @return {String} Empty string or newline\n * @api private\n */\n\nvar getBreak = rules.getBreak = function getBreak(tokens, idx) {\n idx = nextToken(tokens, idx);\n if (idx < tokens.length && tokens[idx].type === 'list_item_close') {\n return '';\n }\n return '\\n';\n};\n\n/**\n * Renderer class. Renders HTML and exposes `rules` to allow\n * local modifications.\n */\n\nfunction Renderer() {\n this.rules = assign({}, rules);\n\n // exported helper, for custom rules only\n this.getBreak = rules.getBreak;\n}\n\n/**\n * Render a string of inline HTML with the given `tokens` and\n * `options`.\n *\n * @param {Array} `tokens`\n * @param {Object} `options`\n * @param {Object} `env`\n * @return {String}\n * @api public\n */\n\nRenderer.prototype.renderInline = function (tokens, options, env) {\n var _rules = this.rules;\n var len = tokens.length,\n i = 0;\n var result = '';\n while (len--) {\n result += _rules[tokens[i].type](tokens, i++, options, env, this);\n }\n return result;\n};\n\n/**\n * Render a string of HTML with the given `tokens` and\n * `options`.\n *\n * @param {Array} `tokens`\n * @param {Object} `options`\n * @param {Object} `env`\n * @return {String}\n * @api public\n */\n\nRenderer.prototype.render = function (tokens, options, env) {\n var _rules = this.rules;\n var len = tokens.length,\n i = -1;\n var result = '';\n while (++i < len) {\n if (tokens[i].type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env);\n } else {\n result += _rules[tokens[i].type](tokens, i, options, env, this);\n }\n }\n return result;\n};\n\n/**\n * Ruler is a helper class for building responsibility chains from\n * parse rules. It allows:\n *\n * - easy stack rules chains\n * - getting main chain and named chains content (as arrays of functions)\n *\n * Helper methods, should not be used directly.\n * @api private\n */\n\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // { name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ] }\n //\n this.__rules__ = [];\n\n // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - digital anchor for fast filtering by charcodes.\n //\n this.__cache__ = null;\n}\n\n/**\n * Find the index of a rule by `name`.\n *\n * @param {String} `name`\n * @return {Number} Index of the given `name`\n * @api private\n */\n\nRuler.prototype.__find__ = function (name) {\n var len = this.__rules__.length;\n var i = -1;\n while (len--) {\n if (this.__rules__[++i].name === name) {\n return i;\n }\n }\n return -1;\n};\n\n/**\n * Build the rules lookup cache\n *\n * @api private\n */\n\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = [''];\n\n // collect unique names\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) {\n return;\n }\n rule.alt.forEach(function (altName) {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n }\n });\n });\n self.__cache__ = {};\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) {\n return;\n }\n if (chain && rule.alt.indexOf(chain) < 0) {\n return;\n }\n self.__cache__[chain].push(rule.fn);\n });\n });\n};\n\n/**\n * Ruler public methods\n * ------------------------------------------------\n */\n\n/**\n * Replace rule function\n *\n * @param {String} `name` Rule name\n * @param {Function `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.at = function (name, fn, options) {\n var idx = this.__find__(name);\n var opt = options || {};\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + name);\n }\n this.__rules__[idx].fn = fn;\n this.__rules__[idx].alt = opt.alt || [];\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the chain before given the `ruleName`.\n *\n * @param {String} `beforeName`\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var idx = this.__find__(beforeName);\n var opt = options || {};\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + beforeName);\n }\n this.__rules__.splice(idx, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the chain after the given `ruleName`.\n *\n * @param {String} `afterName`\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var idx = this.__find__(afterName);\n var opt = options || {};\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + afterName);\n }\n this.__rules__.splice(idx + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the end of chain.\n *\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @return {String}\n */\n\nRuler.prototype.push = function (ruleName, fn, options) {\n var opt = options || {};\n this.__rules__.push({\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n this.__cache__ = null;\n};\n\n/**\n * Enable a rule or list of rules.\n *\n * @param {String|Array} `list` Name or array of rule names to enable\n * @param {Boolean} `strict` If `true`, all non listed rules will be disabled.\n * @api private\n */\n\nRuler.prototype.enable = function (list, strict) {\n list = !Array.isArray(list) ? [list] : list;\n\n // In strict mode disable all existing rules first\n if (strict) {\n this.__rules__.forEach(function (rule) {\n rule.enabled = false;\n });\n }\n\n // Search by name and enable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n if (idx < 0) {\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = true;\n }, this);\n this.__cache__ = null;\n};\n\n/**\n * Disable a rule or list of rules.\n *\n * @param {String|Array} `list` Name or array of rule names to disable\n * @api private\n */\n\nRuler.prototype.disable = function (list) {\n list = !Array.isArray(list) ? [list] : list;\n\n // Search by name and disable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n if (idx < 0) {\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = false;\n }, this);\n this.__cache__ = null;\n};\n\n/**\n * Get a rules list as an array of functions.\n *\n * @param {String} `chainName`\n * @return {Object}\n * @api private\n */\n\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n }\n return this.__cache__[chainName] || [];\n};\nfunction block(state) {\n if (state.inlineMode) {\n state.tokens.push({\n type: 'inline',\n content: state.src.replace(/\\n/g, ' ').trim(),\n level: 0,\n lines: [0, 1],\n children: []\n });\n } else {\n state.block.parse(state.src, state.options, state.env, state.tokens);\n }\n}\n\n// Inline parser state\n\nfunction StateInline(src, parserInline, options, env, outTokens) {\n this.src = src;\n this.env = env;\n this.options = options;\n this.parser = parserInline;\n this.tokens = outTokens;\n this.pos = 0;\n this.posMax = this.src.length;\n this.level = 0;\n this.pending = '';\n this.pendingLevel = 0;\n this.cache = []; // Stores { start: end } pairs. Useful for backtrack\n // optimization of pairs parse (emphasis, strikes).\n\n // Link parser state vars\n\n this.isInLabel = false; // Set true when seek link label - we should disable\n // \"paired\" rules (emphasis, strikes) to not skip\n // tailing `]`\n\n this.linkLevel = 0; // Increment for each nesting link. Used to prevent\n // nesting in definitions\n\n this.linkContent = ''; // Temporary storage for link url\n\n this.labelUnmatchedScopes = 0; // Track unpaired `[` for link labels\n // (backtrack optimization)\n}\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n this.tokens.push({\n type: 'text',\n content: this.pending,\n level: this.pendingLevel\n });\n this.pending = '';\n};\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (token) {\n if (this.pending) {\n this.pushPending();\n }\n this.tokens.push(token);\n this.pendingLevel = this.level;\n};\n\n// Store value to cache.\n// !!! Implementation has parser-specific optimizations\n// !!! keys MUST be integer, >= 0; values MUST be integer, > 0\n//\nStateInline.prototype.cacheSet = function (key, val) {\n for (var i = this.cache.length; i <= key; i++) {\n this.cache.push(0);\n }\n this.cache[key] = val;\n};\n\n// Get cache value\n//\nStateInline.prototype.cacheGet = function (key) {\n return key < this.cache.length ? this.cache[key] : 0;\n};\n\n/**\n * Parse link labels\n *\n * This function assumes that first character (`[`) already matches;\n * returns the end of the label.\n *\n * @param {Object} state\n * @param {Number} start\n * @api private\n */\n\nfunction parseLinkLabel(state, start) {\n var level,\n found,\n marker,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos,\n oldFlag = state.isInLabel;\n if (state.isInLabel) {\n return -1;\n }\n if (state.labelUnmatchedScopes) {\n state.labelUnmatchedScopes--;\n return -1;\n }\n state.pos = start + 1;\n state.isInLabel = true;\n level = 1;\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n if (marker === 0x5B /* [ */) {\n level++;\n } else if (marker === 0x5D /* ] */) {\n level--;\n if (level === 0) {\n found = true;\n break;\n }\n }\n state.parser.skipToken(state);\n }\n if (found) {\n labelEnd = state.pos;\n state.labelUnmatchedScopes = 0;\n } else {\n state.labelUnmatchedScopes = level - 1;\n }\n\n // restore old state\n state.pos = oldPos;\n state.isInLabel = oldFlag;\n return labelEnd;\n}\n\n// Parse abbreviation definitions, i.e. `*[abbr]: description`\n\nfunction parseAbbr(str, parserInline, options, env) {\n var state, labelEnd, pos, max, label, title;\n if (str.charCodeAt(0) !== 0x2A /* * */) {\n return -1;\n }\n if (str.charCodeAt(1) !== 0x5B /* [ */) {\n return -1;\n }\n if (str.indexOf(']:') === -1) {\n return -1;\n }\n state = new StateInline(str, parserInline, options, env, []);\n labelEnd = parseLinkLabel(state, 1);\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A /* : */) {\n return -1;\n }\n max = state.posMax;\n\n // abbr title is always one line, so looking for ending \"\\n\" here\n for (pos = labelEnd + 2; pos < max; pos++) {\n if (state.src.charCodeAt(pos) === 0x0A) {\n break;\n }\n }\n label = str.slice(2, labelEnd);\n title = str.slice(labelEnd + 2, pos).trim();\n if (title.length === 0) {\n return -1;\n }\n if (!env.abbreviations) {\n env.abbreviations = {};\n }\n // prepend ':' to avoid conflict with Object.prototype members\n if (typeof env.abbreviations[':' + label] === 'undefined') {\n env.abbreviations[':' + label] = title;\n }\n return pos;\n}\nfunction abbr(state) {\n var tokens = state.tokens,\n i,\n l,\n content,\n pos;\n if (state.inlineMode) {\n return;\n }\n\n // Parse inlines\n for (i = 1, l = tokens.length - 1; i < l; i++) {\n if (tokens[i - 1].type === 'paragraph_open' && tokens[i].type === 'inline' && tokens[i + 1].type === 'paragraph_close') {\n content = tokens[i].content;\n while (content.length) {\n pos = parseAbbr(content, state.inline, state.options, state.env);\n if (pos < 0) {\n break;\n }\n content = content.slice(pos).trim();\n }\n tokens[i].content = content;\n if (!content.length) {\n tokens[i - 1].tight = true;\n tokens[i + 1].tight = true;\n }\n }\n }\n}\nfunction normalizeLink(url) {\n var normalized = replaceEntities(url);\n // We shouldn't care about the result of malformed URIs,\n // and should not throw an exception.\n try {\n normalized = decodeURI(normalized);\n } catch (err) {}\n return encodeURI(normalized);\n}\n\n/**\n * Parse link destination\n *\n * - on success it returns a string and updates state.pos;\n * - on failure it returns null\n *\n * @param {Object} state\n * @param {Number} pos\n * @api private\n */\n\nfunction parseLinkDestination(state, pos) {\n var code,\n level,\n link,\n start = pos,\n max = state.posMax;\n if (state.src.charCodeAt(pos) === 0x3C /* < */) {\n pos++;\n while (pos < max) {\n code = state.src.charCodeAt(pos);\n if (code === 0x0A /* \\n */) {\n return false;\n }\n if (code === 0x3E /* > */) {\n link = normalizeLink(unescapeMd(state.src.slice(start + 1, pos)));\n if (!state.parser.validateLink(link)) {\n return false;\n }\n state.pos = pos + 1;\n state.linkContent = link;\n return true;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n pos++;\n }\n\n // no closing '>'\n return false;\n }\n\n // this should be ... } else { ... branch\n\n level = 0;\n while (pos < max) {\n code = state.src.charCodeAt(pos);\n if (code === 0x20) {\n break;\n }\n\n // ascii control chars\n if (code < 0x20 || code === 0x7F) {\n break;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n if (code === 0x28 /* ( */) {\n level++;\n if (level > 1) {\n break;\n }\n }\n if (code === 0x29 /* ) */) {\n level--;\n if (level < 0) {\n break;\n }\n }\n pos++;\n }\n if (start === pos) {\n return false;\n }\n link = unescapeMd(state.src.slice(start, pos));\n if (!state.parser.validateLink(link)) {\n return false;\n }\n state.linkContent = link;\n state.pos = pos;\n return true;\n}\n\n/**\n * Parse link title\n *\n * - on success it returns a string and updates state.pos;\n * - on failure it returns null\n *\n * @param {Object} state\n * @param {Number} pos\n * @api private\n */\n\nfunction parseLinkTitle(state, pos) {\n var code,\n start = pos,\n max = state.posMax,\n marker = state.src.charCodeAt(pos);\n if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) {\n return false;\n }\n pos++;\n\n // if opening marker is \"(\", switch it to closing marker \")\"\n if (marker === 0x28) {\n marker = 0x29;\n }\n while (pos < max) {\n code = state.src.charCodeAt(pos);\n if (code === marker) {\n state.pos = pos + 1;\n state.linkContent = unescapeMd(state.src.slice(start + 1, pos));\n return true;\n }\n if (code === 0x5C /* \\ */ && pos + 1 < max) {\n pos += 2;\n continue;\n }\n pos++;\n }\n return false;\n}\nfunction normalizeReference(str) {\n // use .toUpperCase() instead of .toLowerCase()\n // here to avoid a conflict with Object.prototype\n // members (most notably, `__proto__`)\n return str.trim().replace(/\\s+/g, ' ').toUpperCase();\n}\nfunction parseReference(str, parser, options, env) {\n var state, labelEnd, pos, max, code, start, href, title, label;\n if (str.charCodeAt(0) !== 0x5B /* [ */) {\n return -1;\n }\n if (str.indexOf(']:') === -1) {\n return -1;\n }\n state = new StateInline(str, parser, options, env, []);\n labelEnd = parseLinkLabel(state, 0);\n if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A /* : */) {\n return -1;\n }\n max = state.posMax;\n\n // [label]: destination 'title'\n // ^^^ skip optional whitespace here\n for (pos = labelEnd + 2; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^^^^^ parse this\n if (!parseLinkDestination(state, pos)) {\n return -1;\n }\n href = state.linkContent;\n pos = state.pos;\n\n // [label]: destination 'title'\n // ^^^ skipping those spaces\n start = pos;\n for (pos = pos + 1; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) {\n break;\n }\n }\n\n // [label]: destination 'title'\n // ^^^^^^^ parse this\n if (pos < max && start !== pos && parseLinkTitle(state, pos)) {\n title = state.linkContent;\n pos = state.pos;\n } else {\n title = '';\n pos = start;\n }\n\n // ensure that the end of the line is empty\n while (pos < max && state.src.charCodeAt(pos) === 0x20 /* space */) {\n pos++;\n }\n if (pos < max && state.src.charCodeAt(pos) !== 0x0A) {\n return -1;\n }\n label = normalizeReference(str.slice(1, labelEnd));\n if (typeof env.references[label] === 'undefined') {\n env.references[label] = {\n title: title,\n href: href\n };\n }\n return pos;\n}\nfunction references(state) {\n var tokens = state.tokens,\n i,\n l,\n content,\n pos;\n state.env.references = state.env.references || {};\n if (state.inlineMode) {\n return;\n }\n\n // Scan definitions in paragraph inlines\n for (i = 1, l = tokens.length - 1; i < l; i++) {\n if (tokens[i].type === 'inline' && tokens[i - 1].type === 'paragraph_open' && tokens[i + 1].type === 'paragraph_close') {\n content = tokens[i].content;\n while (content.length) {\n pos = parseReference(content, state.inline, state.options, state.env);\n if (pos < 0) {\n break;\n }\n content = content.slice(pos).trim();\n }\n tokens[i].content = content;\n if (!content.length) {\n tokens[i - 1].tight = true;\n tokens[i + 1].tight = true;\n }\n }\n }\n}\nfunction inline(state) {\n var tokens = state.tokens,\n tok,\n i,\n l;\n\n // Parse inlines\n for (i = 0, l = tokens.length; i < l; i++) {\n tok = tokens[i];\n if (tok.type === 'inline') {\n state.inline.parse(tok.content, state.options, state.env, tok.children);\n }\n }\n}\nfunction footnote_block(state) {\n var i,\n l,\n j,\n t,\n lastParagraph,\n list,\n tokens,\n current,\n currentLabel,\n level = 0,\n insideRef = false,\n refTokens = {};\n if (!state.env.footnotes) {\n return;\n }\n state.tokens = state.tokens.filter(function (tok) {\n if (tok.type === 'footnote_reference_open') {\n insideRef = true;\n current = [];\n currentLabel = tok.label;\n return false;\n }\n if (tok.type === 'footnote_reference_close') {\n insideRef = false;\n // prepend ':' to avoid conflict with Object.prototype members\n refTokens[':' + currentLabel] = current;\n return false;\n }\n if (insideRef) {\n current.push(tok);\n }\n return !insideRef;\n });\n if (!state.env.footnotes.list) {\n return;\n }\n list = state.env.footnotes.list;\n state.tokens.push({\n type: 'footnote_block_open',\n level: level++\n });\n for (i = 0, l = list.length; i < l; i++) {\n state.tokens.push({\n type: 'footnote_open',\n id: i,\n level: level++\n });\n if (list[i].tokens) {\n tokens = [];\n tokens.push({\n type: 'paragraph_open',\n tight: false,\n level: level++\n });\n tokens.push({\n type: 'inline',\n content: '',\n level: level,\n children: list[i].tokens\n });\n tokens.push({\n type: 'paragraph_close',\n tight: false,\n level: --level\n });\n } else if (list[i].label) {\n tokens = refTokens[':' + list[i].label];\n }\n state.tokens = state.tokens.concat(tokens);\n if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {\n lastParagraph = state.tokens.pop();\n } else {\n lastParagraph = null;\n }\n t = list[i].count > 0 ? list[i].count : 1;\n for (j = 0; j < t; j++) {\n state.tokens.push({\n type: 'footnote_anchor',\n id: i,\n subId: j,\n level: level\n });\n }\n if (lastParagraph) {\n state.tokens.push(lastParagraph);\n }\n state.tokens.push({\n type: 'footnote_close',\n level: --level\n });\n }\n state.tokens.push({\n type: 'footnote_block_close',\n level: --level\n });\n}\n\n// Enclose abbreviations in tags\n//\n\nvar PUNCT_CHARS = ' \\n()[]\\'\".,!?-';\n\n// from Google closure library\n// http://closure-library.googlecode.com/git-history/docs/local_closure_goog_string_string.js.source.html#line1021\nfunction regEscape(s) {\n return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#= 0; i--) {\n token = tokens[i];\n if (token.type !== 'text') {\n continue;\n }\n pos = 0;\n text = token.content;\n reg.lastIndex = 0;\n level = token.level;\n nodes = [];\n while (m = reg.exec(text)) {\n if (reg.lastIndex > pos) {\n nodes.push({\n type: 'text',\n content: text.slice(pos, m.index + m[1].length),\n level: level\n });\n }\n nodes.push({\n type: 'abbr_open',\n title: state.env.abbreviations[':' + m[2]],\n level: level++\n });\n nodes.push({\n type: 'text',\n content: m[2],\n level: level\n });\n nodes.push({\n type: 'abbr_close',\n level: --level\n });\n pos = reg.lastIndex - m[3].length;\n }\n if (!nodes.length) {\n continue;\n }\n if (pos < text.length) {\n nodes.push({\n type: 'text',\n content: text.slice(pos),\n level: level\n });\n }\n\n // replace current node\n blockTokens[j].children = tokens = [].concat(tokens.slice(0, i), nodes, tokens.slice(i + 1));\n }\n }\n}\n\n// Simple typographical replacements\n//\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - miltiplication 2 x 4 -> 2 × 4\n\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\nvar SCOPED_ABBR_RE = /\\((c|tm|r|p)\\)/ig;\nvar SCOPED_ABBR = {\n 'c': '©',\n 'r': '®',\n 'p': '§',\n 'tm': '™'\n};\nfunction replaceScopedAbbr(str) {\n if (str.indexOf('(') < 0) {\n return str;\n }\n return str.replace(SCOPED_ABBR_RE, function (match, name) {\n return SCOPED_ABBR[name.toLowerCase()];\n });\n}\nfunction replace(state) {\n var i, token, text, inlineTokens, blkIdx;\n if (!state.options.typographer) {\n return;\n }\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type !== 'inline') {\n continue;\n }\n inlineTokens = state.tokens[blkIdx].children;\n for (i = inlineTokens.length - 1; i >= 0; i--) {\n token = inlineTokens[i];\n if (token.type === 'text') {\n text = token.content;\n text = replaceScopedAbbr(text);\n if (RARE_RE.test(text)) {\n text = text.replace(/\\+-/g, '±')\n // .., ..., ....... -> …\n // but ?..... & !..... -> ?.. & !..\n .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..').replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n // em-dash\n .replace(/(^|[^-])---([^-]|$)/mg, '$1\\u2014$2')\n // en-dash\n .replace(/(^|\\s)--(\\s|$)/mg, '$1\\u2013$2').replace(/(^|[^-\\s])--([^-\\s]|$)/mg, '$1\\u2013$2');\n }\n token.content = text;\n }\n }\n }\n}\n\n// Convert straight quotation marks to typographic ones\n//\n\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar PUNCT_RE = /[-\\s()\\[\\]]/;\nvar APOSTROPHE = '’';\n\n// This function returns true if the character at `pos`\n// could be inside a word.\nfunction isLetter(str, pos) {\n if (pos < 0 || pos >= str.length) {\n return false;\n }\n return !PUNCT_RE.test(str[pos]);\n}\nfunction replaceAt(str, index, ch) {\n return str.substr(0, index) + ch + str.substr(index + 1);\n}\nfunction smartquotes(state) {\n /*eslint max-depth:0*/\n var i, token, text, t, pos, max, thisLevel, lastSpace, nextSpace, item, canOpen, canClose, j, isSingle, blkIdx, tokens, stack;\n if (!state.options.typographer) {\n return;\n }\n stack = [];\n for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n if (state.tokens[blkIdx].type !== 'inline') {\n continue;\n }\n tokens = state.tokens[blkIdx].children;\n stack.length = 0;\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n if (token.type !== 'text' || QUOTE_TEST_RE.test(token.text)) {\n continue;\n }\n thisLevel = tokens[i].level;\n for (j = stack.length - 1; j >= 0; j--) {\n if (stack[j].level <= thisLevel) {\n break;\n }\n }\n stack.length = j + 1;\n text = token.content;\n pos = 0;\n max = text.length;\n\n /*eslint no-labels:0,block-scoped-var:0*/\n OUTER: while (pos < max) {\n QUOTE_RE.lastIndex = pos;\n t = QUOTE_RE.exec(text);\n if (!t) {\n break;\n }\n lastSpace = !isLetter(text, t.index - 1);\n pos = t.index + 1;\n isSingle = t[0] === \"'\";\n nextSpace = !isLetter(text, pos);\n if (!nextSpace && !lastSpace) {\n // middle of word\n if (isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n continue;\n }\n canOpen = !nextSpace;\n canClose = !lastSpace;\n if (canClose) {\n // this could be a closing quote, rewind the stack to get a match\n for (j = stack.length - 1; j >= 0; j--) {\n item = stack[j];\n if (stack[j].level < thisLevel) {\n break;\n }\n if (item.single === isSingle && stack[j].level === thisLevel) {\n item = stack[j];\n if (isSingle) {\n tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, state.options.quotes[2]);\n token.content = replaceAt(token.content, t.index, state.options.quotes[3]);\n } else {\n tokens[item.token].content = replaceAt(tokens[item.token].content, item.pos, state.options.quotes[0]);\n token.content = replaceAt(token.content, t.index, state.options.quotes[1]);\n }\n stack.length = j;\n continue OUTER;\n }\n }\n }\n if (canOpen) {\n stack.push({\n token: i,\n pos: t.index,\n single: isSingle,\n level: thisLevel\n });\n } else if (canClose && isSingle) {\n token.content = replaceAt(token.content, t.index, APOSTROPHE);\n }\n }\n }\n }\n}\n\n/**\n * Core parser `rules`\n */\n\nvar _rules = [['block', block], ['abbr', abbr], ['references', references], ['inline', inline], ['footnote_tail', footnote_block], ['abbr2', abbr2], ['replacements', replace], ['smartquotes', smartquotes]];\n\n/**\n * Class for top level (`core`) parser rules\n *\n * @api private\n */\n\nfunction Core() {\n this.options = {};\n this.ruler = new Ruler();\n for (var i = 0; i < _rules.length; i++) {\n this.ruler.push(_rules[i][0], _rules[i][1]);\n }\n}\n\n/**\n * Process rules with the given `state`\n *\n * @param {Object} `state`\n * @api private\n */\n\nCore.prototype.process = function (state) {\n var i, l, rules;\n rules = this.ruler.getRules('');\n for (i = 0, l = rules.length; i < l; i++) {\n rules[i](state);\n }\n};\n\n// Parser state class\n\nfunction StateBlock(src, parser, options, env, tokens) {\n var ch, s, start, pos, len, indent, indent_found;\n this.src = src;\n\n // Shortcuts to simplify nested calls\n this.parser = parser;\n this.options = options;\n this.env = env;\n\n //\n // Internal state vartiables\n //\n\n this.tokens = tokens;\n this.bMarks = []; // line begin offsets for fast jumps\n this.eMarks = []; // line end offsets for fast jumps\n this.tShift = []; // indent for each line\n\n // block parser variables\n this.blkIndent = 0; // required block content indent\n // (for example, if we are in list)\n this.line = 0; // line index in src\n this.lineMax = 0; // lines count\n this.tight = false; // loose/tight mode for lists\n this.parentType = 'root'; // if `list`, block parser stops on two newlines\n this.ddIndent = -1; // indent of the current dd block (-1 if there isn't any)\n\n this.level = 0;\n\n // renderer\n this.result = '';\n\n // Create caches\n // Generate markers.\n s = this.src;\n indent = 0;\n indent_found = false;\n for (start = pos = indent = 0, len = s.length; pos < len; pos++) {\n ch = s.charCodeAt(pos);\n if (!indent_found) {\n if (ch === 0x20 /* space */) {\n indent++;\n continue;\n } else {\n indent_found = true;\n }\n }\n if (ch === 0x0A || pos === len - 1) {\n if (ch !== 0x0A) {\n pos++;\n }\n this.bMarks.push(start);\n this.eMarks.push(pos);\n this.tShift.push(indent);\n indent_found = false;\n indent = 0;\n start = pos + 1;\n }\n }\n\n // Push fake entry to simplify cache bounds checks\n this.bMarks.push(s.length);\n this.eMarks.push(s.length);\n this.tShift.push(0);\n this.lineMax = this.bMarks.length - 1; // don't count last fake line\n}\nStateBlock.prototype.isEmpty = function isEmpty(line) {\n return this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n};\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) {\n for (var max = this.lineMax; from < max; from++) {\n if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n break;\n }\n }\n return from;\n};\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces(pos) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== 0x20 /* space */) {\n break;\n }\n }\n return pos;\n};\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars(pos, code) {\n for (var max = this.src.length; pos < max; pos++) {\n if (this.src.charCodeAt(pos) !== code) {\n break;\n }\n }\n return pos;\n};\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) {\n if (pos <= min) {\n return pos;\n }\n while (pos > min) {\n if (code !== this.src.charCodeAt(--pos)) {\n return pos + 1;\n }\n }\n return pos;\n};\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) {\n var i,\n first,\n last,\n queue,\n shift,\n line = begin;\n if (begin >= end) {\n return '';\n }\n\n // Opt: don't use push queue for single line;\n if (line + 1 === end) {\n first = this.bMarks[line] + Math.min(this.tShift[line], indent);\n last = keepLastLF ? this.eMarks[line] + 1 : this.eMarks[line];\n return this.src.slice(first, last);\n }\n queue = new Array(end - begin);\n for (i = 0; line < end; line++, i++) {\n shift = this.tShift[line];\n if (shift > indent) {\n shift = indent;\n }\n if (shift < 0) {\n shift = 0;\n }\n first = this.bMarks[line] + shift;\n if (line + 1 < end || keepLastLF) {\n // No need for bounds check because we have fake entry on tail.\n last = this.eMarks[line] + 1;\n } else {\n last = this.eMarks[line];\n }\n queue[i] = this.src.slice(first, last);\n }\n return queue.join('');\n};\n\n// Code block (4 spaces padded)\n\nfunction code(state, startLine, endLine /*, silent*/) {\n var nextLine, last;\n if (state.tShift[startLine] - state.blkIndent < 4) {\n return false;\n }\n last = nextLine = startLine + 1;\n while (nextLine < endLine) {\n if (state.isEmpty(nextLine)) {\n nextLine++;\n continue;\n }\n if (state.tShift[nextLine] - state.blkIndent >= 4) {\n nextLine++;\n last = nextLine;\n continue;\n }\n break;\n }\n state.line = nextLine;\n state.tokens.push({\n type: 'code',\n content: state.getLines(startLine, last, 4 + state.blkIndent, true),\n block: true,\n lines: [startLine, state.line],\n level: state.level\n });\n return true;\n}\n\n// fences (``` lang, ~~~ lang)\n\nfunction fences(state, startLine, endLine, silent) {\n var marker,\n len,\n params,\n nextLine,\n mem,\n haveEndMarker = false,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n if (pos + 3 > max) {\n return false;\n }\n marker = state.src.charCodeAt(pos);\n if (marker !== 0x7E /* ~ */ && marker !== 0x60 /* ` */) {\n return false;\n }\n\n // scan marker length\n mem = pos;\n pos = state.skipChars(pos, marker);\n len = pos - mem;\n if (len < 3) {\n return false;\n }\n params = state.src.slice(pos, max).trim();\n if (params.indexOf('`') >= 0) {\n return false;\n }\n\n // Since start is found, we can report success here in validation mode\n if (silent) {\n return true;\n }\n\n // search end of block\n nextLine = startLine;\n for (;;) {\n nextLine++;\n if (nextLine >= endLine) {\n // unclosed block should be autoclosed by end of document.\n // also block seems to be autoclosed by end of parent\n break;\n }\n pos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n if (pos < max && state.tShift[nextLine] < state.blkIndent) {\n // non-empty line with negative indent should stop the list:\n // - ```\n // test\n break;\n }\n if (state.src.charCodeAt(pos) !== marker) {\n continue;\n }\n if (state.tShift[nextLine] - state.blkIndent >= 4) {\n // closing fence should be indented less than 4 spaces\n continue;\n }\n pos = state.skipChars(pos, marker);\n\n // closing code fence must be at least as long as the opening one\n if (pos - mem < len) {\n continue;\n }\n\n // make sure tail has spaces only\n pos = state.skipSpaces(pos);\n if (pos < max) {\n continue;\n }\n haveEndMarker = true;\n // found!\n break;\n }\n\n // If a fence has heading spaces, they should be removed from its inner block\n len = state.tShift[startLine];\n state.line = nextLine + (haveEndMarker ? 1 : 0);\n state.tokens.push({\n type: 'fence',\n params: params,\n content: state.getLines(startLine + 1, nextLine, len, true),\n lines: [startLine, state.line],\n level: state.level\n });\n return true;\n}\n\n// Block quotes\n\nfunction blockquote(state, startLine, endLine, silent) {\n var nextLine,\n lastLineEmpty,\n oldTShift,\n oldBMarks,\n oldIndent,\n oldParentType,\n lines,\n terminatorRules,\n i,\n l,\n terminate,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n if (pos > max) {\n return false;\n }\n\n // check the block quote marker\n if (state.src.charCodeAt(pos++) !== 0x3E /* > */) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n\n // we know that it's going to be a valid blockquote,\n // so no point trying to find the end of it in silent mode\n if (silent) {\n return true;\n }\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20) {\n pos++;\n }\n oldIndent = state.blkIndent;\n state.blkIndent = 0;\n oldBMarks = [state.bMarks[startLine]];\n state.bMarks[startLine] = pos;\n\n // check if we have an empty blockquote\n pos = pos < max ? state.skipSpaces(pos) : pos;\n lastLineEmpty = pos >= max;\n oldTShift = [state.tShift[startLine]];\n state.tShift[startLine] = pos - state.bMarks[startLine];\n terminatorRules = state.parser.ruler.getRules('blockquote');\n\n // Search the end of the block\n //\n // Block ends with either:\n // 1. an empty line outside:\n // ```\n // > test\n //\n // ```\n // 2. an empty line inside:\n // ```\n // >\n // test\n // ```\n // 3. another tag\n // ```\n // > test\n // - - -\n // ```\n for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n max = state.eMarks[nextLine];\n if (pos >= max) {\n // Case 1: line is not inside the blockquote, and this line is empty.\n break;\n }\n if (state.src.charCodeAt(pos++) === 0x3E /* > */) {\n // This line is inside the blockquote.\n\n // skip one optional space after '>'\n if (state.src.charCodeAt(pos) === 0x20) {\n pos++;\n }\n oldBMarks.push(state.bMarks[nextLine]);\n state.bMarks[nextLine] = pos;\n pos = pos < max ? state.skipSpaces(pos) : pos;\n lastLineEmpty = pos >= max;\n oldTShift.push(state.tShift[nextLine]);\n state.tShift[nextLine] = pos - state.bMarks[nextLine];\n continue;\n }\n\n // Case 2: line is not inside the blockquote, and the last line was empty.\n if (lastLineEmpty) {\n break;\n }\n\n // Case 3: another tag found.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) {\n break;\n }\n oldBMarks.push(state.bMarks[nextLine]);\n oldTShift.push(state.tShift[nextLine]);\n\n // A negative number means that this is a paragraph continuation;\n //\n // Any negative number will do the job here, but it's better for it\n // to be large enough to make any bugs obvious.\n state.tShift[nextLine] = -1337;\n }\n oldParentType = state.parentType;\n state.parentType = 'blockquote';\n state.tokens.push({\n type: 'blockquote_open',\n lines: lines = [startLine, 0],\n level: state.level++\n });\n state.parser.tokenize(state, startLine, nextLine);\n state.tokens.push({\n type: 'blockquote_close',\n level: --state.level\n });\n state.parentType = oldParentType;\n lines[1] = state.line;\n\n // Restore original tShift; this might not be necessary since the parser\n // has already been here, but just to make sure we can do that.\n for (i = 0; i < oldTShift.length; i++) {\n state.bMarks[i + startLine] = oldBMarks[i];\n state.tShift[i + startLine] = oldTShift[i];\n }\n state.blkIndent = oldIndent;\n return true;\n}\n\n// Horizontal rule\n\nfunction hr(state, startLine, endLine, silent) {\n var marker,\n cnt,\n ch,\n pos = state.bMarks[startLine],\n max = state.eMarks[startLine];\n pos += state.tShift[startLine];\n if (pos > max) {\n return false;\n }\n marker = state.src.charCodeAt(pos++);\n\n // Check hr marker\n if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x5F /* _ */) {\n return false;\n }\n\n // markers can be mixed with spaces, but there should be at least 3 one\n\n cnt = 1;\n while (pos < max) {\n ch = state.src.charCodeAt(pos++);\n if (ch !== marker && ch !== 0x20 /* space */) {\n return false;\n }\n if (ch === marker) {\n cnt++;\n }\n }\n if (cnt < 3) {\n return false;\n }\n if (silent) {\n return true;\n }\n state.line = startLine + 1;\n state.tokens.push({\n type: 'hr',\n lines: [startLine, state.line],\n level: state.level\n });\n return true;\n}\n\n// Lists\n\n// Search `[-+*][\\n ]`, returns next pos arter marker on success\n// or -1 on fail.\nfunction skipBulletListMarker(state, startLine) {\n var marker, pos, max;\n pos = state.bMarks[startLine] + state.tShift[startLine];\n max = state.eMarks[startLine];\n if (pos >= max) {\n return -1;\n }\n marker = state.src.charCodeAt(pos++);\n // Check bullet\n if (marker !== 0x2A /* * */ && marker !== 0x2D /* - */ && marker !== 0x2B /* + */) {\n return -1;\n }\n if (pos < max && state.src.charCodeAt(pos) !== 0x20) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n return pos;\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos arter marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker(state, startLine) {\n var ch,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n if (pos + 1 >= max) {\n return -1;\n }\n ch = state.src.charCodeAt(pos++);\n if (ch < 0x30 /* 0 */ || ch > 0x39 /* 9 */) {\n return -1;\n }\n for (;;) {\n // EOL -> fail\n if (pos >= max) {\n return -1;\n }\n ch = state.src.charCodeAt(pos++);\n if (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) {\n continue;\n }\n\n // found valid marker\n if (ch === 0x29 /* ) */ || ch === 0x2e /* . */) {\n break;\n }\n return -1;\n }\n if (pos < max && state.src.charCodeAt(pos) !== 0x20 /* space */) {\n // \" 1.test \" - is not a list item\n return -1;\n }\n return pos;\n}\nfunction markTightParagraphs(state, idx) {\n var i,\n l,\n level = state.level + 2;\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].tight = true;\n state.tokens[i].tight = true;\n i += 2;\n }\n }\n}\nfunction list(state, startLine, endLine, silent) {\n var nextLine,\n indent,\n oldTShift,\n oldIndent,\n oldTight,\n oldParentType,\n start,\n posAfterMarker,\n max,\n indentAfterMarker,\n markerValue,\n markerCharCode,\n isOrdered,\n contentStart,\n listTokIdx,\n prevEmptyEnd,\n listLines,\n itemLines,\n tight = true,\n terminatorRules,\n i,\n l,\n terminate;\n\n // Detect list type and position after marker\n if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) {\n isOrdered = true;\n } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) {\n isOrdered = false;\n } else {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n\n // We should terminate list on style change. Remember first one to compare.\n markerCharCode = state.src.charCodeAt(posAfterMarker - 1);\n\n // For validation mode we can terminate immediately\n if (silent) {\n return true;\n }\n\n // Start list\n listTokIdx = state.tokens.length;\n if (isOrdered) {\n start = state.bMarks[startLine] + state.tShift[startLine];\n markerValue = Number(state.src.substr(start, posAfterMarker - start - 1));\n state.tokens.push({\n type: 'ordered_list_open',\n order: markerValue,\n lines: listLines = [startLine, 0],\n level: state.level++\n });\n } else {\n state.tokens.push({\n type: 'bullet_list_open',\n lines: listLines = [startLine, 0],\n level: state.level++\n });\n }\n\n //\n // Iterate list items\n //\n\n nextLine = startLine;\n prevEmptyEnd = false;\n terminatorRules = state.parser.ruler.getRules('list');\n while (nextLine < endLine) {\n contentStart = state.skipSpaces(posAfterMarker);\n max = state.eMarks[nextLine];\n if (contentStart >= max) {\n // trimming space in \"- \\n 3\" case, indent is 1 here\n indentAfterMarker = 1;\n } else {\n indentAfterMarker = contentStart - posAfterMarker;\n }\n\n // If we have more than 4 spaces, the indent is 1\n // (the rest is just indented code block)\n if (indentAfterMarker > 4) {\n indentAfterMarker = 1;\n }\n\n // If indent is less than 1, assume that it's one, example:\n // \"-\\n test\"\n if (indentAfterMarker < 1) {\n indentAfterMarker = 1;\n }\n\n // \" - test\"\n // ^^^^^ - calculating total length of this thing\n indent = posAfterMarker - state.bMarks[nextLine] + indentAfterMarker;\n\n // Run subparser & write tokens\n state.tokens.push({\n type: 'list_item_open',\n lines: itemLines = [startLine, 0],\n level: state.level++\n });\n oldIndent = state.blkIndent;\n oldTight = state.tight;\n oldTShift = state.tShift[startLine];\n oldParentType = state.parentType;\n state.tShift[startLine] = contentStart - state.bMarks[startLine];\n state.blkIndent = indent;\n state.tight = true;\n state.parentType = 'list';\n state.parser.tokenize(state, startLine, endLine, true);\n\n // If any of list item is tight, mark list as tight\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n prevEmptyEnd = state.line - startLine > 1 && state.isEmpty(state.line - 1);\n state.blkIndent = oldIndent;\n state.tShift[startLine] = oldTShift;\n state.tight = oldTight;\n state.parentType = oldParentType;\n state.tokens.push({\n type: 'list_item_close',\n level: --state.level\n });\n nextLine = startLine = state.line;\n itemLines[1] = nextLine;\n contentStart = state.bMarks[startLine];\n if (nextLine >= endLine) {\n break;\n }\n if (state.isEmpty(nextLine)) {\n break;\n }\n\n //\n // Try to check if list is terminated or continued.\n //\n if (state.tShift[nextLine] < state.blkIndent) {\n break;\n }\n\n // fail if terminating block found\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) {\n break;\n }\n\n // fail if list has another type\n if (isOrdered) {\n posAfterMarker = skipOrderedListMarker(state, nextLine);\n if (posAfterMarker < 0) {\n break;\n }\n } else {\n posAfterMarker = skipBulletListMarker(state, nextLine);\n if (posAfterMarker < 0) {\n break;\n }\n }\n if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) {\n break;\n }\n }\n\n // Finilize list\n state.tokens.push({\n type: isOrdered ? 'ordered_list_close' : 'bullet_list_close',\n level: --state.level\n });\n listLines[1] = nextLine;\n state.line = nextLine;\n\n // mark paragraphs tight if needed\n if (tight) {\n markTightParagraphs(state, listTokIdx);\n }\n return true;\n}\n\n// Process footnote reference list\n\nfunction footnote(state, startLine, endLine, silent) {\n var oldBMark,\n oldTShift,\n oldParentType,\n pos,\n label,\n start = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n\n // line should be at least 5 chars - \"[^x]:\"\n if (start + 4 > max) {\n return false;\n }\n if (state.src.charCodeAt(start) !== 0x5B /* [ */) {\n return false;\n }\n if (state.src.charCodeAt(start + 1) !== 0x5E /* ^ */) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n for (pos = start + 2; pos < max; pos++) {\n if (state.src.charCodeAt(pos) === 0x20) {\n return false;\n }\n if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n break;\n }\n }\n if (pos === start + 2) {\n return false;\n } // no empty footnote labels\n if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) {\n return false;\n }\n if (silent) {\n return true;\n }\n pos++;\n if (!state.env.footnotes) {\n state.env.footnotes = {};\n }\n if (!state.env.footnotes.refs) {\n state.env.footnotes.refs = {};\n }\n label = state.src.slice(start + 2, pos - 2);\n state.env.footnotes.refs[':' + label] = -1;\n state.tokens.push({\n type: 'footnote_reference_open',\n label: label,\n level: state.level++\n });\n oldBMark = state.bMarks[startLine];\n oldTShift = state.tShift[startLine];\n oldParentType = state.parentType;\n state.tShift[startLine] = state.skipSpaces(pos) - pos;\n state.bMarks[startLine] = pos;\n state.blkIndent += 4;\n state.parentType = 'footnote';\n if (state.tShift[startLine] < state.blkIndent) {\n state.tShift[startLine] += state.blkIndent;\n state.bMarks[startLine] -= state.blkIndent;\n }\n state.parser.tokenize(state, startLine, endLine, true);\n state.parentType = oldParentType;\n state.blkIndent -= 4;\n state.tShift[startLine] = oldTShift;\n state.bMarks[startLine] = oldBMark;\n state.tokens.push({\n type: 'footnote_reference_close',\n level: --state.level\n });\n return true;\n}\n\n// heading (#, ##, ...)\n\nfunction heading(state, startLine, endLine, silent) {\n var ch,\n level,\n tmp,\n pos = state.bMarks[startLine] + state.tShift[startLine],\n max = state.eMarks[startLine];\n if (pos >= max) {\n return false;\n }\n ch = state.src.charCodeAt(pos);\n if (ch !== 0x23 /* # */ || pos >= max) {\n return false;\n }\n\n // count heading level\n level = 1;\n ch = state.src.charCodeAt(++pos);\n while (ch === 0x23 /* # */ && pos < max && level <= 6) {\n level++;\n ch = state.src.charCodeAt(++pos);\n }\n if (level > 6 || pos < max && ch !== 0x20 /* space */) {\n return false;\n }\n if (silent) {\n return true;\n }\n\n // Let's cut tails like ' ### ' from the end of string\n\n max = state.skipCharsBack(max, 0x20, pos); // space\n tmp = state.skipCharsBack(max, 0x23, pos); // #\n if (tmp > pos && state.src.charCodeAt(tmp - 1) === 0x20 /* space */) {\n max = tmp;\n }\n state.line = startLine + 1;\n state.tokens.push({\n type: 'heading_open',\n hLevel: level,\n lines: [startLine, state.line],\n level: state.level\n });\n\n // only if header is not empty\n if (pos < max) {\n state.tokens.push({\n type: 'inline',\n content: state.src.slice(pos, max).trim(),\n level: state.level + 1,\n lines: [startLine, state.line],\n children: []\n });\n }\n state.tokens.push({\n type: 'heading_close',\n hLevel: level,\n level: state.level\n });\n return true;\n}\n\n// lheading (---, ===)\n\nfunction lheading(state, startLine, endLine /*, silent*/) {\n var marker,\n pos,\n max,\n next = startLine + 1;\n if (next >= endLine) {\n return false;\n }\n if (state.tShift[next] < state.blkIndent) {\n return false;\n }\n\n // Scan next line\n\n if (state.tShift[next] - state.blkIndent > 3) {\n return false;\n }\n pos = state.bMarks[next] + state.tShift[next];\n max = state.eMarks[next];\n if (pos >= max) {\n return false;\n }\n marker = state.src.charCodeAt(pos);\n if (marker !== 0x2D /* - */ && marker !== 0x3D /* = */) {\n return false;\n }\n pos = state.skipChars(pos, marker);\n pos = state.skipSpaces(pos);\n if (pos < max) {\n return false;\n }\n pos = state.bMarks[startLine] + state.tShift[startLine];\n state.line = next + 1;\n state.tokens.push({\n type: 'heading_open',\n hLevel: marker === 0x3D /* = */ ? 1 : 2,\n lines: [startLine, state.line],\n level: state.level\n });\n state.tokens.push({\n type: 'inline',\n content: state.src.slice(pos, state.eMarks[startLine]).trim(),\n level: state.level + 1,\n lines: [startLine, state.line - 1],\n children: []\n });\n state.tokens.push({\n type: 'heading_close',\n hLevel: marker === 0x3D /* = */ ? 1 : 2,\n level: state.level\n });\n return true;\n}\n\n// List of valid html blocks names, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#html-blocks\n\nvar html_blocks = {};\n['article', 'aside', 'button', 'blockquote', 'body', 'canvas', 'caption', 'col', 'colgroup', 'dd', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'iframe', 'li', 'map', 'object', 'ol', 'output', 'p', 'pre', 'progress', 'script', 'section', 'style', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'tr', 'thead', 'ul', 'video'].forEach(function (name) {\n html_blocks[name] = true;\n});\n\n// HTML block\n\nvar HTML_TAG_OPEN_RE = /^<([a-zA-Z]{1,15})[\\s\\/>]/;\nvar HTML_TAG_CLOSE_RE = /^<\\/([a-zA-Z]{1,15})[\\s>]/;\nfunction isLetter$1(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n return lc >= 0x61 /* a */ && lc <= 0x7a /* z */;\n}\nfunction htmlblock(state, startLine, endLine, silent) {\n var ch,\n match,\n nextLine,\n pos = state.bMarks[startLine],\n max = state.eMarks[startLine],\n shift = state.tShift[startLine];\n pos += shift;\n if (!state.options.html) {\n return false;\n }\n if (shift > 3 || pos + 2 >= max) {\n return false;\n }\n if (state.src.charCodeAt(pos) !== 0x3C /* < */) {\n return false;\n }\n ch = state.src.charCodeAt(pos + 1);\n if (ch === 0x21 /* ! */ || ch === 0x3F /* ? */) {\n // Directive start / comment start / processing instruction start\n if (silent) {\n return true;\n }\n } else if (ch === 0x2F /* / */ || isLetter$1(ch)) {\n // Probably start or end of tag\n if (ch === 0x2F /* \\ */) {\n // closing tag\n match = state.src.slice(pos, max).match(HTML_TAG_CLOSE_RE);\n if (!match) {\n return false;\n }\n } else {\n // opening tag\n match = state.src.slice(pos, max).match(HTML_TAG_OPEN_RE);\n if (!match) {\n return false;\n }\n }\n // Make sure tag name is valid\n if (html_blocks[match[1].toLowerCase()] !== true) {\n return false;\n }\n if (silent) {\n return true;\n }\n } else {\n return false;\n }\n\n // If we are here - we detected HTML block.\n // Let's roll down till empty line (block end).\n nextLine = startLine + 1;\n while (nextLine < state.lineMax && !state.isEmpty(nextLine)) {\n nextLine++;\n }\n state.line = nextLine;\n state.tokens.push({\n type: 'htmlblock',\n level: state.level,\n lines: [startLine, state.line],\n content: state.getLines(startLine, nextLine, 0, true)\n });\n return true;\n}\n\n// GFM table, non-standard\n\nfunction getLine(state, line) {\n var pos = state.bMarks[line] + state.blkIndent,\n max = state.eMarks[line];\n return state.src.substr(pos, max - pos);\n}\nfunction table(state, startLine, endLine, silent) {\n var ch, lineText, pos, i, nextLine, rows, cell, aligns, t, tableLines, tbodyLines;\n\n // should have at least three lines\n if (startLine + 2 > endLine) {\n return false;\n }\n nextLine = startLine + 1;\n if (state.tShift[nextLine] < state.blkIndent) {\n return false;\n }\n\n // first character of the second line should be '|' or '-'\n\n pos = state.bMarks[nextLine] + state.tShift[nextLine];\n if (pos >= state.eMarks[nextLine]) {\n return false;\n }\n ch = state.src.charCodeAt(pos);\n if (ch !== 0x7C /* | */ && ch !== 0x2D /* - */ && ch !== 0x3A /* : */) {\n return false;\n }\n lineText = getLine(state, startLine + 1);\n if (!/^[-:| ]+$/.test(lineText)) {\n return false;\n }\n rows = lineText.split('|');\n if (rows <= 2) {\n return false;\n }\n aligns = [];\n for (i = 0; i < rows.length; i++) {\n t = rows[i].trim();\n if (!t) {\n // allow empty columns before and after table, but not in between columns;\n // e.g. allow ` |---| `, disallow ` ---||--- `\n if (i === 0 || i === rows.length - 1) {\n continue;\n } else {\n return false;\n }\n }\n if (!/^:?-+:?$/.test(t)) {\n return false;\n }\n if (t.charCodeAt(t.length - 1) === 0x3A /* : */) {\n aligns.push(t.charCodeAt(0) === 0x3A /* : */ ? 'center' : 'right');\n } else if (t.charCodeAt(0) === 0x3A /* : */) {\n aligns.push('left');\n } else {\n aligns.push('');\n }\n }\n lineText = getLine(state, startLine).trim();\n if (lineText.indexOf('|') === -1) {\n return false;\n }\n rows = lineText.replace(/^\\||\\|$/g, '').split('|');\n if (aligns.length !== rows.length) {\n return false;\n }\n if (silent) {\n return true;\n }\n state.tokens.push({\n type: 'table_open',\n lines: tableLines = [startLine, 0],\n level: state.level++\n });\n state.tokens.push({\n type: 'thead_open',\n lines: [startLine, startLine + 1],\n level: state.level++\n });\n state.tokens.push({\n type: 'tr_open',\n lines: [startLine, startLine + 1],\n level: state.level++\n });\n for (i = 0; i < rows.length; i++) {\n state.tokens.push({\n type: 'th_open',\n align: aligns[i],\n lines: [startLine, startLine + 1],\n level: state.level++\n });\n state.tokens.push({\n type: 'inline',\n content: rows[i].trim(),\n lines: [startLine, startLine + 1],\n level: state.level,\n children: []\n });\n state.tokens.push({\n type: 'th_close',\n level: --state.level\n });\n }\n state.tokens.push({\n type: 'tr_close',\n level: --state.level\n });\n state.tokens.push({\n type: 'thead_close',\n level: --state.level\n });\n state.tokens.push({\n type: 'tbody_open',\n lines: tbodyLines = [startLine + 2, 0],\n level: state.level++\n });\n for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n if (state.tShift[nextLine] < state.blkIndent) {\n break;\n }\n lineText = getLine(state, nextLine).trim();\n if (lineText.indexOf('|') === -1) {\n break;\n }\n rows = lineText.replace(/^\\||\\|$/g, '').split('|');\n state.tokens.push({\n type: 'tr_open',\n level: state.level++\n });\n for (i = 0; i < rows.length; i++) {\n state.tokens.push({\n type: 'td_open',\n align: aligns[i],\n level: state.level++\n });\n // 0x7c === '|'\n cell = rows[i].substring(rows[i].charCodeAt(0) === 0x7c ? 1 : 0, rows[i].charCodeAt(rows[i].length - 1) === 0x7c ? rows[i].length - 1 : rows[i].length).trim();\n state.tokens.push({\n type: 'inline',\n content: cell,\n level: state.level,\n children: []\n });\n state.tokens.push({\n type: 'td_close',\n level: --state.level\n });\n }\n state.tokens.push({\n type: 'tr_close',\n level: --state.level\n });\n }\n state.tokens.push({\n type: 'tbody_close',\n level: --state.level\n });\n state.tokens.push({\n type: 'table_close',\n level: --state.level\n });\n tableLines[1] = tbodyLines[1] = nextLine;\n state.line = nextLine;\n return true;\n}\n\n// Definition lists\n\n// Search `[:~][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipMarker(state, line) {\n var pos,\n marker,\n start = state.bMarks[line] + state.tShift[line],\n max = state.eMarks[line];\n if (start >= max) {\n return -1;\n }\n\n // Check bullet\n marker = state.src.charCodeAt(start++);\n if (marker !== 0x7E /* ~ */ && marker !== 0x3A /* : */) {\n return -1;\n }\n pos = state.skipSpaces(start);\n\n // require space after \":\"\n if (start === pos) {\n return -1;\n }\n\n // no empty definitions, e.g. \" : \"\n if (pos >= max) {\n return -1;\n }\n return pos;\n}\nfunction markTightParagraphs$1(state, idx) {\n var i,\n l,\n level = state.level + 2;\n for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n state.tokens[i + 2].tight = true;\n state.tokens[i].tight = true;\n i += 2;\n }\n }\n}\nfunction deflist(state, startLine, endLine, silent) {\n var contentStart, ddLine, dtLine, itemLines, listLines, listTokIdx, nextLine, oldIndent, oldDDIndent, oldParentType, oldTShift, oldTight, prevEmptyEnd, tight;\n if (silent) {\n // quirk: validation mode validates a dd block only, not a whole deflist\n if (state.ddIndent < 0) {\n return false;\n }\n return skipMarker(state, startLine) >= 0;\n }\n nextLine = startLine + 1;\n if (state.isEmpty(nextLine)) {\n if (++nextLine > endLine) {\n return false;\n }\n }\n if (state.tShift[nextLine] < state.blkIndent) {\n return false;\n }\n contentStart = skipMarker(state, nextLine);\n if (contentStart < 0) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n\n // Start list\n listTokIdx = state.tokens.length;\n state.tokens.push({\n type: 'dl_open',\n lines: listLines = [startLine, 0],\n level: state.level++\n });\n\n //\n // Iterate list items\n //\n\n dtLine = startLine;\n ddLine = nextLine;\n\n // One definition list can contain multiple DTs,\n // and one DT can be followed by multiple DDs.\n //\n // Thus, there is two loops here, and label is\n // needed to break out of the second one\n //\n /*eslint no-labels:0,block-scoped-var:0*/\n OUTER: for (;;) {\n tight = true;\n prevEmptyEnd = false;\n state.tokens.push({\n type: 'dt_open',\n lines: [dtLine, dtLine],\n level: state.level++\n });\n state.tokens.push({\n type: 'inline',\n content: state.getLines(dtLine, dtLine + 1, state.blkIndent, false).trim(),\n level: state.level + 1,\n lines: [dtLine, dtLine],\n children: []\n });\n state.tokens.push({\n type: 'dt_close',\n level: --state.level\n });\n for (;;) {\n state.tokens.push({\n type: 'dd_open',\n lines: itemLines = [nextLine, 0],\n level: state.level++\n });\n oldTight = state.tight;\n oldDDIndent = state.ddIndent;\n oldIndent = state.blkIndent;\n oldTShift = state.tShift[ddLine];\n oldParentType = state.parentType;\n state.blkIndent = state.ddIndent = state.tShift[ddLine] + 2;\n state.tShift[ddLine] = contentStart - state.bMarks[ddLine];\n state.tight = true;\n state.parentType = 'deflist';\n state.parser.tokenize(state, ddLine, endLine, true);\n\n // If any of list item is tight, mark list as tight\n if (!state.tight || prevEmptyEnd) {\n tight = false;\n }\n // Item become loose if finish with empty line,\n // but we should filter last element, because it means list finish\n prevEmptyEnd = state.line - ddLine > 1 && state.isEmpty(state.line - 1);\n state.tShift[ddLine] = oldTShift;\n state.tight = oldTight;\n state.parentType = oldParentType;\n state.blkIndent = oldIndent;\n state.ddIndent = oldDDIndent;\n state.tokens.push({\n type: 'dd_close',\n level: --state.level\n });\n itemLines[1] = nextLine = state.line;\n if (nextLine >= endLine) {\n break OUTER;\n }\n if (state.tShift[nextLine] < state.blkIndent) {\n break OUTER;\n }\n contentStart = skipMarker(state, nextLine);\n if (contentStart < 0) {\n break;\n }\n ddLine = nextLine;\n\n // go to the next loop iteration:\n // insert DD tag and repeat checking\n }\n if (nextLine >= endLine) {\n break;\n }\n dtLine = nextLine;\n if (state.isEmpty(dtLine)) {\n break;\n }\n if (state.tShift[dtLine] < state.blkIndent) {\n break;\n }\n ddLine = dtLine + 1;\n if (ddLine >= endLine) {\n break;\n }\n if (state.isEmpty(ddLine)) {\n ddLine++;\n }\n if (ddLine >= endLine) {\n break;\n }\n if (state.tShift[ddLine] < state.blkIndent) {\n break;\n }\n contentStart = skipMarker(state, ddLine);\n if (contentStart < 0) {\n break;\n }\n\n // go to the next loop iteration:\n // insert DT and DD tags and repeat checking\n }\n\n // Finilize list\n state.tokens.push({\n type: 'dl_close',\n level: --state.level\n });\n listLines[1] = nextLine;\n state.line = nextLine;\n\n // mark paragraphs tight if needed\n if (tight) {\n markTightParagraphs$1(state, listTokIdx);\n }\n return true;\n}\n\n// Paragraph\n\nfunction paragraph(state, startLine /*, endLine*/) {\n var endLine,\n content,\n terminate,\n i,\n l,\n nextLine = startLine + 1,\n terminatorRules;\n endLine = state.lineMax;\n\n // jump line-by-line until empty one or EOF\n if (nextLine < endLine && !state.isEmpty(nextLine)) {\n terminatorRules = state.parser.ruler.getRules('paragraph');\n for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n // this would be a code block normally, but after paragraph\n // it's considered a lazy continuation regardless of what's there\n if (state.tShift[nextLine] - state.blkIndent > 3) {\n continue;\n }\n\n // Some tags can terminate paragraph without empty line.\n terminate = false;\n for (i = 0, l = terminatorRules.length; i < l; i++) {\n if (terminatorRules[i](state, nextLine, endLine, true)) {\n terminate = true;\n break;\n }\n }\n if (terminate) {\n break;\n }\n }\n }\n content = state.getLines(startLine, nextLine, state.blkIndent, false).trim();\n state.line = nextLine;\n if (content.length) {\n state.tokens.push({\n type: 'paragraph_open',\n tight: false,\n lines: [startLine, state.line],\n level: state.level\n });\n state.tokens.push({\n type: 'inline',\n content: content,\n level: state.level + 1,\n lines: [startLine, state.line],\n children: []\n });\n state.tokens.push({\n type: 'paragraph_close',\n tight: false,\n level: state.level\n });\n }\n return true;\n}\n\n/**\n * Parser rules\n */\n\nvar _rules$1 = [['code', code], ['fences', fences, ['paragraph', 'blockquote', 'list']], ['blockquote', blockquote, ['paragraph', 'blockquote', 'list']], ['hr', hr, ['paragraph', 'blockquote', 'list']], ['list', list, ['paragraph', 'blockquote']], ['footnote', footnote, ['paragraph']], ['heading', heading, ['paragraph', 'blockquote']], ['lheading', lheading], ['htmlblock', htmlblock, ['paragraph', 'blockquote']], ['table', table, ['paragraph']], ['deflist', deflist, ['paragraph']], ['paragraph', paragraph]];\n\n/**\n * Block Parser class\n *\n * @api private\n */\n\nfunction ParserBlock() {\n this.ruler = new Ruler();\n for (var i = 0; i < _rules$1.length; i++) {\n this.ruler.push(_rules$1[i][0], _rules$1[i][1], {\n alt: (_rules$1[i][2] || []).slice()\n });\n }\n}\n\n/**\n * Generate tokens for the given input range.\n *\n * @param {Object} `state` Has properties like `src`, `parser`, `options` etc\n * @param {Number} `startLine`\n * @param {Number} `endLine`\n * @api private\n */\n\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n var rules = this.ruler.getRules('');\n var len = rules.length;\n var line = startLine;\n var hasEmptyLines = false;\n var ok, i;\n while (line < endLine) {\n state.line = line = state.skipEmptyLines(line);\n if (line >= endLine) {\n break;\n }\n\n // Termination condition for nested calls.\n // Nested calls currently used for blockquotes & lists\n if (state.tShift[line] < state.blkIndent) {\n break;\n }\n\n // Try all possible rules.\n // On success, rule should:\n //\n // - update `state.line`\n // - update `state.tokens`\n // - return true\n\n for (i = 0; i < len; i++) {\n ok = rules[i](state, line, endLine, false);\n if (ok) {\n break;\n }\n }\n\n // set state.tight iff we had an empty line before current tag\n // i.e. latest empty line should not count\n state.tight = !hasEmptyLines;\n\n // paragraph might \"eat\" one newline after it in nested lists\n if (state.isEmpty(state.line - 1)) {\n hasEmptyLines = true;\n }\n line = state.line;\n if (line < endLine && state.isEmpty(line)) {\n hasEmptyLines = true;\n line++;\n\n // two empty lines should stop the parser in list mode\n if (line < endLine && state.parentType === 'list' && state.isEmpty(line)) {\n break;\n }\n state.line = line;\n }\n }\n};\nvar TABS_SCAN_RE = /[\\n\\t]/g;\nvar NEWLINES_RE = /\\r[\\n\\u0085]|[\\u2424\\u2028\\u0085]/g;\nvar SPACES_RE = /\\u00a0/g;\n\n/**\n * Tokenize the given `str`.\n *\n * @param {String} `str` Source string\n * @param {Object} `options`\n * @param {Object} `env`\n * @param {Array} `outTokens`\n * @api private\n */\n\nParserBlock.prototype.parse = function (str, options, env, outTokens) {\n var state,\n lineStart = 0,\n lastTabPos = 0;\n if (!str) {\n return [];\n }\n\n // Normalize spaces\n str = str.replace(SPACES_RE, ' ');\n\n // Normalize newlines\n str = str.replace(NEWLINES_RE, '\\n');\n\n // Replace tabs with proper number of spaces (1..4)\n if (str.indexOf('\\t') >= 0) {\n str = str.replace(TABS_SCAN_RE, function (match, offset) {\n var result;\n if (str.charCodeAt(offset) === 0x0A) {\n lineStart = offset + 1;\n lastTabPos = 0;\n return match;\n }\n result = ' '.slice((offset - lineStart - lastTabPos) % 4);\n lastTabPos = offset - lineStart + 1;\n return result;\n });\n }\n state = new StateBlock(str, this, options, env, outTokens);\n this.tokenize(state, state.line, state.lineMax);\n};\n\n// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\nfunction isTerminatorChar(ch) {\n switch (ch) {\n case 0x0A /* \\n */:\n case 0x5C /* \\ */:\n case 0x60 /* ` */:\n case 0x2A /* * */:\n case 0x5F /* _ */:\n case 0x5E /* ^ */:\n case 0x5B /* [ */:\n case 0x5D /* ] */:\n case 0x21 /* ! */:\n case 0x26 /* & */:\n case 0x3C /* < */:\n case 0x3E /* > */:\n case 0x7B /* { */:\n case 0x7D /* } */:\n case 0x24 /* $ */:\n case 0x25 /* % */:\n case 0x40 /* @ */:\n case 0x7E /* ~ */:\n case 0x2B /* + */:\n case 0x3D /* = */:\n case 0x3A /* : */:\n return true;\n default:\n return false;\n }\n}\nfunction text(state, silent) {\n var pos = state.pos;\n while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n pos++;\n }\n if (pos === state.pos) {\n return false;\n }\n if (!silent) {\n state.pending += state.src.slice(state.pos, pos);\n }\n state.pos = pos;\n return true;\n}\n\n// Proceess '\\n'\n\nfunction newline(state, silent) {\n var pmax,\n max,\n pos = state.pos;\n if (state.src.charCodeAt(pos) !== 0x0A /* \\n */) {\n return false;\n }\n pmax = state.pending.length - 1;\n max = state.posMax;\n\n // ' \\n' -> hardbreak\n // Lookup in pending chars is bad practice! Don't copy to other rules!\n // Pending string is stored in concat mode, indexed lookups will cause\n // convertion to flat mode.\n if (!silent) {\n if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n // Strip out all trailing spaces on this line.\n for (var i = pmax - 2; i >= 0; i--) {\n if (state.pending.charCodeAt(i) !== 0x20) {\n state.pending = state.pending.substring(0, i + 1);\n break;\n }\n }\n state.push({\n type: 'hardbreak',\n level: state.level\n });\n } else {\n state.pending = state.pending.slice(0, -1);\n state.push({\n type: 'softbreak',\n level: state.level\n });\n }\n } else {\n state.push({\n type: 'softbreak',\n level: state.level\n });\n }\n }\n pos++;\n\n // skip heading spaces for next line\n while (pos < max && state.src.charCodeAt(pos) === 0x20) {\n pos++;\n }\n state.pos = pos;\n return true;\n}\n\n// Proceess escaped chars and hardbreaks\n\nvar ESCAPED = [];\nfor (var i = 0; i < 256; i++) {\n ESCAPED.push(0);\n}\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'.split('').forEach(function (ch) {\n ESCAPED[ch.charCodeAt(0)] = 1;\n});\nfunction escape(state, silent) {\n var ch,\n pos = state.pos,\n max = state.posMax;\n if (state.src.charCodeAt(pos) !== 0x5C /* \\ */) {\n return false;\n }\n pos++;\n if (pos < max) {\n ch = state.src.charCodeAt(pos);\n if (ch < 256 && ESCAPED[ch] !== 0) {\n if (!silent) {\n state.pending += state.src[pos];\n }\n state.pos += 2;\n return true;\n }\n if (ch === 0x0A) {\n if (!silent) {\n state.push({\n type: 'hardbreak',\n level: state.level\n });\n }\n pos++;\n // skip leading whitespaces from next line\n while (pos < max && state.src.charCodeAt(pos) === 0x20) {\n pos++;\n }\n state.pos = pos;\n return true;\n }\n }\n if (!silent) {\n state.pending += '\\\\';\n }\n state.pos++;\n return true;\n}\n\n// Parse backticks\n\nfunction backticks(state, silent) {\n var start,\n max,\n marker,\n matchStart,\n matchEnd,\n pos = state.pos,\n ch = state.src.charCodeAt(pos);\n if (ch !== 0x60 /* ` */) {\n return false;\n }\n start = pos;\n pos++;\n max = state.posMax;\n while (pos < max && state.src.charCodeAt(pos) === 0x60 /* ` */) {\n pos++;\n }\n marker = state.src.slice(start, pos);\n matchStart = matchEnd = pos;\n while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n matchEnd = matchStart + 1;\n while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60 /* ` */) {\n matchEnd++;\n }\n if (matchEnd - matchStart === marker.length) {\n if (!silent) {\n state.push({\n type: 'code',\n content: state.src.slice(pos, matchStart).replace(/[ \\n]+/g, ' ').trim(),\n block: false,\n level: state.level\n });\n }\n state.pos = matchEnd;\n return true;\n }\n }\n if (!silent) {\n state.pending += marker;\n }\n state.pos += marker.length;\n return true;\n}\n\n// Process ~~deleted text~~\n\nfunction del(state, silent) {\n var found,\n pos,\n stack,\n max = state.posMax,\n start = state.pos,\n lastChar,\n nextChar;\n if (state.src.charCodeAt(start) !== 0x7E /* ~ */) {\n return false;\n }\n if (silent) {\n return false;\n } // don't run any pairs in validation mode\n if (start + 4 >= max) {\n return false;\n }\n if (state.src.charCodeAt(start + 1) !== 0x7E /* ~ */) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n nextChar = state.src.charCodeAt(start + 2);\n if (lastChar === 0x7E /* ~ */) {\n return false;\n }\n if (nextChar === 0x7E /* ~ */) {\n return false;\n }\n if (nextChar === 0x20 || nextChar === 0x0A) {\n return false;\n }\n pos = start + 2;\n while (pos < max && state.src.charCodeAt(pos) === 0x7E /* ~ */) {\n pos++;\n }\n if (pos > start + 3) {\n // sequence of 4+ markers taking as literal, same as in a emphasis\n state.pos += pos - start;\n if (!silent) {\n state.pending += state.src.slice(start, pos);\n }\n return true;\n }\n state.pos = start + 2;\n stack = 1;\n while (state.pos + 1 < max) {\n if (state.src.charCodeAt(state.pos) === 0x7E /* ~ */) {\n if (state.src.charCodeAt(state.pos + 1) === 0x7E /* ~ */) {\n lastChar = state.src.charCodeAt(state.pos - 1);\n nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n if (nextChar !== 0x7E /* ~ */ && lastChar !== 0x7E /* ~ */) {\n if (lastChar !== 0x20 && lastChar !== 0x0A) {\n // closing '~~'\n stack--;\n } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n // opening '~~'\n stack++;\n } // else {\n // // standalone ' ~~ ' indented with spaces\n // }\n if (stack <= 0) {\n found = true;\n break;\n }\n }\n }\n }\n state.parser.skipToken(state);\n }\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 2;\n if (!silent) {\n state.push({\n type: 'del_open',\n level: state.level++\n });\n state.parser.tokenize(state);\n state.push({\n type: 'del_close',\n level: --state.level\n });\n }\n state.pos = state.posMax + 2;\n state.posMax = max;\n return true;\n}\n\n// Process ++inserted text++\n\nfunction ins(state, silent) {\n var found,\n pos,\n stack,\n max = state.posMax,\n start = state.pos,\n lastChar,\n nextChar;\n if (state.src.charCodeAt(start) !== 0x2B /* + */) {\n return false;\n }\n if (silent) {\n return false;\n } // don't run any pairs in validation mode\n if (start + 4 >= max) {\n return false;\n }\n if (state.src.charCodeAt(start + 1) !== 0x2B /* + */) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n nextChar = state.src.charCodeAt(start + 2);\n if (lastChar === 0x2B /* + */) {\n return false;\n }\n if (nextChar === 0x2B /* + */) {\n return false;\n }\n if (nextChar === 0x20 || nextChar === 0x0A) {\n return false;\n }\n pos = start + 2;\n while (pos < max && state.src.charCodeAt(pos) === 0x2B /* + */) {\n pos++;\n }\n if (pos !== start + 2) {\n // sequence of 3+ markers taking as literal, same as in a emphasis\n state.pos += pos - start;\n if (!silent) {\n state.pending += state.src.slice(start, pos);\n }\n return true;\n }\n state.pos = start + 2;\n stack = 1;\n while (state.pos + 1 < max) {\n if (state.src.charCodeAt(state.pos) === 0x2B /* + */) {\n if (state.src.charCodeAt(state.pos + 1) === 0x2B /* + */) {\n lastChar = state.src.charCodeAt(state.pos - 1);\n nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n if (nextChar !== 0x2B /* + */ && lastChar !== 0x2B /* + */) {\n if (lastChar !== 0x20 && lastChar !== 0x0A) {\n // closing '++'\n stack--;\n } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n // opening '++'\n stack++;\n } // else {\n // // standalone ' ++ ' indented with spaces\n // }\n if (stack <= 0) {\n found = true;\n break;\n }\n }\n }\n }\n state.parser.skipToken(state);\n }\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 2;\n if (!silent) {\n state.push({\n type: 'ins_open',\n level: state.level++\n });\n state.parser.tokenize(state);\n state.push({\n type: 'ins_close',\n level: --state.level\n });\n }\n state.pos = state.posMax + 2;\n state.posMax = max;\n return true;\n}\n\n// Process ==highlighted text==\n\nfunction mark(state, silent) {\n var found,\n pos,\n stack,\n max = state.posMax,\n start = state.pos,\n lastChar,\n nextChar;\n if (state.src.charCodeAt(start) !== 0x3D /* = */) {\n return false;\n }\n if (silent) {\n return false;\n } // don't run any pairs in validation mode\n if (start + 4 >= max) {\n return false;\n }\n if (state.src.charCodeAt(start + 1) !== 0x3D /* = */) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n nextChar = state.src.charCodeAt(start + 2);\n if (lastChar === 0x3D /* = */) {\n return false;\n }\n if (nextChar === 0x3D /* = */) {\n return false;\n }\n if (nextChar === 0x20 || nextChar === 0x0A) {\n return false;\n }\n pos = start + 2;\n while (pos < max && state.src.charCodeAt(pos) === 0x3D /* = */) {\n pos++;\n }\n if (pos !== start + 2) {\n // sequence of 3+ markers taking as literal, same as in a emphasis\n state.pos += pos - start;\n if (!silent) {\n state.pending += state.src.slice(start, pos);\n }\n return true;\n }\n state.pos = start + 2;\n stack = 1;\n while (state.pos + 1 < max) {\n if (state.src.charCodeAt(state.pos) === 0x3D /* = */) {\n if (state.src.charCodeAt(state.pos + 1) === 0x3D /* = */) {\n lastChar = state.src.charCodeAt(state.pos - 1);\n nextChar = state.pos + 2 < max ? state.src.charCodeAt(state.pos + 2) : -1;\n if (nextChar !== 0x3D /* = */ && lastChar !== 0x3D /* = */) {\n if (lastChar !== 0x20 && lastChar !== 0x0A) {\n // closing '=='\n stack--;\n } else if (nextChar !== 0x20 && nextChar !== 0x0A) {\n // opening '=='\n stack++;\n } // else {\n // // standalone ' == ' indented with spaces\n // }\n if (stack <= 0) {\n found = true;\n break;\n }\n }\n }\n }\n state.parser.skipToken(state);\n }\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 2;\n if (!silent) {\n state.push({\n type: 'mark_open',\n level: state.level++\n });\n state.parser.tokenize(state);\n state.push({\n type: 'mark_close',\n level: --state.level\n });\n }\n state.pos = state.posMax + 2;\n state.posMax = max;\n return true;\n}\n\n// Process *this* and _that_\n\nfunction isAlphaNum(code) {\n return code >= 0x30 /* 0 */ && code <= 0x39 /* 9 */ || code >= 0x41 /* A */ && code <= 0x5A /* Z */ || code >= 0x61 /* a */ && code <= 0x7A /* z */;\n}\n\n// parse sequence of emphasis markers,\n// \"start\" should point at a valid marker\nfunction scanDelims(state, start) {\n var pos = start,\n lastChar,\n nextChar,\n count,\n can_open = true,\n can_close = true,\n max = state.posMax,\n marker = state.src.charCodeAt(start);\n lastChar = start > 0 ? state.src.charCodeAt(start - 1) : -1;\n while (pos < max && state.src.charCodeAt(pos) === marker) {\n pos++;\n }\n if (pos >= max) {\n can_open = false;\n }\n count = pos - start;\n if (count >= 4) {\n // sequence of four or more unescaped markers can't start/end an emphasis\n can_open = can_close = false;\n } else {\n nextChar = pos < max ? state.src.charCodeAt(pos) : -1;\n\n // check whitespace conditions\n if (nextChar === 0x20 || nextChar === 0x0A) {\n can_open = false;\n }\n if (lastChar === 0x20 || lastChar === 0x0A) {\n can_close = false;\n }\n if (marker === 0x5F /* _ */) {\n // check if we aren't inside the word\n if (isAlphaNum(lastChar)) {\n can_open = false;\n }\n if (isAlphaNum(nextChar)) {\n can_close = false;\n }\n }\n }\n return {\n can_open: can_open,\n can_close: can_close,\n delims: count\n };\n}\nfunction emphasis(state, silent) {\n var startCount,\n count,\n found,\n oldCount,\n newCount,\n stack,\n res,\n max = state.posMax,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) {\n return false;\n }\n if (silent) {\n return false;\n } // don't run any pairs in validation mode\n\n res = scanDelims(state, start);\n startCount = res.delims;\n if (!res.can_open) {\n state.pos += startCount;\n if (!silent) {\n state.pending += state.src.slice(start, state.pos);\n }\n return true;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n state.pos = start + startCount;\n stack = [startCount];\n while (state.pos < max) {\n if (state.src.charCodeAt(state.pos) === marker) {\n res = scanDelims(state, state.pos);\n count = res.delims;\n if (res.can_close) {\n oldCount = stack.pop();\n newCount = count;\n while (oldCount !== newCount) {\n if (newCount < oldCount) {\n stack.push(oldCount - newCount);\n break;\n }\n\n // assert(newCount > oldCount)\n newCount -= oldCount;\n if (stack.length === 0) {\n break;\n }\n state.pos += oldCount;\n oldCount = stack.pop();\n }\n if (stack.length === 0) {\n startCount = oldCount;\n found = true;\n break;\n }\n state.pos += count;\n continue;\n }\n if (res.can_open) {\n stack.push(count);\n }\n state.pos += count;\n continue;\n }\n state.parser.skipToken(state);\n }\n if (!found) {\n // parser failed to find ending tag, so it's not valid emphasis\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + startCount;\n if (!silent) {\n if (startCount === 2 || startCount === 3) {\n state.push({\n type: 'strong_open',\n level: state.level++\n });\n }\n if (startCount === 1 || startCount === 3) {\n state.push({\n type: 'em_open',\n level: state.level++\n });\n }\n state.parser.tokenize(state);\n if (startCount === 1 || startCount === 3) {\n state.push({\n type: 'em_close',\n level: --state.level\n });\n }\n if (startCount === 2 || startCount === 3) {\n state.push({\n type: 'strong_close',\n level: --state.level\n });\n }\n }\n state.pos = state.posMax + startCount;\n state.posMax = max;\n return true;\n}\n\n// Process ~subscript~\n\n// same as UNESCAPE_MD_RE plus a space\nvar UNESCAPE_RE = /\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\nfunction sub(state, silent) {\n var found,\n content,\n max = state.posMax,\n start = state.pos;\n if (state.src.charCodeAt(start) !== 0x7E /* ~ */) {\n return false;\n }\n if (silent) {\n return false;\n } // don't run any pairs in validation mode\n if (start + 2 >= max) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n state.pos = start + 1;\n while (state.pos < max) {\n if (state.src.charCodeAt(state.pos) === 0x7E /* ~ */) {\n found = true;\n break;\n }\n state.parser.skipToken(state);\n }\n if (!found || start + 1 === state.pos) {\n state.pos = start;\n return false;\n }\n content = state.src.slice(start + 1, state.pos);\n\n // don't allow unescaped spaces/newlines inside\n if (content.match(/(^|[^\\\\])(\\\\\\\\)*\\s/)) {\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 1;\n if (!silent) {\n state.push({\n type: 'sub',\n level: state.level,\n content: content.replace(UNESCAPE_RE, '$1')\n });\n }\n state.pos = state.posMax + 1;\n state.posMax = max;\n return true;\n}\n\n// Process ^superscript^\n\n// same as UNESCAPE_MD_RE plus a space\nvar UNESCAPE_RE$1 = /\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\nfunction sup(state, silent) {\n var found,\n content,\n max = state.posMax,\n start = state.pos;\n if (state.src.charCodeAt(start) !== 0x5E /* ^ */) {\n return false;\n }\n if (silent) {\n return false;\n } // don't run any pairs in validation mode\n if (start + 2 >= max) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n state.pos = start + 1;\n while (state.pos < max) {\n if (state.src.charCodeAt(state.pos) === 0x5E /* ^ */) {\n found = true;\n break;\n }\n state.parser.skipToken(state);\n }\n if (!found || start + 1 === state.pos) {\n state.pos = start;\n return false;\n }\n content = state.src.slice(start + 1, state.pos);\n\n // don't allow unescaped spaces/newlines inside\n if (content.match(/(^|[^\\\\])(\\\\\\\\)*\\s/)) {\n state.pos = start;\n return false;\n }\n\n // found!\n state.posMax = state.pos;\n state.pos = start + 1;\n if (!silent) {\n state.push({\n type: 'sup',\n level: state.level,\n content: content.replace(UNESCAPE_RE$1, '$1')\n });\n }\n state.pos = state.posMax + 1;\n state.posMax = max;\n return true;\n}\n\n// Process [links]( \"stuff\")\n\nfunction links(state, silent) {\n var labelStart,\n labelEnd,\n label,\n href,\n title,\n pos,\n ref,\n code,\n isImage = false,\n oldPos = state.pos,\n max = state.posMax,\n start = state.pos,\n marker = state.src.charCodeAt(start);\n if (marker === 0x21 /* ! */) {\n isImage = true;\n marker = state.src.charCodeAt(++start);\n }\n if (marker !== 0x5B /* [ */) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n labelStart = start + 1;\n labelEnd = parseLinkLabel(state, start);\n\n // parser failed to find ']', so it's not a valid link\n if (labelEnd < 0) {\n return false;\n }\n pos = labelEnd + 1;\n if (pos < max && state.src.charCodeAt(pos) === 0x28 /* ( */) {\n //\n // Inline link\n //\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n pos++;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) {\n break;\n }\n }\n if (pos >= max) {\n return false;\n }\n\n // [link]( \"title\" )\n // ^^^^^^ parsing link destination\n start = pos;\n if (parseLinkDestination(state, pos)) {\n href = state.linkContent;\n pos = state.pos;\n } else {\n href = '';\n }\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n start = pos;\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) {\n break;\n }\n }\n\n // [link]( \"title\" )\n // ^^^^^^^ parsing link title\n if (pos < max && start !== pos && parseLinkTitle(state, pos)) {\n title = state.linkContent;\n pos = state.pos;\n\n // [link]( \"title\" )\n // ^^ skipping these spaces\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) {\n break;\n }\n }\n } else {\n title = '';\n }\n if (pos >= max || state.src.charCodeAt(pos) !== 0x29 /* ) */) {\n state.pos = oldPos;\n return false;\n }\n pos++;\n } else {\n //\n // Link reference\n //\n\n // do not allow nested reference links\n if (state.linkLevel > 0) {\n return false;\n }\n\n // [foo] [bar]\n // ^^ optional whitespace (can include newlines)\n for (; pos < max; pos++) {\n code = state.src.charCodeAt(pos);\n if (code !== 0x20 && code !== 0x0A) {\n break;\n }\n }\n if (pos < max && state.src.charCodeAt(pos) === 0x5B /* [ */) {\n start = pos + 1;\n pos = parseLinkLabel(state, pos);\n if (pos >= 0) {\n label = state.src.slice(start, pos++);\n } else {\n pos = start - 1;\n }\n }\n\n // covers label === '' and label === undefined\n // (collapsed reference link and shortcut reference link respectively)\n if (!label) {\n if (typeof label === 'undefined') {\n pos = labelEnd + 1;\n }\n label = state.src.slice(labelStart, labelEnd);\n }\n ref = state.env.references[normalizeReference(label)];\n if (!ref) {\n state.pos = oldPos;\n return false;\n }\n href = ref.href;\n title = ref.title;\n }\n\n //\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n state.pos = labelStart;\n state.posMax = labelEnd;\n if (isImage) {\n state.push({\n type: 'image',\n src: href,\n title: title,\n alt: state.src.substr(labelStart, labelEnd - labelStart),\n level: state.level\n });\n } else {\n state.push({\n type: 'link_open',\n href: href,\n title: title,\n level: state.level++\n });\n state.linkLevel++;\n state.parser.tokenize(state);\n state.linkLevel--;\n state.push({\n type: 'link_close',\n level: --state.level\n });\n }\n }\n state.pos = pos;\n state.posMax = max;\n return true;\n}\n\n// Process inline footnotes (^[...])\n\nfunction footnote_inline(state, silent) {\n var labelStart,\n labelEnd,\n footnoteId,\n oldLength,\n max = state.posMax,\n start = state.pos;\n if (start + 2 >= max) {\n return false;\n }\n if (state.src.charCodeAt(start) !== 0x5E /* ^ */) {\n return false;\n }\n if (state.src.charCodeAt(start + 1) !== 0x5B /* [ */) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n labelStart = start + 2;\n labelEnd = parseLinkLabel(state, start + 1);\n\n // parser failed to find ']', so it's not a valid note\n if (labelEnd < 0) {\n return false;\n }\n\n // We found the end of the link, and know for a fact it's a valid link;\n // so all that's left to do is to call tokenizer.\n //\n if (!silent) {\n if (!state.env.footnotes) {\n state.env.footnotes = {};\n }\n if (!state.env.footnotes.list) {\n state.env.footnotes.list = [];\n }\n footnoteId = state.env.footnotes.list.length;\n state.pos = labelStart;\n state.posMax = labelEnd;\n state.push({\n type: 'footnote_ref',\n id: footnoteId,\n level: state.level\n });\n state.linkLevel++;\n oldLength = state.tokens.length;\n state.parser.tokenize(state);\n state.env.footnotes.list[footnoteId] = {\n tokens: state.tokens.splice(oldLength)\n };\n state.linkLevel--;\n }\n state.pos = labelEnd + 1;\n state.posMax = max;\n return true;\n}\n\n// Process footnote references ([^...])\n\nfunction footnote_ref(state, silent) {\n var label,\n pos,\n footnoteId,\n footnoteSubId,\n max = state.posMax,\n start = state.pos;\n\n // should be at least 4 chars - \"[^x]\"\n if (start + 3 > max) {\n return false;\n }\n if (!state.env.footnotes || !state.env.footnotes.refs) {\n return false;\n }\n if (state.src.charCodeAt(start) !== 0x5B /* [ */) {\n return false;\n }\n if (state.src.charCodeAt(start + 1) !== 0x5E /* ^ */) {\n return false;\n }\n if (state.level >= state.options.maxNesting) {\n return false;\n }\n for (pos = start + 2; pos < max; pos++) {\n if (state.src.charCodeAt(pos) === 0x20) {\n return false;\n }\n if (state.src.charCodeAt(pos) === 0x0A) {\n return false;\n }\n if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n break;\n }\n }\n if (pos === start + 2) {\n return false;\n } // no empty footnote labels\n if (pos >= max) {\n return false;\n }\n pos++;\n label = state.src.slice(start + 2, pos - 1);\n if (typeof state.env.footnotes.refs[':' + label] === 'undefined') {\n return false;\n }\n if (!silent) {\n if (!state.env.footnotes.list) {\n state.env.footnotes.list = [];\n }\n if (state.env.footnotes.refs[':' + label] < 0) {\n footnoteId = state.env.footnotes.list.length;\n state.env.footnotes.list[footnoteId] = {\n label: label,\n count: 0\n };\n state.env.footnotes.refs[':' + label] = footnoteId;\n } else {\n footnoteId = state.env.footnotes.refs[':' + label];\n }\n footnoteSubId = state.env.footnotes.list[footnoteId].count;\n state.env.footnotes.list[footnoteId].count++;\n state.push({\n type: 'footnote_ref',\n id: footnoteId,\n subId: footnoteSubId,\n level: state.level\n });\n }\n state.pos = pos;\n state.posMax = max;\n return true;\n}\n\n// List of valid url schemas, accorting to commonmark spec\n// http://jgm.github.io/CommonMark/spec.html#autolinks\n\nvar url_schemas = ['coap', 'doi', 'javascript', 'aaa', 'aaas', 'about', 'acap', 'cap', 'cid', 'crid', 'data', 'dav', 'dict', 'dns', 'file', 'ftp', 'geo', 'go', 'gopher', 'h323', 'http', 'https', 'iax', 'icap', 'im', 'imap', 'info', 'ipp', 'iris', 'iris.beep', 'iris.xpc', 'iris.xpcs', 'iris.lwz', 'ldap', 'mailto', 'mid', 'msrp', 'msrps', 'mtqp', 'mupdate', 'news', 'nfs', 'ni', 'nih', 'nntp', 'opaquelocktoken', 'pop', 'pres', 'rtsp', 'service', 'session', 'shttp', 'sieve', 'sip', 'sips', 'sms', 'snmp', 'soap.beep', 'soap.beeps', 'tag', 'tel', 'telnet', 'tftp', 'thismessage', 'tn3270', 'tip', 'tv', 'urn', 'vemmi', 'ws', 'wss', 'xcon', 'xcon-userid', 'xmlrpc.beep', 'xmlrpc.beeps', 'xmpp', 'z39.50r', 'z39.50s', 'adiumxtra', 'afp', 'afs', 'aim', 'apt', 'attachment', 'aw', 'beshare', 'bitcoin', 'bolo', 'callto', 'chrome', 'chrome-extension', 'com-eventbrite-attendee', 'content', 'cvs', 'dlna-playsingle', 'dlna-playcontainer', 'dtn', 'dvb', 'ed2k', 'facetime', 'feed', 'finger', 'fish', 'gg', 'git', 'gizmoproject', 'gtalk', 'hcp', 'icon', 'ipn', 'irc', 'irc6', 'ircs', 'itms', 'jar', 'jms', 'keyparc', 'lastfm', 'ldaps', 'magnet', 'maps', 'market', 'message', 'mms', 'ms-help', 'msnim', 'mumble', 'mvn', 'notes', 'oid', 'palm', 'paparazzi', 'platform', 'proxy', 'psyc', 'query', 'res', 'resource', 'rmi', 'rsync', 'rtmp', 'secondlife', 'sftp', 'sgn', 'skype', 'smb', 'soldat', 'spotify', 'ssh', 'steam', 'svn', 'teamspeak', 'things', 'udp', 'unreal', 'ut2004', 'ventrilo', 'view-source', 'webcal', 'wtai', 'wyciwyg', 'xfire', 'xri', 'ymsgr'];\n\n// Process autolinks ''\n\n/*eslint max-len:0*/\nvar EMAIL_RE = /^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/;\nvar AUTOLINK_RE = /^<([a-zA-Z.\\-]{1,25}):([^<>\\x00-\\x20]*)>/;\nfunction autolink(state, silent) {\n var tail,\n linkMatch,\n emailMatch,\n url,\n fullUrl,\n pos = state.pos;\n if (state.src.charCodeAt(pos) !== 0x3C /* < */) {\n return false;\n }\n tail = state.src.slice(pos);\n if (tail.indexOf('>') < 0) {\n return false;\n }\n linkMatch = tail.match(AUTOLINK_RE);\n if (linkMatch) {\n if (url_schemas.indexOf(linkMatch[1].toLowerCase()) < 0) {\n return false;\n }\n url = linkMatch[0].slice(1, -1);\n fullUrl = normalizeLink(url);\n if (!state.parser.validateLink(url)) {\n return false;\n }\n if (!silent) {\n state.push({\n type: 'link_open',\n href: fullUrl,\n level: state.level\n });\n state.push({\n type: 'text',\n content: url,\n level: state.level + 1\n });\n state.push({\n type: 'link_close',\n level: state.level\n });\n }\n state.pos += linkMatch[0].length;\n return true;\n }\n emailMatch = tail.match(EMAIL_RE);\n if (emailMatch) {\n url = emailMatch[0].slice(1, -1);\n fullUrl = normalizeLink('mailto:' + url);\n if (!state.parser.validateLink(fullUrl)) {\n return false;\n }\n if (!silent) {\n state.push({\n type: 'link_open',\n href: fullUrl,\n level: state.level\n });\n state.push({\n type: 'text',\n content: url,\n level: state.level + 1\n });\n state.push({\n type: 'link_close',\n level: state.level\n });\n }\n state.pos += emailMatch[0].length;\n return true;\n }\n return false;\n}\n\n// Regexps to match html elements\n\nfunction replace$1(regex, options) {\n regex = regex.source;\n options = options || '';\n return function self(name, val) {\n if (!name) {\n return new RegExp(regex, options);\n }\n val = val.source || val;\n regex = regex.replace(name, val);\n return self;\n };\n}\nvar attr_name = /[a-zA-Z_:][a-zA-Z0-9:._-]*/;\nvar unquoted = /[^\"'=<>`\\x00-\\x20]+/;\nvar single_quoted = /'[^']*'/;\nvar double_quoted = /\"[^\"]*\"/;\n\n/*eslint no-spaced-func:0*/\nvar attr_value = replace$1(/(?:unquoted|single_quoted|double_quoted)/)('unquoted', unquoted)('single_quoted', single_quoted)('double_quoted', double_quoted)();\nvar attribute = replace$1(/(?:\\s+attr_name(?:\\s*=\\s*attr_value)?)/)('attr_name', attr_name)('attr_value', attr_value)();\nvar open_tag = replace$1(/<[A-Za-z][A-Za-z0-9]*attribute*\\s*\\/?>/)('attribute', attribute)();\nvar close_tag = /<\\/[A-Za-z][A-Za-z0-9]*\\s*>/;\nvar comment = /|/;\nvar processing = /<[?].*?[?]>/;\nvar declaration = /]*>/;\nvar cdata = //;\nvar HTML_TAG_RE = replace$1(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)('open_tag', open_tag)('close_tag', close_tag)('comment', comment)('processing', processing)('declaration', declaration)('cdata', cdata)();\n\n// Process html tags\n\nfunction isLetter$2(ch) {\n /*eslint no-bitwise:0*/\n var lc = ch | 0x20; // to lower case\n return lc >= 0x61 /* a */ && lc <= 0x7a /* z */;\n}\nfunction htmltag(state, silent) {\n var ch,\n match,\n max,\n pos = state.pos;\n if (!state.options.html) {\n return false;\n }\n\n // Check start\n max = state.posMax;\n if (state.src.charCodeAt(pos) !== 0x3C /* < */ || pos + 2 >= max) {\n return false;\n }\n\n // Quick fail on second char\n ch = state.src.charCodeAt(pos + 1);\n if (ch !== 0x21 /* ! */ && ch !== 0x3F /* ? */ && ch !== 0x2F /* / */ && !isLetter$2(ch)) {\n return false;\n }\n match = state.src.slice(pos).match(HTML_TAG_RE);\n if (!match) {\n return false;\n }\n if (!silent) {\n state.push({\n type: 'htmltag',\n content: state.src.slice(pos, pos + match[0].length),\n level: state.level\n });\n }\n state.pos += match[0].length;\n return true;\n}\n\n// Process html entity - {, ¯, ", ...\n\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\nfunction entity(state, silent) {\n var ch,\n code,\n match,\n pos = state.pos,\n max = state.posMax;\n if (state.src.charCodeAt(pos) !== 0x26 /* & */) {\n return false;\n }\n if (pos + 1 < max) {\n ch = state.src.charCodeAt(pos + 1);\n if (ch === 0x23 /* # */) {\n match = state.src.slice(pos).match(DIGITAL_RE);\n if (match) {\n if (!silent) {\n code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD);\n }\n state.pos += match[0].length;\n return true;\n }\n } else {\n match = state.src.slice(pos).match(NAMED_RE);\n if (match) {\n var decoded = decodeEntity(match[1]);\n if (match[1] !== decoded) {\n if (!silent) {\n state.pending += decoded;\n }\n state.pos += match[0].length;\n return true;\n }\n }\n }\n }\n if (!silent) {\n state.pending += '&';\n }\n state.pos++;\n return true;\n}\n\n/**\n * Inline Parser `rules`\n */\n\nvar _rules$2 = [['text', text], ['newline', newline], ['escape', escape], ['backticks', backticks], ['del', del], ['ins', ins], ['mark', mark], ['emphasis', emphasis], ['sub', sub], ['sup', sup], ['links', links], ['footnote_inline', footnote_inline], ['footnote_ref', footnote_ref], ['autolink', autolink], ['htmltag', htmltag], ['entity', entity]];\n\n/**\n * Inline Parser class. Note that link validation is stricter\n * in Remarkable than what is specified by CommonMark. If you\n * want to change this you can use a custom validator.\n *\n * @api private\n */\n\nfunction ParserInline() {\n this.ruler = new Ruler();\n for (var i = 0; i < _rules$2.length; i++) {\n this.ruler.push(_rules$2[i][0], _rules$2[i][1]);\n }\n\n // Can be overridden with a custom validator\n this.validateLink = validateLink;\n}\n\n/**\n * Skip a single token by running all rules in validation mode.\n * Returns `true` if any rule reports success.\n *\n * @param {Object} `state`\n * @api privage\n */\n\nParserInline.prototype.skipToken = function (state) {\n var rules = this.ruler.getRules('');\n var len = rules.length;\n var pos = state.pos;\n var i, cached_pos;\n if ((cached_pos = state.cacheGet(pos)) > 0) {\n state.pos = cached_pos;\n return;\n }\n for (i = 0; i < len; i++) {\n if (rules[i](state, true)) {\n state.cacheSet(pos, state.pos);\n return;\n }\n }\n state.pos++;\n state.cacheSet(pos, state.pos);\n};\n\n/**\n * Generate tokens for the given input range.\n *\n * @param {Object} `state`\n * @api private\n */\n\nParserInline.prototype.tokenize = function (state) {\n var rules = this.ruler.getRules('');\n var len = rules.length;\n var end = state.posMax;\n var ok, i;\n while (state.pos < end) {\n // Try all possible rules.\n // On success, the rule should:\n //\n // - update `state.pos`\n // - update `state.tokens`\n // - return true\n for (i = 0; i < len; i++) {\n ok = rules[i](state, false);\n if (ok) {\n break;\n }\n }\n if (ok) {\n if (state.pos >= end) {\n break;\n }\n continue;\n }\n state.pending += state.src[state.pos++];\n }\n if (state.pending) {\n state.pushPending();\n }\n};\n\n/**\n * Parse the given input string.\n *\n * @param {String} `str`\n * @param {Object} `options`\n * @param {Object} `env`\n * @param {Array} `outTokens`\n * @api private\n */\n\nParserInline.prototype.parse = function (str, options, env, outTokens) {\n var state = new StateInline(str, this, options, env, outTokens);\n this.tokenize(state);\n};\n\n/**\n * Validate the given `url` by checking for bad protocols.\n *\n * @param {String} `url`\n * @return {Boolean}\n */\n\nfunction validateLink(url) {\n var BAD_PROTOCOLS = ['vbscript', 'javascript', 'file', 'data'];\n var str = url.trim().toLowerCase();\n // Care about digital entities \"javascript:alert(1)\"\n str = replaceEntities(str);\n if (str.indexOf(':') !== -1 && BAD_PROTOCOLS.indexOf(str.split(':')[0]) !== -1) {\n return false;\n }\n return true;\n}\n\n// Remarkable default options\n\nvar defaultConfig = {\n options: {\n html: false,\n // Enable HTML tags in source\n xhtmlOut: false,\n // Use '/' to close single tags (
    )\n breaks: false,\n // Convert '\\n' in paragraphs into
    \n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkTarget: '',\n // set target to open link in\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n quotes: '“”‘’',\n // Highlighter function. Should return escaped HTML,\n // or '' if input not changed\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n maxNesting: 20 // Internal protection, recursion limit\n },\n components: {\n core: {\n rules: ['block', 'inline', 'references', 'replacements', 'smartquotes', 'references', 'abbr2', 'footnote_tail']\n },\n block: {\n rules: ['blockquote', 'code', 'fences', 'footnote', 'heading', 'hr', 'htmlblock', 'lheading', 'list', 'paragraph', 'table']\n },\n inline: {\n rules: ['autolink', 'backticks', 'del', 'emphasis', 'entity', 'escape', 'footnote_ref', 'htmltag', 'links', 'newline', 'text']\n }\n }\n};\n\n// Remarkable default options\n\nvar fullConfig = {\n options: {\n html: false,\n // Enable HTML tags in source\n xhtmlOut: false,\n // Use '/' to close single tags (
    )\n breaks: false,\n // Convert '\\n' in paragraphs into
    \n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkTarget: '',\n // set target to open link in\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n quotes: '“”‘’',\n // Highlighter function. Should return escaped HTML,\n // or '' if input not changed\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n maxNesting: 20 // Internal protection, recursion limit\n },\n components: {\n // Don't restrict core/block/inline rules\n core: {},\n block: {},\n inline: {}\n }\n};\n\n// Commonmark default options\n\nvar commonmarkConfig = {\n options: {\n html: true,\n // Enable HTML tags in source\n xhtmlOut: true,\n // Use '/' to close single tags (
    )\n breaks: false,\n // Convert '\\n' in paragraphs into
    \n langPrefix: 'language-',\n // CSS language prefix for fenced blocks\n linkTarget: '',\n // set target to open link in\n\n // Enable some language-neutral replacements + quotes beautification\n typographer: false,\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.\n quotes: '“”‘’',\n // Highlighter function. Should return escaped HTML,\n // or '' if input not changed\n //\n // function (/*str, lang*/) { return ''; }\n //\n highlight: null,\n maxNesting: 20 // Internal protection, recursion limit\n },\n components: {\n core: {\n rules: ['block', 'inline', 'references', 'abbr2']\n },\n block: {\n rules: ['blockquote', 'code', 'fences', 'heading', 'hr', 'htmlblock', 'lheading', 'list', 'paragraph']\n },\n inline: {\n rules: ['autolink', 'backticks', 'emphasis', 'entity', 'escape', 'htmltag', 'links', 'newline', 'text']\n }\n }\n};\n\n/**\n * Preset configs\n */\n\nvar config = {\n 'default': defaultConfig,\n 'full': fullConfig,\n 'commonmark': commonmarkConfig\n};\n\n/**\n * The `StateCore` class manages state.\n *\n * @param {Object} `instance` Remarkable instance\n * @param {String} `str` Markdown string\n * @param {Object} `env`\n */\n\nfunction StateCore(instance, str, env) {\n this.src = str;\n this.env = env;\n this.options = instance.options;\n this.tokens = [];\n this.inlineMode = false;\n this.inline = instance.inline;\n this.block = instance.block;\n this.renderer = instance.renderer;\n this.typographer = instance.typographer;\n}\n\n/**\n * The main `Remarkable` class. Create an instance of\n * `Remarkable` with a `preset` and/or `options`.\n *\n * @param {String} `preset` If no preset is given, `default` is used.\n * @param {Object} `options`\n */\n\nfunction Remarkable(preset, options) {\n if (typeof preset !== 'string') {\n options = preset;\n preset = 'default';\n }\n if (options && options.linkify != null) {\n console.warn('linkify option is removed. Use linkify plugin instead:\\n\\n' + 'import Remarkable from \\'remarkable\\';\\n' + 'import linkify from \\'remarkable/linkify\\';\\n' + 'new Remarkable().use(linkify)\\n');\n }\n this.inline = new ParserInline();\n this.block = new ParserBlock();\n this.core = new Core();\n this.renderer = new Renderer();\n this.ruler = new Ruler();\n this.options = {};\n this.configure(config[preset]);\n this.set(options || {});\n}\n\n/**\n * Set options as an alternative to passing them\n * to the constructor.\n *\n * ```js\n * md.set({typographer: true});\n * ```\n * @param {Object} `options`\n * @api public\n */\n\nRemarkable.prototype.set = function (options) {\n assign(this.options, options);\n};\n\n/**\n * Batch loader for components rules states, and options\n *\n * @param {Object} `presets`\n */\n\nRemarkable.prototype.configure = function (presets) {\n var self = this;\n if (!presets) {\n throw new Error('Wrong `remarkable` preset, check name/content');\n }\n if (presets.options) {\n self.set(presets.options);\n }\n if (presets.components) {\n Object.keys(presets.components).forEach(function (name) {\n if (presets.components[name].rules) {\n self[name].ruler.enable(presets.components[name].rules, true);\n }\n });\n }\n};\n\n/**\n * Use a plugin.\n *\n * ```js\n * var md = new Remarkable();\n *\n * md.use(plugin1)\n * .use(plugin2, opts)\n * .use(plugin3);\n * ```\n *\n * @param {Function} `plugin`\n * @param {Object} `options`\n * @return {Object} `Remarkable` for chaining\n */\n\nRemarkable.prototype.use = function (plugin, options) {\n plugin(this, options);\n return this;\n};\n\n/**\n * Parse the input `string` and return a tokens array.\n * Modifies `env` with definitions data.\n *\n * @param {String} `string`\n * @param {Object} `env`\n * @return {Array} Array of tokens\n */\n\nRemarkable.prototype.parse = function (str, env) {\n var state = new StateCore(this, str, env);\n this.core.process(state);\n return state.tokens;\n};\n\n/**\n * The main `.render()` method that does all the magic :)\n *\n * @param {String} `string`\n * @param {Object} `env`\n * @return {String} Rendered HTML.\n */\n\nRemarkable.prototype.render = function (str, env) {\n env = env || {};\n return this.renderer.render(this.parse(str, env), this.options, env);\n};\n\n/**\n * Parse the given content `string` as a single string.\n *\n * @param {String} `string`\n * @param {Object} `env`\n * @return {Array} Array of tokens\n */\n\nRemarkable.prototype.parseInline = function (str, env) {\n var state = new StateCore(this, str, env);\n state.inlineMode = true;\n this.core.process(state);\n return state.tokens;\n};\n\n/**\n * Render a single content `string`, without wrapping it\n * to paragraphs\n *\n * @param {String} `str`\n * @param {Object} `env`\n * @return {String}\n */\n\nRemarkable.prototype.renderInline = function (str, env) {\n env = env || {};\n return this.renderer.render(this.parseInline(str, env), this.options, env);\n};\nexport { Remarkable, utils };","// Important: this file is generated from the 'build' script and should not be\n// edited directly\nexport var version = '3.16.2';\n","/**\n * Assigns (shallow copies) the properties of `src` onto `dest`, if the\n * corresponding property on `dest` === `undefined`.\n *\n * @param {Object} dest The destination object.\n * @param {Object} src The source object.\n * @return {Object} The destination object (`dest`)\n */\nexport function defaults(dest, src) {\n for (var prop in src) {\n if (src.hasOwnProperty(prop) && dest[prop] === undefined) {\n dest[prop] = src[prop];\n }\n }\n return dest;\n}\n/**\n * Truncates the `str` at `len - ellipsisChars.length`, and adds the `ellipsisChars` to the\n * end of the string (by default, two periods: '..'). If the `str` length does not exceed\n * `len`, the string will be returned unchanged.\n *\n * @param {String} str The string to truncate and add an ellipsis to.\n * @param {Number} truncateLen The length to truncate the string at.\n * @param {String} [ellipsisChars=...] The ellipsis character(s) to add to the end of `str`\n * when truncated. Defaults to '...'\n */\nexport function ellipsis(str, truncateLen, ellipsisChars) {\n var ellipsisLength;\n if (str.length > truncateLen) {\n if (ellipsisChars == null) {\n ellipsisChars = '…';\n ellipsisLength = 3;\n } else {\n ellipsisLength = ellipsisChars.length;\n }\n str = str.substring(0, truncateLen - ellipsisLength) + ellipsisChars;\n }\n return str;\n}\n/**\n * Supports `Array.prototype.indexOf()` functionality for old IE (IE8 and below).\n *\n * @param {Array} arr The array to find an element of.\n * @param {*} element The element to find in the array, and return the index of.\n * @return {Number} The index of the `element`, or -1 if it was not found.\n */\nexport function indexOf(arr, element) {\n // @ts-ignore - As far as TypeScript is concerned, this method will always\n // exist (lowest \"lib\" in TS is \"ES5\"). Hence we need to ignore this error\n // to support IE8 which only implements ES3 and doesn't have this method\n if (Array.prototype.indexOf) {\n return arr.indexOf(element);\n } else {\n for (var i = 0, len = arr.length; i < len; i++) {\n if (arr[i] === element) return i;\n }\n return -1;\n }\n}\n/**\n * Removes array elements based on a filtering function. Mutates the input\n * array.\n *\n * Using this instead of the ES5 Array.prototype.filter() function, to allow\n * Autolinker compatibility with IE8, and also to prevent creating many new\n * arrays in memory for filtering.\n *\n * @param {Array} arr The array to remove elements from. This array is\n * mutated.\n * @param {Function} fn A function which should return `true` to\n * remove an element.\n * @return {Array} The mutated input `arr`.\n */\nexport function remove(arr, fn) {\n for (var i = arr.length - 1; i >= 0; i--) {\n if (fn(arr[i]) === true) {\n arr.splice(i, 1);\n }\n }\n}\n/**\n * Performs the functionality of what modern browsers do when `String.prototype.split()` is called\n * with a regular expression that contains capturing parenthesis.\n *\n * For example:\n *\n * // Modern browsers:\n * \"a,b,c\".split( /(,)/ ); // --> [ 'a', ',', 'b', ',', 'c' ]\n *\n * // Old IE (including IE8):\n * \"a,b,c\".split( /(,)/ ); // --> [ 'a', 'b', 'c' ]\n *\n * This method emulates the functionality of modern browsers for the old IE case.\n *\n * @param {String} str The string to split.\n * @param {RegExp} splitRegex The regular expression to split the input `str` on. The splitting\n * character(s) will be spliced into the array, as in the \"modern browsers\" example in the\n * description of this method.\n * Note #1: the supplied regular expression **must** have the 'g' flag specified.\n * Note #2: for simplicity's sake, the regular expression does not need\n * to contain capturing parenthesis - it will be assumed that any match has them.\n * @return {String[]} The split array of strings, with the splitting character(s) included.\n */\nexport function splitAndCapture(str, splitRegex) {\n if (!splitRegex.global) throw new Error(\"`splitRegex` must have the 'g' flag set\");\n var result = [],\n lastIdx = 0,\n match;\n while (match = splitRegex.exec(str)) {\n result.push(str.substring(lastIdx, match.index));\n result.push(match[0]); // push the splitting char(s)\n lastIdx = match.index + match[0].length;\n }\n result.push(str.substring(lastIdx));\n return result;\n}\n/**\n * Function that should never be called but is used to check that every\n * enum value is handled using TypeScript's 'never' type.\n */\nexport function throwUnhandledCaseError(theValue) {\n throw new Error(\"Unhandled case for value: '\".concat(theValue, \"'\"));\n}\n","import { indexOf } from './utils';\n/**\n * @class Autolinker.HtmlTag\n * @extends Object\n *\n * Represents an HTML tag, which can be used to easily build/modify HTML tags programmatically.\n *\n * Autolinker uses this abstraction to create HTML tags, and then write them out as strings. You may also use\n * this class in your code, especially within a {@link Autolinker#replaceFn replaceFn}.\n *\n * ## Examples\n *\n * Example instantiation:\n *\n * var tag = new Autolinker.HtmlTag( {\n * tagName : 'a',\n * attrs : { 'href': 'http://google.com', 'class': 'external-link' },\n * innerHtml : 'Google'\n * } );\n *\n * tag.toAnchorString(); // Google\n *\n * // Individual accessor methods\n * tag.getTagName(); // 'a'\n * tag.getAttr( 'href' ); // 'http://google.com'\n * tag.hasClass( 'external-link' ); // true\n *\n *\n * Using mutator methods (which may be used in combination with instantiation config properties):\n *\n * var tag = new Autolinker.HtmlTag();\n * tag.setTagName( 'a' );\n * tag.setAttr( 'href', 'http://google.com' );\n * tag.addClass( 'external-link' );\n * tag.setInnerHtml( 'Google' );\n *\n * tag.getTagName(); // 'a'\n * tag.getAttr( 'href' ); // 'http://google.com'\n * tag.hasClass( 'external-link' ); // true\n *\n * tag.toAnchorString(); // Google\n *\n *\n * ## Example use within a {@link Autolinker#replaceFn replaceFn}\n *\n * var html = Autolinker.link( \"Test google.com\", {\n * replaceFn : function( match ) {\n * var tag = match.buildTag(); // returns an {@link Autolinker.HtmlTag} instance, configured with the Match's href and anchor text\n * tag.setAttr( 'rel', 'nofollow' );\n *\n * return tag;\n * }\n * } );\n *\n * // generated html:\n * // Test google.com\n *\n *\n * ## Example use with a new tag for the replacement\n *\n * var html = Autolinker.link( \"Test google.com\", {\n * replaceFn : function( match ) {\n * var tag = new Autolinker.HtmlTag( {\n * tagName : 'button',\n * attrs : { 'title': 'Load URL: ' + match.getAnchorHref() },\n * innerHtml : 'Load URL: ' + match.getAnchorText()\n * } );\n *\n * return tag;\n * }\n * } );\n *\n * // generated html:\n * // Test \n */\nvar HtmlTag = /** @class */function () {\n /**\n * @method constructor\n * @param {Object} [cfg] The configuration properties for this class, in an Object (map)\n */\n function HtmlTag(cfg) {\n if (cfg === void 0) {\n cfg = {};\n }\n /**\n * @cfg {String} tagName\n *\n * The tag name. Ex: 'a', 'button', etc.\n *\n * Not required at instantiation time, but should be set using {@link #setTagName} before {@link #toAnchorString}\n * is executed.\n */\n this.tagName = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Object.} attrs\n *\n * An key/value Object (map) of attributes to create the tag with. The keys are the attribute names, and the\n * values are the attribute values.\n */\n this.attrs = {}; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {String} innerHTML\n *\n * The inner HTML for the tag.\n */\n this.innerHTML = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @protected\n * @property {RegExp} whitespaceRegex\n *\n * Regular expression used to match whitespace in a string of CSS classes.\n */\n this.whitespaceRegex = /\\s+/; // default value just to get the above doc comment in the ES5 output and documentation generator\n this.tagName = cfg.tagName || '';\n this.attrs = cfg.attrs || {};\n this.innerHTML = cfg.innerHtml || cfg.innerHTML || ''; // accept either the camelCased form or the fully capitalized acronym as in the DOM\n }\n /**\n * Sets the tag name that will be used to generate the tag with.\n *\n * @param {String} tagName\n * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n */\n HtmlTag.prototype.setTagName = function (tagName) {\n this.tagName = tagName;\n return this;\n };\n /**\n * Retrieves the tag name.\n *\n * @return {String}\n */\n HtmlTag.prototype.getTagName = function () {\n return this.tagName || '';\n };\n /**\n * Sets an attribute on the HtmlTag.\n *\n * @param {String} attrName The attribute name to set.\n * @param {String} attrValue The attribute value to set.\n * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n */\n HtmlTag.prototype.setAttr = function (attrName, attrValue) {\n var tagAttrs = this.getAttrs();\n tagAttrs[attrName] = attrValue;\n return this;\n };\n /**\n * Retrieves an attribute from the HtmlTag. If the attribute does not exist, returns `undefined`.\n *\n * @param {String} attrName The attribute name to retrieve.\n * @return {String} The attribute's value, or `undefined` if it does not exist on the HtmlTag.\n */\n HtmlTag.prototype.getAttr = function (attrName) {\n return this.getAttrs()[attrName];\n };\n /**\n * Sets one or more attributes on the HtmlTag.\n *\n * @param {Object.} attrs A key/value Object (map) of the attributes to set.\n * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n */\n HtmlTag.prototype.setAttrs = function (attrs) {\n Object.assign(this.getAttrs(), attrs);\n return this;\n };\n /**\n * Retrieves the attributes Object (map) for the HtmlTag.\n *\n * @return {Object.} A key/value object of the attributes for the HtmlTag.\n */\n HtmlTag.prototype.getAttrs = function () {\n return this.attrs || (this.attrs = {});\n };\n /**\n * Sets the provided `cssClass`, overwriting any current CSS classes on the HtmlTag.\n *\n * @param {String} cssClass One or more space-separated CSS classes to set (overwrite).\n * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n */\n HtmlTag.prototype.setClass = function (cssClass) {\n return this.setAttr('class', cssClass);\n };\n /**\n * Convenience method to add one or more CSS classes to the HtmlTag. Will not add duplicate CSS classes.\n *\n * @param {String} cssClass One or more space-separated CSS classes to add.\n * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n */\n HtmlTag.prototype.addClass = function (cssClass) {\n var classAttr = this.getClass(),\n whitespaceRegex = this.whitespaceRegex,\n classes = !classAttr ? [] : classAttr.split(whitespaceRegex),\n newClasses = cssClass.split(whitespaceRegex),\n newClass;\n while (newClass = newClasses.shift()) {\n if (indexOf(classes, newClass) === -1) {\n classes.push(newClass);\n }\n }\n this.getAttrs()['class'] = classes.join(' ');\n return this;\n };\n /**\n * Convenience method to remove one or more CSS classes from the HtmlTag.\n *\n * @param {String} cssClass One or more space-separated CSS classes to remove.\n * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n */\n HtmlTag.prototype.removeClass = function (cssClass) {\n var classAttr = this.getClass(),\n whitespaceRegex = this.whitespaceRegex,\n classes = !classAttr ? [] : classAttr.split(whitespaceRegex),\n removeClasses = cssClass.split(whitespaceRegex),\n removeClass;\n while (classes.length && (removeClass = removeClasses.shift())) {\n var idx = indexOf(classes, removeClass);\n if (idx !== -1) {\n classes.splice(idx, 1);\n }\n }\n this.getAttrs()['class'] = classes.join(' ');\n return this;\n };\n /**\n * Convenience method to retrieve the CSS class(es) for the HtmlTag, which will each be separated by spaces when\n * there are multiple.\n *\n * @return {String}\n */\n HtmlTag.prototype.getClass = function () {\n return this.getAttrs()['class'] || '';\n };\n /**\n * Convenience method to check if the tag has a CSS class or not.\n *\n * @param {String} cssClass The CSS class to check for.\n * @return {Boolean} `true` if the HtmlTag has the CSS class, `false` otherwise.\n */\n HtmlTag.prototype.hasClass = function (cssClass) {\n return (' ' + this.getClass() + ' ').indexOf(' ' + cssClass + ' ') !== -1;\n };\n /**\n * Sets the inner HTML for the tag.\n *\n * @param {String} html The inner HTML to set.\n * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n */\n HtmlTag.prototype.setInnerHTML = function (html) {\n this.innerHTML = html;\n return this;\n };\n /**\n * Backwards compatibility method name.\n *\n * @param {String} html The inner HTML to set.\n * @return {Autolinker.HtmlTag} This HtmlTag instance, so that method calls may be chained.\n */\n HtmlTag.prototype.setInnerHtml = function (html) {\n return this.setInnerHTML(html);\n };\n /**\n * Retrieves the inner HTML for the tag.\n *\n * @return {String}\n */\n HtmlTag.prototype.getInnerHTML = function () {\n return this.innerHTML || '';\n };\n /**\n * Backward compatibility method name.\n *\n * @return {String}\n */\n HtmlTag.prototype.getInnerHtml = function () {\n return this.getInnerHTML();\n };\n /**\n * Override of superclass method used to generate the HTML string for the tag.\n *\n * @return {String}\n */\n HtmlTag.prototype.toAnchorString = function () {\n var tagName = this.getTagName(),\n attrsStr = this.buildAttrsStr();\n attrsStr = attrsStr ? ' ' + attrsStr : ''; // prepend a space if there are actually attributes\n return ['<', tagName, attrsStr, '>', this.getInnerHtml(), ''].join('');\n };\n /**\n * Support method for {@link #toAnchorString}, returns the string space-separated key=\"value\" pairs, used to populate\n * the stringified HtmlTag.\n *\n * @protected\n * @return {String} Example return: `attr1=\"value1\" attr2=\"value2\"`\n */\n HtmlTag.prototype.buildAttrsStr = function () {\n if (!this.attrs) return ''; // no `attrs` Object (map) has been set, return empty string\n var attrs = this.getAttrs(),\n attrsArr = [];\n for (var prop in attrs) {\n if (attrs.hasOwnProperty(prop)) {\n attrsArr.push(prop + '=\"' + attrs[prop] + '\"');\n }\n }\n return attrsArr.join(' ');\n };\n return HtmlTag;\n}();\nexport { HtmlTag };\n","/**\n * Date: 2015-10-05\n * Author: Kasper Søfren (https://github.com/kafoso)\n *\n * A truncation feature, where the ellipsis will be placed at a section within\n * the URL making it still somewhat human readable.\n *\n * @param {String} url\t\t\t\t\t\t A URL.\n * @param {Number} truncateLen\t\t The maximum length of the truncated output URL string.\n * @param {String} ellipsisChars\t The characters to place within the url, e.g. \"...\".\n * @return {String} The truncated URL.\n */\nexport function truncateSmart(url, truncateLen, ellipsisChars) {\n var ellipsisLengthBeforeParsing;\n var ellipsisLength;\n if (ellipsisChars == null) {\n ellipsisChars = '…';\n ellipsisLength = 3;\n ellipsisLengthBeforeParsing = 8;\n } else {\n ellipsisLength = ellipsisChars.length;\n ellipsisLengthBeforeParsing = ellipsisChars.length;\n }\n var parse_url = function (url) {\n // Functionality inspired by PHP function of same name\n var urlObj = {};\n var urlSub = url;\n var match = urlSub.match(/^([a-z]+):\\/\\//i);\n if (match) {\n urlObj.scheme = match[1];\n urlSub = urlSub.substr(match[0].length);\n }\n match = urlSub.match(/^(.*?)(?=(\\?|#|\\/|$))/i);\n if (match) {\n urlObj.host = match[1];\n urlSub = urlSub.substr(match[0].length);\n }\n match = urlSub.match(/^\\/(.*?)(?=(\\?|#|$))/i);\n if (match) {\n urlObj.path = match[1];\n urlSub = urlSub.substr(match[0].length);\n }\n match = urlSub.match(/^\\?(.*?)(?=(#|$))/i);\n if (match) {\n urlObj.query = match[1];\n urlSub = urlSub.substr(match[0].length);\n }\n match = urlSub.match(/^#(.*?)$/i);\n if (match) {\n urlObj.fragment = match[1];\n //urlSub = urlSub.substr(match[0].length); -- not used. Uncomment if adding another block.\n }\n return urlObj;\n };\n var buildUrl = function (urlObj) {\n var url = '';\n if (urlObj.scheme && urlObj.host) {\n url += urlObj.scheme + '://';\n }\n if (urlObj.host) {\n url += urlObj.host;\n }\n if (urlObj.path) {\n url += '/' + urlObj.path;\n }\n if (urlObj.query) {\n url += '?' + urlObj.query;\n }\n if (urlObj.fragment) {\n url += '#' + urlObj.fragment;\n }\n return url;\n };\n var buildSegment = function (segment, remainingAvailableLength) {\n var remainingAvailableLengthHalf = remainingAvailableLength / 2,\n startOffset = Math.ceil(remainingAvailableLengthHalf),\n endOffset = -1 * Math.floor(remainingAvailableLengthHalf),\n end = '';\n if (endOffset < 0) {\n end = segment.substr(endOffset);\n }\n return segment.substr(0, startOffset) + ellipsisChars + end;\n };\n if (url.length <= truncateLen) {\n return url;\n }\n var availableLength = truncateLen - ellipsisLength;\n var urlObj = parse_url(url);\n // Clean up the URL\n if (urlObj.query) {\n var matchQuery = urlObj.query.match(/^(.*?)(?=(\\?|\\#))(.*?)$/i);\n if (matchQuery) {\n // Malformed URL; two or more \"?\". Removed any content behind the 2nd.\n urlObj.query = urlObj.query.substr(0, matchQuery[1].length);\n url = buildUrl(urlObj);\n }\n }\n if (url.length <= truncateLen) {\n return url;\n }\n if (urlObj.host) {\n urlObj.host = urlObj.host.replace(/^www\\./, '');\n url = buildUrl(urlObj);\n }\n if (url.length <= truncateLen) {\n return url;\n }\n // Process and build the URL\n var str = '';\n if (urlObj.host) {\n str += urlObj.host;\n }\n if (str.length >= availableLength) {\n if (urlObj.host.length == truncateLen) {\n return (urlObj.host.substr(0, truncateLen - ellipsisLength) + ellipsisChars).substr(0, availableLength + ellipsisLengthBeforeParsing);\n }\n return buildSegment(str, availableLength).substr(0, availableLength + ellipsisLengthBeforeParsing);\n }\n var pathAndQuery = '';\n if (urlObj.path) {\n pathAndQuery += '/' + urlObj.path;\n }\n if (urlObj.query) {\n pathAndQuery += '?' + urlObj.query;\n }\n if (pathAndQuery) {\n if ((str + pathAndQuery).length >= availableLength) {\n if ((str + pathAndQuery).length == truncateLen) {\n return (str + pathAndQuery).substr(0, truncateLen);\n }\n var remainingAvailableLength = availableLength - str.length;\n return (str + buildSegment(pathAndQuery, remainingAvailableLength)).substr(0, availableLength + ellipsisLengthBeforeParsing);\n } else {\n str += pathAndQuery;\n }\n }\n if (urlObj.fragment) {\n var fragment = '#' + urlObj.fragment;\n if ((str + fragment).length >= availableLength) {\n if ((str + fragment).length == truncateLen) {\n return (str + fragment).substr(0, truncateLen);\n }\n var remainingAvailableLength2 = availableLength - str.length;\n return (str + buildSegment(fragment, remainingAvailableLength2)).substr(0, availableLength + ellipsisLengthBeforeParsing);\n } else {\n str += fragment;\n }\n }\n if (urlObj.scheme && urlObj.host) {\n var scheme = urlObj.scheme + '://';\n if ((str + scheme).length < availableLength) {\n return (scheme + str).substr(0, truncateLen);\n }\n }\n if (str.length <= truncateLen) {\n return str;\n }\n var end = '';\n if (availableLength > 0) {\n end = str.substr(-1 * Math.floor(availableLength / 2));\n }\n return (str.substr(0, Math.ceil(availableLength / 2)) + ellipsisChars + end).substr(0, availableLength + ellipsisLengthBeforeParsing);\n}\n","/**\n * Date: 2015-10-05\n * Author: Kasper Søfren (https://github.com/kafoso)\n *\n * A truncation feature, where the ellipsis will be placed in the dead-center of the URL.\n *\n * @param {String} url A URL.\n * @param {Number} truncateLen The maximum length of the truncated output URL string.\n * @param {String} ellipsisChars The characters to place within the url, e.g. \"..\".\n * @return {String} The truncated URL.\n */\nexport function truncateMiddle(url, truncateLen, ellipsisChars) {\n if (url.length <= truncateLen) {\n return url;\n }\n var ellipsisLengthBeforeParsing;\n var ellipsisLength;\n if (ellipsisChars == null) {\n ellipsisChars = '…';\n ellipsisLengthBeforeParsing = 8;\n ellipsisLength = 3;\n } else {\n ellipsisLengthBeforeParsing = ellipsisChars.length;\n ellipsisLength = ellipsisChars.length;\n }\n var availableLength = truncateLen - ellipsisLength;\n var end = '';\n if (availableLength > 0) {\n end = url.substr(-1 * Math.floor(availableLength / 2));\n }\n return (url.substr(0, Math.ceil(availableLength / 2)) + ellipsisChars + end).substr(0, availableLength + ellipsisLengthBeforeParsing);\n}\n","import { ellipsis } from '../utils';\n/**\n * A truncation feature where the ellipsis will be placed at the end of the URL.\n *\n * @param {String} anchorText\n * @param {Number} truncateLen The maximum length of the truncated output URL string.\n * @param {String} ellipsisChars The characters to place within the url, e.g. \"..\".\n * @return {String} The truncated URL.\n */\nexport function truncateEnd(anchorText, truncateLen, ellipsisChars) {\n return ellipsis(anchorText, truncateLen, ellipsisChars);\n}\n","import { HtmlTag } from './html-tag';\nimport { truncateSmart } from './truncate/truncate-smart';\nimport { truncateMiddle } from './truncate/truncate-middle';\nimport { truncateEnd } from './truncate/truncate-end';\n/**\n * @protected\n * @class Autolinker.AnchorTagBuilder\n * @extends Object\n *\n * Builds anchor (<a>) tags for the Autolinker utility when a match is\n * found.\n *\n * Normally this class is instantiated, configured, and used internally by an\n * {@link Autolinker} instance, but may actually be used indirectly in a\n * {@link Autolinker#replaceFn replaceFn} to create {@link Autolinker.HtmlTag HtmlTag}\n * instances which may be modified before returning from the\n * {@link Autolinker#replaceFn replaceFn}. For example:\n *\n * var html = Autolinker.link( \"Test google.com\", {\n * replaceFn : function( match ) {\n * var tag = match.buildTag(); // returns an {@link Autolinker.HtmlTag} instance\n * tag.setAttr( 'rel', 'nofollow' );\n *\n * return tag;\n * }\n * } );\n *\n * // generated html:\n * // Test google.com\n */\nvar AnchorTagBuilder = /** @class */function () {\n /**\n * @method constructor\n * @param {Object} [cfg] The configuration options for the AnchorTagBuilder instance, specified in an Object (map).\n */\n function AnchorTagBuilder(cfg) {\n if (cfg === void 0) {\n cfg = {};\n }\n /**\n * @cfg {Boolean} newWindow\n * @inheritdoc Autolinker#newWindow\n */\n this.newWindow = false; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Object} truncate\n * @inheritdoc Autolinker#truncate\n */\n this.truncate = {}; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {String} className\n * @inheritdoc Autolinker#className\n */\n this.className = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n this.newWindow = cfg.newWindow || false;\n this.truncate = cfg.truncate || {};\n this.className = cfg.className || '';\n }\n /**\n * Generates the actual anchor (<a>) tag to use in place of the\n * matched text, via its `match` object.\n *\n * @param {Autolinker.match.Match} match The Match instance to generate an\n * anchor tag from.\n * @return {Autolinker.HtmlTag} The HtmlTag instance for the anchor tag.\n */\n AnchorTagBuilder.prototype.build = function (match) {\n return new HtmlTag({\n tagName: 'a',\n attrs: this.createAttrs(match),\n innerHtml: this.processAnchorText(match.getAnchorText())\n });\n };\n /**\n * Creates the Object (map) of the HTML attributes for the anchor (<a>)\n * tag being generated.\n *\n * @protected\n * @param {Autolinker.match.Match} match The Match instance to generate an\n * anchor tag from.\n * @return {Object} A key/value Object (map) of the anchor tag's attributes.\n */\n AnchorTagBuilder.prototype.createAttrs = function (match) {\n var attrs = {\n href: match.getAnchorHref() // we'll always have the `href` attribute\n };\n var cssClass = this.createCssClass(match);\n if (cssClass) {\n attrs['class'] = cssClass;\n }\n if (this.newWindow) {\n attrs['target'] = '_blank';\n attrs['rel'] = 'noopener noreferrer'; // Issue #149. See https://mathiasbynens.github.io/rel-noopener/\n }\n if (this.truncate) {\n if (this.truncate.length && this.truncate.length < match.getAnchorText().length) {\n attrs['title'] = match.getAnchorHref();\n }\n }\n return attrs;\n };\n /**\n * Creates the CSS class that will be used for a given anchor tag, based on\n * the `matchType` and the {@link #className} config.\n *\n * Example returns:\n *\n * - \"\" // no {@link #className}\n * - \"myLink myLink-url\" // url match\n * - \"myLink myLink-email\" // email match\n * - \"myLink myLink-phone\" // phone match\n * - \"myLink myLink-hashtag\" // hashtag match\n * - \"myLink myLink-mention myLink-twitter\" // mention match with Twitter service\n *\n * @protected\n * @param {Autolinker.match.Match} match The Match instance to generate an\n * anchor tag from.\n * @return {String} The CSS class string for the link. Example return:\n * \"myLink myLink-url\". If no {@link #className} was configured, returns\n * an empty string.\n */\n AnchorTagBuilder.prototype.createCssClass = function (match) {\n var className = this.className;\n if (!className) {\n return '';\n } else {\n var returnClasses = [className],\n cssClassSuffixes = match.getCssClassSuffixes();\n for (var i = 0, len = cssClassSuffixes.length; i < len; i++) {\n returnClasses.push(className + '-' + cssClassSuffixes[i]);\n }\n return returnClasses.join(' ');\n }\n };\n /**\n * Processes the `anchorText` by truncating the text according to the\n * {@link #truncate} config.\n *\n * @private\n * @param {String} anchorText The anchor tag's text (i.e. what will be\n * displayed).\n * @return {String} The processed `anchorText`.\n */\n AnchorTagBuilder.prototype.processAnchorText = function (anchorText) {\n anchorText = this.doTruncate(anchorText);\n return anchorText;\n };\n /**\n * Performs the truncation of the `anchorText` based on the {@link #truncate}\n * option. If the `anchorText` is longer than the length specified by the\n * {@link #truncate} option, the truncation is performed based on the\n * `location` property. See {@link #truncate} for details.\n *\n * @private\n * @param {String} anchorText The anchor tag's text (i.e. what will be\n * displayed).\n * @return {String} The truncated anchor text.\n */\n AnchorTagBuilder.prototype.doTruncate = function (anchorText) {\n var truncate = this.truncate;\n if (!truncate || !truncate.length) return anchorText;\n var truncateLength = truncate.length,\n truncateLocation = truncate.location;\n if (truncateLocation === 'smart') {\n return truncateSmart(anchorText, truncateLength);\n } else if (truncateLocation === 'middle') {\n return truncateMiddle(anchorText, truncateLength);\n } else {\n return truncateEnd(anchorText, truncateLength);\n }\n };\n return AnchorTagBuilder;\n}();\nexport { AnchorTagBuilder };\n","/**\n * @abstract\n * @class Autolinker.match.Match\n *\n * Represents a match found in an input string which should be Autolinked. A Match object is what is provided in a\n * {@link Autolinker#replaceFn replaceFn}, and may be used to query for details about the match.\n *\n * For example:\n *\n * var input = \"...\"; // string with URLs, Email Addresses, and Mentions (Twitter, Instagram, Soundcloud)\n *\n * var linkedText = Autolinker.link( input, {\n * replaceFn : function( match ) {\n * console.log( \"href = \", match.getAnchorHref() );\n * console.log( \"text = \", match.getAnchorText() );\n *\n * switch( match.getType() ) {\n * case 'url' :\n * console.log( \"url: \", match.getUrl() );\n *\n * case 'email' :\n * console.log( \"email: \", match.getEmail() );\n *\n * case 'mention' :\n * console.log( \"mention: \", match.getMention() );\n * }\n * }\n * } );\n *\n * See the {@link Autolinker} class for more details on using the {@link Autolinker#replaceFn replaceFn}.\n */\nvar Match = /** @class */function () {\n /**\n * @member Autolinker.match.Match\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match\n * instance, specified in an Object (map).\n */\n function Match(cfg) {\n /**\n * @cfg {Autolinker.AnchorTagBuilder} tagBuilder (required)\n *\n * Reference to the AnchorTagBuilder instance to use to generate an anchor\n * tag for the Match.\n */\n // @ts-ignore\n this.__jsduckDummyDocProp = null; // property used just to get the above doc comment into the ES5 output and documentation generator\n /**\n * @cfg {String} matchedText (required)\n *\n * The original text that was matched by the {@link Autolinker.matcher.Matcher}.\n */\n this.matchedText = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Number} offset (required)\n *\n * The offset of where the match was made in the input string.\n */\n this.offset = 0; // default value just to get the above doc comment in the ES5 output and documentation generator\n this.tagBuilder = cfg.tagBuilder;\n this.matchedText = cfg.matchedText;\n this.offset = cfg.offset;\n }\n /**\n * Returns the original text that was matched.\n *\n * @return {String}\n */\n Match.prototype.getMatchedText = function () {\n return this.matchedText;\n };\n /**\n * Sets the {@link #offset} of where the match was made in the input string.\n *\n * A {@link Autolinker.matcher.Matcher} will be fed only HTML text nodes,\n * and will therefore set an original offset that is relative to the HTML\n * text node itself. However, we want this offset to be relative to the full\n * HTML input string, and thus if using {@link Autolinker#parse} (rather\n * than calling a {@link Autolinker.matcher.Matcher} directly), then this\n * offset is corrected after the Matcher itself has done its job.\n *\n * @param {Number} offset\n */\n Match.prototype.setOffset = function (offset) {\n this.offset = offset;\n };\n /**\n * Returns the offset of where the match was made in the input string. This\n * is the 0-based index of the match.\n *\n * @return {Number}\n */\n Match.prototype.getOffset = function () {\n return this.offset;\n };\n /**\n * Returns the CSS class suffix(es) for this match.\n *\n * A CSS class suffix is appended to the {@link Autolinker#className} in\n * the {@link Autolinker.AnchorTagBuilder} when a match is translated into\n * an anchor tag.\n *\n * For example, if {@link Autolinker#className} was configured as 'myLink',\n * and this method returns `[ 'url' ]`, the final class name of the element\n * will become: 'myLink myLink-url'.\n *\n * The match may provide multiple CSS class suffixes to be appended to the\n * {@link Autolinker#className} in order to facilitate better styling\n * options for different match criteria. See {@link Autolinker.match.Mention}\n * for an example.\n *\n * By default, this method returns a single array with the match's\n * {@link #getType type} name, but may be overridden by subclasses.\n *\n * @return {String[]}\n */\n Match.prototype.getCssClassSuffixes = function () {\n return [this.getType()];\n };\n /**\n * Builds and returns an {@link Autolinker.HtmlTag} instance based on the\n * Match.\n *\n * This can be used to easily generate anchor tags from matches, and either\n * return their HTML string, or modify them before doing so.\n *\n * Example Usage:\n *\n * var tag = match.buildTag();\n * tag.addClass( 'cordova-link' );\n * tag.setAttr( 'target', '_system' );\n *\n * tag.toAnchorString(); // Google\n *\n * Example Usage in {@link Autolinker#replaceFn}:\n *\n * var html = Autolinker.link( \"Test google.com\", {\n * replaceFn : function( match ) {\n * var tag = match.buildTag(); // returns an {@link Autolinker.HtmlTag} instance\n * tag.setAttr( 'rel', 'nofollow' );\n *\n * return tag;\n * }\n * } );\n *\n * // generated html:\n * // Test google.com\n */\n Match.prototype.buildTag = function () {\n return this.tagBuilder.build(this);\n };\n return Match;\n}();\nexport { Match };\n","import { __extends } from \"tslib\";\nimport { Match } from './match';\n/**\n * @class Autolinker.match.Email\n * @extends Autolinker.match.Match\n *\n * Represents a Email match found in an input string which should be Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more details.\n */\nvar EmailMatch = /** @class */function (_super) {\n __extends(EmailMatch, _super);\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match\n * instance, specified in an Object (map).\n */\n function EmailMatch(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @cfg {String} email (required)\n *\n * The email address that was matched.\n */\n _this.email = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n _this.email = cfg.email;\n return _this;\n }\n /**\n * Returns a string name for the type of match that this class represents.\n * For the case of EmailMatch, returns 'email'.\n *\n * @return {String}\n */\n EmailMatch.prototype.getType = function () {\n return 'email';\n };\n /**\n * Returns the email address that was matched.\n *\n * @return {String}\n */\n EmailMatch.prototype.getEmail = function () {\n return this.email;\n };\n /**\n * Returns the anchor href that should be generated for the match.\n *\n * @return {String}\n */\n EmailMatch.prototype.getAnchorHref = function () {\n return 'mailto:' + this.email;\n };\n /**\n * Returns the anchor text that should be generated for the match.\n *\n * @return {String}\n */\n EmailMatch.prototype.getAnchorText = function () {\n return this.email;\n };\n return EmailMatch;\n}(Match);\nexport { EmailMatch };\n","import { __extends } from \"tslib\";\nimport { Match } from './match';\n/**\n * @class Autolinker.match.Hashtag\n * @extends Autolinker.match.Match\n *\n * Represents a Hashtag match found in an input string which should be\n * Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more\n * details.\n */\nvar HashtagMatch = /** @class */function (_super) {\n __extends(HashtagMatch, _super);\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match\n * instance, specified in an Object (map).\n */\n function HashtagMatch(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @cfg {String} serviceName\n *\n * The service to point hashtag matches to. See {@link Autolinker#hashtag}\n * for available values.\n */\n _this.serviceName = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {String} hashtag (required)\n *\n * The HashtagMatch that was matched, without the '#'.\n */\n _this.hashtag = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n _this.serviceName = cfg.serviceName;\n _this.hashtag = cfg.hashtag;\n return _this;\n }\n /**\n * Returns a string name for the type of match that this class represents.\n * For the case of HashtagMatch, returns 'hashtag'.\n *\n * @return {String}\n */\n HashtagMatch.prototype.getType = function () {\n return 'hashtag';\n };\n /**\n * Returns the configured {@link #serviceName} to point the HashtagMatch to.\n * Ex: 'facebook', 'twitter'.\n *\n * @return {String}\n */\n HashtagMatch.prototype.getServiceName = function () {\n return this.serviceName;\n };\n /**\n * Returns the matched hashtag, without the '#' character.\n *\n * @return {String}\n */\n HashtagMatch.prototype.getHashtag = function () {\n return this.hashtag;\n };\n /**\n * Returns the anchor href that should be generated for the match.\n *\n * @return {String}\n */\n HashtagMatch.prototype.getAnchorHref = function () {\n var serviceName = this.serviceName,\n hashtag = this.hashtag;\n switch (serviceName) {\n case 'twitter':\n return 'https://twitter.com/hashtag/' + hashtag;\n case 'facebook':\n return 'https://www.facebook.com/hashtag/' + hashtag;\n case 'instagram':\n return 'https://instagram.com/explore/tags/' + hashtag;\n case 'tiktok':\n return 'https://www.tiktok.com/tag/' + hashtag;\n default:\n // Shouldn't happen because Autolinker's constructor should block any invalid values, but just in case.\n throw new Error('Unknown service name to point hashtag to: ' + serviceName);\n }\n };\n /**\n * Returns the anchor text that should be generated for the match.\n *\n * @return {String}\n */\n HashtagMatch.prototype.getAnchorText = function () {\n return '#' + this.hashtag;\n };\n return HashtagMatch;\n}(Match);\nexport { HashtagMatch };\n","import { __extends } from \"tslib\";\nimport { Match } from './match';\n/**\n * @class Autolinker.match.Mention\n * @extends Autolinker.match.Match\n *\n * Represents a Mention match found in an input string which should be Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more details.\n */\nvar MentionMatch = /** @class */function (_super) {\n __extends(MentionMatch, _super);\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match\n * instance, specified in an Object (map).\n */\n function MentionMatch(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @cfg {String} serviceName\n *\n * The service to point mention matches to. See {@link Autolinker#mention}\n * for available values.\n */\n _this.serviceName = 'twitter'; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {String} mention (required)\n *\n * The Mention that was matched, without the '@' character.\n */\n _this.mention = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n _this.mention = cfg.mention;\n _this.serviceName = cfg.serviceName;\n return _this;\n }\n /**\n * Returns a string name for the type of match that this class represents.\n * For the case of MentionMatch, returns 'mention'.\n *\n * @return {String}\n */\n MentionMatch.prototype.getType = function () {\n return 'mention';\n };\n /**\n * Returns the mention, without the '@' character.\n *\n * @return {String}\n */\n MentionMatch.prototype.getMention = function () {\n return this.mention;\n };\n /**\n * Returns the configured {@link #serviceName} to point the mention to.\n * Ex: 'instagram', 'twitter', 'soundcloud'.\n *\n * @return {String}\n */\n MentionMatch.prototype.getServiceName = function () {\n return this.serviceName;\n };\n /**\n * Returns the anchor href that should be generated for the match.\n *\n * @return {String}\n */\n MentionMatch.prototype.getAnchorHref = function () {\n switch (this.serviceName) {\n case 'twitter':\n return 'https://twitter.com/' + this.mention;\n case 'instagram':\n return 'https://instagram.com/' + this.mention;\n case 'soundcloud':\n return 'https://soundcloud.com/' + this.mention;\n case 'tiktok':\n return 'https://www.tiktok.com/@' + this.mention;\n default:\n // Shouldn't happen because Autolinker's constructor should block any invalid values, but just in case.\n throw new Error('Unknown service name to point mention to: ' + this.serviceName);\n }\n };\n /**\n * Returns the anchor text that should be generated for the match.\n *\n * @return {String}\n */\n MentionMatch.prototype.getAnchorText = function () {\n return '@' + this.mention;\n };\n /**\n * Returns the CSS class suffixes that should be used on a tag built with\n * the match. See {@link Autolinker.match.Match#getCssClassSuffixes} for\n * details.\n *\n * @return {String[]}\n */\n MentionMatch.prototype.getCssClassSuffixes = function () {\n var cssClassSuffixes = _super.prototype.getCssClassSuffixes.call(this),\n serviceName = this.getServiceName();\n if (serviceName) {\n cssClassSuffixes.push(serviceName);\n }\n return cssClassSuffixes;\n };\n return MentionMatch;\n}(Match);\nexport { MentionMatch };\n","import { __extends } from \"tslib\";\nimport { Match } from './match';\n/**\n * @class Autolinker.match.Phone\n * @extends Autolinker.match.Match\n *\n * Represents a Phone number match found in an input string which should be\n * Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more\n * details.\n */\nvar PhoneMatch = /** @class */function (_super) {\n __extends(PhoneMatch, _super);\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match\n * instance, specified in an Object (map).\n */\n function PhoneMatch(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @protected\n * @property {String} number (required)\n *\n * The phone number that was matched, without any delimiter characters.\n *\n * Note: This is a string to allow for prefixed 0's.\n */\n _this.number = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @protected\n * @property {Boolean} plusSign (required)\n *\n * `true` if the matched phone number started with a '+' sign. We'll include\n * it in the `tel:` URL if so, as this is needed for international numbers.\n *\n * Ex: '+1 (123) 456 7879'\n */\n _this.plusSign = false; // default value just to get the above doc comment in the ES5 output and documentation generator\n _this.number = cfg.number;\n _this.plusSign = cfg.plusSign;\n return _this;\n }\n /**\n * Returns a string name for the type of match that this class represents.\n * For the case of PhoneMatch, returns 'phone'.\n *\n * @return {String}\n */\n PhoneMatch.prototype.getType = function () {\n return 'phone';\n };\n /**\n * Returns the phone number that was matched as a string, without any\n * delimiter characters.\n *\n * Note: This is a string to allow for prefixed 0's.\n *\n * @return {String}\n */\n PhoneMatch.prototype.getPhoneNumber = function () {\n return this.number;\n };\n /**\n * Alias of {@link #getPhoneNumber}, returns the phone number that was\n * matched as a string, without any delimiter characters.\n *\n * Note: This is a string to allow for prefixed 0's.\n *\n * @return {String}\n */\n PhoneMatch.prototype.getNumber = function () {\n return this.getPhoneNumber();\n };\n /**\n * Returns the anchor href that should be generated for the match.\n *\n * @return {String}\n */\n PhoneMatch.prototype.getAnchorHref = function () {\n return 'tel:' + (this.plusSign ? '+' : '') + this.number;\n };\n /**\n * Returns the anchor text that should be generated for the match.\n *\n * @return {String}\n */\n PhoneMatch.prototype.getAnchorText = function () {\n return this.matchedText;\n };\n return PhoneMatch;\n}(Match);\nexport { PhoneMatch };\n","import { __extends } from \"tslib\";\nimport { Match } from './match';\n/**\n * @class Autolinker.match.Url\n * @extends Autolinker.match.Match\n *\n * Represents a Url match found in an input string which should be Autolinked.\n *\n * See this class's superclass ({@link Autolinker.match.Match}) for more details.\n */\nvar UrlMatch = /** @class */function (_super) {\n __extends(UrlMatch, _super);\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match\n * instance, specified in an Object (map).\n */\n function UrlMatch(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @cfg {String} url (required)\n *\n * The url that was matched.\n */\n _this.url = ''; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {\"scheme\"/\"www\"/\"tld\"} urlMatchType (required)\n *\n * The type of URL match that this class represents. This helps to determine\n * if the match was made in the original text with a prefixed scheme (ex:\n * 'http://www.google.com'), a prefixed 'www' (ex: 'www.google.com'), or\n * was matched by a known top-level domain (ex: 'google.com').\n */\n _this.urlMatchType = 'scheme'; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Boolean} protocolUrlMatch (required)\n *\n * `true` if the URL is a match which already has a protocol (i.e.\n * 'http://'), `false` if the match was from a 'www' or known TLD match.\n */\n _this.protocolUrlMatch = false; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Boolean} protocolRelativeMatch (required)\n *\n * `true` if the URL is a protocol-relative match. A protocol-relative match\n * is a URL that starts with '//', and will be either http:// or https://\n * based on the protocol that the site is loaded under.\n */\n _this.protocolRelativeMatch = false; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Object} stripPrefix (required)\n *\n * The Object form of {@link Autolinker#cfg-stripPrefix}.\n */\n _this.stripPrefix = {\n scheme: true,\n www: true\n }; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Boolean} stripTrailingSlash (required)\n * @inheritdoc Autolinker#cfg-stripTrailingSlash\n */\n _this.stripTrailingSlash = true; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Boolean} decodePercentEncoding (required)\n * @inheritdoc Autolinker#cfg-decodePercentEncoding\n */\n _this.decodePercentEncoding = true; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @private\n * @property {RegExp} schemePrefixRegex\n *\n * A regular expression used to remove the 'http://' or 'https://' from\n * URLs.\n */\n _this.schemePrefixRegex = /^(https?:\\/\\/)?/i;\n /**\n * @private\n * @property {RegExp} wwwPrefixRegex\n *\n * A regular expression used to remove the 'www.' from URLs.\n */\n _this.wwwPrefixRegex = /^(https?:\\/\\/)?(www\\.)?/i;\n /**\n * @private\n * @property {RegExp} protocolRelativeRegex\n *\n * The regular expression used to remove the protocol-relative '//' from the {@link #url} string, for purposes\n * of {@link #getAnchorText}. A protocol-relative URL is, for example, \"//yahoo.com\"\n */\n _this.protocolRelativeRegex = /^\\/\\//;\n /**\n * @private\n * @property {Boolean} protocolPrepended\n *\n * Will be set to `true` if the 'http://' protocol has been prepended to the {@link #url} (because the\n * {@link #url} did not have a protocol)\n */\n _this.protocolPrepended = false;\n _this.urlMatchType = cfg.urlMatchType;\n _this.url = cfg.url;\n _this.protocolUrlMatch = cfg.protocolUrlMatch;\n _this.protocolRelativeMatch = cfg.protocolRelativeMatch;\n _this.stripPrefix = cfg.stripPrefix;\n _this.stripTrailingSlash = cfg.stripTrailingSlash;\n _this.decodePercentEncoding = cfg.decodePercentEncoding;\n return _this;\n }\n /**\n * Returns a string name for the type of match that this class represents.\n * For the case of UrlMatch, returns 'url'.\n *\n * @return {String}\n */\n UrlMatch.prototype.getType = function () {\n return 'url';\n };\n /**\n * Returns a string name for the type of URL match that this class\n * represents.\n *\n * This helps to determine if the match was made in the original text with a\n * prefixed scheme (ex: 'http://www.google.com'), a prefixed 'www' (ex:\n * 'www.google.com'), or was matched by a known top-level domain (ex:\n * 'google.com').\n *\n * @return {\"scheme\"/\"www\"/\"tld\"}\n */\n UrlMatch.prototype.getUrlMatchType = function () {\n return this.urlMatchType;\n };\n /**\n * Returns the url that was matched, assuming the protocol to be 'http://' if the original\n * match was missing a protocol.\n *\n * @return {String}\n */\n UrlMatch.prototype.getUrl = function () {\n var url = this.url;\n // if the url string doesn't begin with a protocol, assume 'http://'\n if (!this.protocolRelativeMatch && !this.protocolUrlMatch && !this.protocolPrepended) {\n url = this.url = 'http://' + url;\n this.protocolPrepended = true;\n }\n return url;\n };\n /**\n * Returns the anchor href that should be generated for the match.\n *\n * @return {String}\n */\n UrlMatch.prototype.getAnchorHref = function () {\n var url = this.getUrl();\n return url.replace(/&/g, '&'); // any &'s in the URL should be converted back to '&' if they were displayed as & in the source html\n };\n /**\n * Returns the anchor text that should be generated for the match.\n *\n * @return {String}\n */\n UrlMatch.prototype.getAnchorText = function () {\n var anchorText = this.getMatchedText();\n if (this.protocolRelativeMatch) {\n // Strip off any protocol-relative '//' from the anchor text\n anchorText = this.stripProtocolRelativePrefix(anchorText);\n }\n if (this.stripPrefix.scheme) {\n anchorText = this.stripSchemePrefix(anchorText);\n }\n if (this.stripPrefix.www) {\n anchorText = this.stripWwwPrefix(anchorText);\n }\n if (this.stripTrailingSlash) {\n anchorText = this.removeTrailingSlash(anchorText); // remove trailing slash, if there is one\n }\n if (this.decodePercentEncoding) {\n anchorText = this.removePercentEncoding(anchorText);\n }\n return anchorText;\n };\n // ---------------------------------------\n // Utility Functionality\n /**\n * Strips the scheme prefix (such as \"http://\" or \"https://\") from the given\n * `url`.\n *\n * @private\n * @param {String} url The text of the anchor that is being generated, for\n * which to strip off the url scheme.\n * @return {String} The `url`, with the scheme stripped.\n */\n UrlMatch.prototype.stripSchemePrefix = function (url) {\n return url.replace(this.schemePrefixRegex, '');\n };\n /**\n * Strips the 'www' prefix from the given `url`.\n *\n * @private\n * @param {String} url The text of the anchor that is being generated, for\n * which to strip off the 'www' if it exists.\n * @return {String} The `url`, with the 'www' stripped.\n */\n UrlMatch.prototype.stripWwwPrefix = function (url) {\n return url.replace(this.wwwPrefixRegex, '$1'); // leave any scheme ($1), it one exists\n };\n /**\n * Strips any protocol-relative '//' from the anchor text.\n *\n * @private\n * @param {String} text The text of the anchor that is being generated, for which to strip off the\n * protocol-relative prefix (such as stripping off \"//\")\n * @return {String} The `anchorText`, with the protocol-relative prefix stripped.\n */\n UrlMatch.prototype.stripProtocolRelativePrefix = function (text) {\n return text.replace(this.protocolRelativeRegex, '');\n };\n /**\n * Removes any trailing slash from the given `anchorText`, in preparation for the text to be displayed.\n *\n * @private\n * @param {String} anchorText The text of the anchor that is being generated, for which to remove any trailing\n * slash ('/') that may exist.\n * @return {String} The `anchorText`, with the trailing slash removed.\n */\n UrlMatch.prototype.removeTrailingSlash = function (anchorText) {\n if (anchorText.charAt(anchorText.length - 1) === '/') {\n anchorText = anchorText.slice(0, -1);\n }\n return anchorText;\n };\n /**\n * Decodes percent-encoded characters from the given `anchorText`, in\n * preparation for the text to be displayed.\n *\n * @private\n * @param {String} anchorText The text of the anchor that is being\n * generated, for which to decode any percent-encoded characters.\n * @return {String} The `anchorText`, with the percent-encoded characters\n * decoded.\n */\n UrlMatch.prototype.removePercentEncoding = function (anchorText) {\n // First, convert a few of the known % encodings to the corresponding\n // HTML entities that could accidentally be interpretted as special\n // HTML characters\n var preProcessedEntityAnchorText = anchorText.replace(/%22/gi, '"') // \" char\n .replace(/%26/gi, '&') // & char\n .replace(/%27/gi, ''') // ' char\n .replace(/%3C/gi, '<') // < char\n .replace(/%3E/gi, '>'); // > char\n try {\n // Now attempt to decode the rest of the anchor text\n return decodeURIComponent(preProcessedEntityAnchorText);\n } catch (e) {\n // Invalid % escape sequence in the anchor text\n return preProcessedEntityAnchorText;\n }\n };\n return UrlMatch;\n}(Match);\nexport { UrlMatch };\n","/**\n * @abstract\n * @class Autolinker.matcher.Matcher\n *\n * An abstract class and interface for individual matchers to find matches in\n * an input string with linkified versions of them.\n *\n * Note that Matchers do not take HTML into account - they must be fed the text\n * nodes of any HTML string, which is handled by {@link Autolinker#parse}.\n */\nvar Matcher = /** @class */function () {\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Matcher\n * instance, specified in an Object (map).\n */\n function Matcher(cfg) {\n /**\n * @cfg {Autolinker.AnchorTagBuilder} tagBuilder (required)\n *\n * Reference to the AnchorTagBuilder instance to use to generate HTML tags\n * for {@link Autolinker.match.Match Matches}.\n */\n // @ts-ignore\n this.__jsduckDummyDocProp = null; // property used just to get the above doc comment into the ES5 output and documentation generator\n this.tagBuilder = cfg.tagBuilder;\n }\n return Matcher;\n}();\nexport { Matcher };\n","/*\n * This file builds and stores a library of the common regular expressions used\n * by the Autolinker utility.\n *\n * Other regular expressions may exist ad-hoc, but these are generally the\n * regular expressions that are shared between source files.\n */\n/**\n * Regular expression to match upper and lowercase ASCII letters\n */\nexport var letterRe = /[A-Za-z]/;\n/**\n * Regular expression to match ASCII digits\n */\nexport var digitRe = /[\\d]/;\n/**\n * Regular expression to match everything *except* ASCII digits\n */\nexport var nonDigitRe = /[\\D]/;\n/**\n * Regular expression to match whitespace\n */\nexport var whitespaceRe = /\\s/;\n/**\n * Regular expression to match quote characters\n */\nexport var quoteRe = /['\"]/;\n/**\n * Regular expression to match the range of ASCII control characters (0-31), and\n * the backspace char (127)\n */\nexport var controlCharsRe = /[\\x00-\\x1F\\x7F]/;\n/**\n * The string form of a regular expression that would match all of the\n * alphabetic (\"letter\") chars in the unicode character set when placed in a\n * RegExp character class (`[]`). This includes all international alphabetic\n * characters.\n *\n * These would be the characters matched by unicode regex engines `\\p{L}`\n * escape (\"all letters\").\n *\n * Taken from the XRegExp library: http://xregexp.com/ (thanks @https://github.com/slevithan)\n * Specifically: http://xregexp.com/v/3.2.0/xregexp-all.js, the 'Letter'\n * regex's bmp\n *\n * VERY IMPORTANT: This set of characters is defined inside of a Regular\n * Expression literal rather than a string literal to prevent UglifyJS from\n * compressing the unicode escape sequences into their actual unicode\n * characters. If Uglify compresses these into the unicode characters\n * themselves, this results in the error \"Range out of order in character\n * class\" when these characters are used inside of a Regular Expression\n * character class (`[]`). See usages of this const. Alternatively, we can set\n * the UglifyJS option `ascii_only` to true for the build, but that doesn't\n * help others who are pulling in Autolinker into their own build and running\n * UglifyJS themselves.\n */\n// prettier-ignore\nexport var alphaCharsStr = /A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC/.source; // see note in above variable description\n/**\n * The string form of a regular expression that would match all emoji characters\n * Based on the emoji regex defined in this article: https://thekevinscott.com/emojis-in-javascript/\n */\nexport var emojiStr = /\\u2700-\\u27bf\\udde6-\\uddff\\ud800-\\udbff\\udc00-\\udfff\\ufe0e\\ufe0f\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ud83c\\udffb-\\udfff\\u200d\\u3299\\u3297\\u303d\\u3030\\u24c2\\ud83c\\udd70-\\udd71\\udd7e-\\udd7f\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01-\\ude02\\ude1a\\ude2f\\ude32-\\ude3a\\ude50-\\ude51\\u203c\\u2049\\u25aa-\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u00a9\\u00ae\\u2122\\u2139\\udc04\\u2600-\\u26FF\\u2b05\\u2b06\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u231a\\u231b\\u2328\\u23cf\\u23e9-\\u23f3\\u23f8-\\u23fa\\udccf\\u2935\\u2934\\u2190-\\u21ff/.source;\n/**\n * The string form of a regular expression that would match all of the\n * combining mark characters in the unicode character set when placed in a\n * RegExp character class (`[]`).\n *\n * These would be the characters matched by unicode regex engines `\\p{M}`\n * escape (\"all marks\").\n *\n * Taken from the XRegExp library: http://xregexp.com/ (thanks @https://github.com/slevithan)\n * Specifically: http://xregexp.com/v/3.2.0/xregexp-all.js, the 'Mark'\n * regex's bmp\n *\n * VERY IMPORTANT: This set of characters is defined inside of a Regular\n * Expression literal rather than a string literal to prevent UglifyJS from\n * compressing the unicode escape sequences into their actual unicode\n * characters. If Uglify compresses these into the unicode characters\n * themselves, this results in the error \"Range out of order in character\n * class\" when these characters are used inside of a Regular Expression\n * character class (`[]`). See usages of this const. Alternatively, we can set\n * the UglifyJS option `ascii_only` to true for the build, but that doesn't\n * help others who are pulling in Autolinker into their own build and running\n * UglifyJS themselves.\n */\n// prettier-ignore\nexport var marksStr = /\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D4-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F/.source; // see note in above variable description\n/**\n * The string form of a regular expression that would match all of the\n * alphabetic (\"letter\") chars, emoji, and combining marks in the unicode character set\n * when placed in a RegExp character class (`[]`). This includes all\n * international alphabetic characters.\n *\n * These would be the characters matched by unicode regex engines `\\p{L}\\p{M}`\n * escapes and emoji characters.\n */\nexport var alphaCharsAndMarksStr = alphaCharsStr + emojiStr + marksStr;\n/**\n * The string form of a regular expression that would match all of the\n * decimal number chars in the unicode character set when placed in a RegExp\n * character class (`[]`).\n *\n * These would be the characters matched by unicode regex engines `\\p{Nd}`\n * escape (\"all decimal numbers\")\n *\n * Taken from the XRegExp library: http://xregexp.com/ (thanks @https://github.com/slevithan)\n * Specifically: http://xregexp.com/v/3.2.0/xregexp-all.js, the 'Decimal_Number'\n * regex's bmp\n *\n * VERY IMPORTANT: This set of characters is defined inside of a Regular\n * Expression literal rather than a string literal to prevent UglifyJS from\n * compressing the unicode escape sequences into their actual unicode\n * characters. If Uglify compresses these into the unicode characters\n * themselves, this results in the error \"Range out of order in character\n * class\" when these characters are used inside of a Regular Expression\n * character class (`[]`). See usages of this const. Alternatively, we can set\n * the UglifyJS option `ascii_only` to true for the build, but that doesn't\n * help others who are pulling in Autolinker into their own build and running\n * UglifyJS themselves.\n */\n// prettier-ignore\nexport var decimalNumbersStr = /0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19/.source; // see note in above variable description\n/**\n * The string form of a regular expression that would match all of the\n * letters and decimal number chars in the unicode character set when placed in\n * a RegExp character class (`[]`).\n *\n * These would be the characters matched by unicode regex engines\n * `[\\p{L}\\p{Nd}]` escape (\"all letters and decimal numbers\")\n */\nexport var alphaNumericCharsStr = alphaCharsAndMarksStr + decimalNumbersStr;\n/**\n * The string form of a regular expression that would match all of the\n * letters, combining marks, and decimal number chars in the unicode character\n * set when placed in a RegExp character class (`[]`).\n *\n * These would be the characters matched by unicode regex engines\n * `[\\p{L}\\p{M}\\p{Nd}]` escape (\"all letters, combining marks, and decimal\n * numbers\")\n */\nexport var alphaNumericAndMarksCharsStr = alphaCharsAndMarksStr + decimalNumbersStr;\n/**\n * The regular expression that will match a single letter of the\n * {@link #alphaNumericAndMarksCharsStr}.\n */\nexport var alphaNumericAndMarksCharRe = new RegExp(\"[\".concat(alphaNumericAndMarksCharsStr, \"]\"));\n// Simplified IP regular expression\nvar ipStr = '(?:[' + decimalNumbersStr + ']{1,3}\\\\.){3}[' + decimalNumbersStr + ']{1,3}';\n// Protected domain label which do not allow \"-\" or \"_\" character on the beginning and the end of a single label\n// prettier-ignore\nvar domainLabelStr = '[' + alphaNumericAndMarksCharsStr + '](?:[' + alphaNumericAndMarksCharsStr + '\\\\-_]{0,61}[' + alphaNumericAndMarksCharsStr + '])?';\nvar getDomainLabelStr = function (group) {\n return '(?=(' + domainLabelStr + '))\\\\' + group;\n};\n/**\n * A function to match domain names of a URL or email address.\n * Ex: 'google', 'yahoo', 'some-other-company', etc.\n */\n// prettier-ignore\nexport var getDomainNameStr = function (group) {\n return '(?:' + getDomainLabelStr(group) + '(?:\\\\.' + getDomainLabelStr(group + 1) + '){0,126}|' + ipStr + ')';\n};\n/**\n * A regular expression to match domain names of a URL or email address.\n * Ex: 'google', 'yahoo', 'some-other-company', etc.\n */\nexport var domainNameRegex = new RegExp('[' + alphaNumericAndMarksCharsStr + '.\\\\-]*[' + alphaNumericAndMarksCharsStr + '\\\\-]');\n/**\n * A regular expression that is simply the character class of the characters\n * that may be used in a domain name, minus the '-' or '.'\n */\nexport var domainNameCharRegex = alphaNumericAndMarksCharRe;\n","// NOTE: THIS IS A GENERATED FILE\n// To update with the latest TLD list, run `npm run update-tld-regex`\nexport var tldRegex = /(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/;\n","import { __assign, __extends } from \"tslib\";\nimport { Matcher } from './matcher';\nimport { alphaNumericAndMarksCharsStr, domainNameCharRegex } from '../regex-lib';\nimport { EmailMatch } from '../match/email-match';\nimport { throwUnhandledCaseError } from '../utils';\nimport { tldRegex } from './tld-regex';\n// For debugging: search for other \"For debugging\" lines\n// import CliTable from 'cli-table';\n// RegExp objects which are shared by all instances of EmailMatcher. These are\n// here to avoid re-instantiating the RegExp objects if `Autolinker.link()` is\n// called multiple times, thus instantiating EmailMatcher and its RegExp\n// objects each time (which is very expensive - see https://github.com/gregjacobs/Autolinker.js/issues/314).\n// See descriptions of the properties where they are used for details about them\nvar localPartCharRegex = new RegExp(\"[\".concat(alphaNumericAndMarksCharsStr, \"!#$%&'*+/=?^_`{|}~-]\"));\nvar strictTldRegex = new RegExp(\"^\".concat(tldRegex.source, \"$\"));\n/**\n * @class Autolinker.matcher.Email\n * @extends Autolinker.matcher.Matcher\n *\n * Matcher to find email matches in an input string.\n *\n * See this class's superclass ({@link Autolinker.matcher.Matcher}) for more details.\n */\nvar EmailMatcher = /** @class */function (_super) {\n __extends(EmailMatcher, _super);\n function EmailMatcher() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Valid characters that can be used in the \"local\" part of an email address,\n * i.e. the \"name\" part of \"name@site.com\"\n */\n _this.localPartCharRegex = localPartCharRegex;\n /**\n * Stricter TLD regex which adds a beginning and end check to ensure\n * the string is a valid TLD\n */\n _this.strictTldRegex = strictTldRegex;\n return _this;\n }\n /**\n * @inheritdoc\n */\n EmailMatcher.prototype.parseMatches = function (text) {\n var tagBuilder = this.tagBuilder,\n localPartCharRegex = this.localPartCharRegex,\n strictTldRegex = this.strictTldRegex,\n matches = [],\n len = text.length,\n noCurrentEmailMatch = new CurrentEmailMatch();\n // for matching a 'mailto:' prefix\n var mailtoTransitions = {\n m: 'a',\n a: 'i',\n i: 'l',\n l: 't',\n t: 'o',\n o: ':'\n };\n var charIdx = 0,\n state = 0 /* NonEmailMatch */,\n currentEmailMatch = noCurrentEmailMatch;\n // For debugging: search for other \"For debugging\" lines\n // const table = new CliTable( {\n // \thead: [ 'charIdx', 'char', 'state', 'charIdx', 'currentEmailAddress.idx', 'hasDomainDot' ]\n // } );\n while (charIdx < len) {\n var char = text.charAt(charIdx);\n // For debugging: search for other \"For debugging\" lines\n // table.push(\n // \t[ charIdx, char, State[ state ], charIdx, currentEmailAddress.idx, currentEmailAddress.hasDomainDot ]\n // );\n switch (state) {\n case 0 /* NonEmailMatch */:\n stateNonEmailAddress(char);\n break;\n case 1 /* Mailto */:\n stateMailTo(text.charAt(charIdx - 1), char);\n break;\n case 2 /* LocalPart */:\n stateLocalPart(char);\n break;\n case 3 /* LocalPartDot */:\n stateLocalPartDot(char);\n break;\n case 4 /* AtSign */:\n stateAtSign(char);\n break;\n case 5 /* DomainChar */:\n stateDomainChar(char);\n break;\n case 6 /* DomainHyphen */:\n stateDomainHyphen(char);\n break;\n case 7 /* DomainDot */:\n stateDomainDot(char);\n break;\n default:\n throwUnhandledCaseError(state);\n }\n // For debugging: search for other \"For debugging\" lines\n // table.push(\n // \t[ charIdx, char, State[ state ], charIdx, currentEmailAddress.idx, currentEmailAddress.hasDomainDot ]\n // );\n charIdx++;\n }\n // Capture any valid match at the end of the string\n captureMatchIfValidAndReset();\n // For debugging: search for other \"For debugging\" lines\n //console.log( '\\n' + table.toString() );\n return matches;\n // Handles the state when we're not in an email address\n function stateNonEmailAddress(char) {\n if (char === 'm') {\n beginEmailMatch(1 /* Mailto */);\n } else if (localPartCharRegex.test(char)) {\n beginEmailMatch();\n } else {\n // not an email address character, continue\n }\n }\n // Handles if we're reading a 'mailto:' prefix on the string\n function stateMailTo(prevChar, char) {\n if (prevChar === ':') {\n // We've reached the end of the 'mailto:' prefix\n if (localPartCharRegex.test(char)) {\n state = 2 /* LocalPart */;\n currentEmailMatch = new CurrentEmailMatch(__assign(__assign({}, currentEmailMatch), {\n hasMailtoPrefix: true\n }));\n } else {\n // we've matched 'mailto:' but didn't get anything meaningful\n // immediately afterwards (for example, we encountered a\n // space character, or an '@' character which formed 'mailto:@'\n resetToNonEmailMatchState();\n }\n } else if (mailtoTransitions[prevChar] === char) {\n // We're currently reading the 'mailto:' prefix, stay in\n // Mailto state\n } else if (localPartCharRegex.test(char)) {\n // We we're reading a prefix of 'mailto:', but encountered a\n // different character that didn't continue the prefix\n state = 2 /* LocalPart */;\n } else if (char === '.') {\n // We we're reading a prefix of 'mailto:', but encountered a\n // dot character\n state = 3 /* LocalPartDot */;\n } else if (char === '@') {\n // We we're reading a prefix of 'mailto:', but encountered a\n // an @ character\n state = 4 /* AtSign */;\n } else {\n // not an email address character, return to \"NonEmailAddress\" state\n resetToNonEmailMatchState();\n }\n }\n // Handles the state when we're currently in the \"local part\" of an\n // email address (as opposed to the \"domain part\")\n function stateLocalPart(char) {\n if (char === '.') {\n state = 3 /* LocalPartDot */;\n } else if (char === '@') {\n state = 4 /* AtSign */;\n } else if (localPartCharRegex.test(char)) {\n // stay in the \"local part\" of the email address\n } else {\n // not an email address character, return to \"NonEmailAddress\" state\n resetToNonEmailMatchState();\n }\n }\n // Handles the state where we've read\n function stateLocalPartDot(char) {\n if (char === '.') {\n // We read a second '.' in a row, not a valid email address\n // local part\n resetToNonEmailMatchState();\n } else if (char === '@') {\n // We read the '@' character immediately after a dot ('.'), not\n // an email address\n resetToNonEmailMatchState();\n } else if (localPartCharRegex.test(char)) {\n state = 2 /* LocalPart */;\n } else {\n // Anything else, not an email address\n resetToNonEmailMatchState();\n }\n }\n function stateAtSign(char) {\n if (domainNameCharRegex.test(char)) {\n state = 5 /* DomainChar */;\n } else {\n // Anything else, not an email address\n resetToNonEmailMatchState();\n }\n }\n function stateDomainChar(char) {\n if (char === '.') {\n state = 7 /* DomainDot */;\n } else if (char === '-') {\n state = 6 /* DomainHyphen */;\n } else if (domainNameCharRegex.test(char)) {\n // Stay in the DomainChar state\n } else {\n // Anything else, we potentially matched if the criteria has\n // been met\n captureMatchIfValidAndReset();\n }\n }\n function stateDomainHyphen(char) {\n if (char === '-' || char === '.') {\n // Not valid to have two hyphens (\"--\") or hypen+dot (\"-.\")\n captureMatchIfValidAndReset();\n } else if (domainNameCharRegex.test(char)) {\n state = 5 /* DomainChar */;\n } else {\n // Anything else\n captureMatchIfValidAndReset();\n }\n }\n function stateDomainDot(char) {\n if (char === '.' || char === '-') {\n // not valid to have two dots (\"..\") or dot+hypen (\".-\")\n captureMatchIfValidAndReset();\n } else if (domainNameCharRegex.test(char)) {\n state = 5 /* DomainChar */;\n // After having read a '.' and then a valid domain character,\n // we now know that the domain part of the email is valid, and\n // we have found at least a partial EmailMatch (however, the\n // email address may have additional characters from this point)\n currentEmailMatch = new CurrentEmailMatch(__assign(__assign({}, currentEmailMatch), {\n hasDomainDot: true\n }));\n } else {\n // Anything else\n captureMatchIfValidAndReset();\n }\n }\n function beginEmailMatch(newState) {\n if (newState === void 0) {\n newState = 2 /* LocalPart */;\n }\n state = newState;\n currentEmailMatch = new CurrentEmailMatch({\n idx: charIdx\n });\n }\n function resetToNonEmailMatchState() {\n state = 0 /* NonEmailMatch */;\n currentEmailMatch = noCurrentEmailMatch;\n }\n /*\n * Captures the current email address as an EmailMatch if it's valid,\n * and resets the state to read another email address.\n */\n function captureMatchIfValidAndReset() {\n if (currentEmailMatch.hasDomainDot) {\n // we need at least one dot in the domain to be considered a valid email address\n var matchedText = text.slice(currentEmailMatch.idx, charIdx);\n // If we read a '.' or '-' char that ended the email address\n // (valid domain name characters, but only valid email address\n // characters if they are followed by something else), strip\n // it off now\n if (/[-.]$/.test(matchedText)) {\n matchedText = matchedText.slice(0, -1);\n }\n var emailAddress = currentEmailMatch.hasMailtoPrefix ? matchedText.slice('mailto:'.length) : matchedText;\n // if the email address has a valid TLD, add it to the list of matches\n if (doesEmailHaveValidTld(emailAddress)) {\n matches.push(new EmailMatch({\n tagBuilder: tagBuilder,\n matchedText: matchedText,\n offset: currentEmailMatch.idx,\n email: emailAddress\n }));\n }\n }\n resetToNonEmailMatchState();\n /**\n * Determines if the given email address has a valid TLD or not\n * @param {string} emailAddress - email address\n * @return {Boolean} - true is email have valid TLD, false otherwise\n */\n function doesEmailHaveValidTld(emailAddress) {\n var emailAddressTld = emailAddress.split('.').pop() || '';\n var emailAddressNormalized = emailAddressTld.toLowerCase();\n var isValidTld = strictTldRegex.test(emailAddressNormalized);\n return isValidTld;\n }\n }\n };\n return EmailMatcher;\n}(Matcher);\nexport { EmailMatcher };\nvar CurrentEmailMatch = /** @class */function () {\n function CurrentEmailMatch(cfg) {\n if (cfg === void 0) {\n cfg = {};\n }\n this.idx = cfg.idx !== undefined ? cfg.idx : -1;\n this.hasMailtoPrefix = !!cfg.hasMailtoPrefix;\n this.hasDomainDot = !!cfg.hasDomainDot;\n }\n return CurrentEmailMatch;\n}();\n","import { alphaCharsStr } from '../regex-lib';\n/**\n * @private\n * @class Autolinker.matcher.UrlMatchValidator\n * @singleton\n *\n * Used by Autolinker to filter out false URL positives from the\n * {@link Autolinker.matcher.Url UrlMatcher}.\n *\n * Due to the limitations of regular expressions (including the missing feature\n * of look-behinds in JS regular expressions), we cannot always determine the\n * validity of a given match. This class applies a bit of additional logic to\n * filter out any false positives that have been matched by the\n * {@link Autolinker.matcher.Url UrlMatcher}.\n */\nvar UrlMatchValidator = /** @class */function () {\n function UrlMatchValidator() {}\n /**\n * Determines if a given URL match found by the {@link Autolinker.matcher.Url UrlMatcher}\n * is valid. Will return `false` for:\n *\n * 1) URL matches which do not have at least have one period ('.') in the\n * domain name (effectively skipping over matches like \"abc:def\").\n * However, URL matches with a protocol will be allowed (ex: 'http://localhost')\n * 2) URL matches which do not have at least one word character in the\n * domain name (effectively skipping over matches like \"git:1.0\").\n * However, URL matches with a protocol will be allowed (ex: 'intra-net://271219.76')\n * 3) A protocol-relative url match (a URL beginning with '//') whose\n * previous character is a word character (effectively skipping over\n * strings like \"abc//google.com\")\n *\n * Otherwise, returns `true`.\n *\n * @param {String} urlMatch The matched URL, if there was one. Will be an\n * empty string if the match is not a URL match.\n * @param {String} protocolUrlMatch The match URL string for a protocol\n * match. Ex: 'http://yahoo.com'. This is used to match something like\n * 'http://localhost', where we won't double check that the domain name\n * has at least one '.' in it.\n * @return {Boolean} `true` if the match given is valid and should be\n * processed, or `false` if the match is invalid and/or should just not be\n * processed.\n */\n UrlMatchValidator.isValid = function (urlMatch, protocolUrlMatch) {\n if (protocolUrlMatch && !this.isValidUriScheme(protocolUrlMatch) || this.urlMatchDoesNotHaveProtocolOrDot(urlMatch, protocolUrlMatch) ||\n // At least one period ('.') must exist in the URL match for us to consider it an actual URL, *unless* it was a full protocol match (like 'http://localhost')\n this.urlMatchDoesNotHaveAtLeastOneWordChar(urlMatch, protocolUrlMatch) &&\n // At least one letter character must exist in the domain name after a protocol match. Ex: skip over something like \"git:1.0\"\n !this.isValidIpAddress(urlMatch) ||\n // Except if it's an IP address\n this.containsMultipleDots(urlMatch)) {\n return false;\n }\n return true;\n };\n UrlMatchValidator.isValidIpAddress = function (uriSchemeMatch) {\n var newRegex = new RegExp(this.hasFullProtocolRegex.source + this.ipRegex.source);\n var uriScheme = uriSchemeMatch.match(newRegex);\n return uriScheme !== null;\n };\n UrlMatchValidator.containsMultipleDots = function (urlMatch) {\n var stringBeforeSlash = urlMatch;\n if (this.hasFullProtocolRegex.test(urlMatch)) {\n stringBeforeSlash = urlMatch.split('://')[1];\n }\n return stringBeforeSlash.split('/')[0].indexOf('..') > -1;\n };\n /**\n * Determines if the URI scheme is a valid scheme to be autolinked. Returns\n * `false` if the scheme is 'javascript:' or 'vbscript:'\n *\n * @private\n * @param {String} uriSchemeMatch The match URL string for a full URI scheme\n * match. Ex: 'http://yahoo.com' or 'mailto:a@a.com'.\n * @return {Boolean} `true` if the scheme is a valid one, `false` otherwise.\n */\n UrlMatchValidator.isValidUriScheme = function (uriSchemeMatch) {\n var uriSchemeMatchArr = uriSchemeMatch.match(this.uriSchemeRegex),\n uriScheme = uriSchemeMatchArr && uriSchemeMatchArr[0].toLowerCase();\n return uriScheme !== 'javascript:' && uriScheme !== 'vbscript:';\n };\n /**\n * Determines if a URL match does not have either:\n *\n * a) a full protocol (i.e. 'http://'), or\n * b) at least one dot ('.') in the domain name (for a non-full-protocol\n * match).\n *\n * Either situation is considered an invalid URL (ex: 'git:d' does not have\n * either the '://' part, or at least one dot in the domain name. If the\n * match was 'git:abc.com', we would consider this valid.)\n *\n * @private\n * @param {String} urlMatch The matched URL, if there was one. Will be an\n * empty string if the match is not a URL match.\n * @param {String} protocolUrlMatch The match URL string for a protocol\n * match. Ex: 'http://yahoo.com'. This is used to match something like\n * 'http://localhost', where we won't double check that the domain name\n * has at least one '.' in it.\n * @return {Boolean} `true` if the URL match does not have a full protocol,\n * or at least one dot ('.') in a non-full-protocol match.\n */\n UrlMatchValidator.urlMatchDoesNotHaveProtocolOrDot = function (urlMatch, protocolUrlMatch) {\n return !!urlMatch && (!protocolUrlMatch || !this.hasFullProtocolRegex.test(protocolUrlMatch)) && urlMatch.indexOf('.') === -1;\n };\n /**\n * Determines if a URL match does not have either:\n *\n * a) a full protocol (i.e. 'http://'), or\n * b) at least one word character after the protocol (i.e. in the domain name)\n *\n * At least one letter character must exist in the domain name after a\n * protocol match. Ex: skip over something like \"git:1.0\"\n *\n * @private\n * @param {String} urlMatch The matched URL, if there was one. Will be an\n * empty string if the match is not a URL match.\n * @param {String} protocolUrlMatch The match URL string for a protocol\n * match. Ex: 'http://yahoo.com'. This is used to know whether or not we\n * have a protocol in the URL string, in order to check for a word\n * character after the protocol separator (':').\n * @return {Boolean} `true` if the URL match does not have a full protocol, or\n * at least one word character in it, `false` otherwise.\n */\n UrlMatchValidator.urlMatchDoesNotHaveAtLeastOneWordChar = function (urlMatch, protocolUrlMatch) {\n if (urlMatch && protocolUrlMatch) {\n return !this.hasFullProtocolRegex.test(protocolUrlMatch) && !this.hasWordCharAfterProtocolRegex.test(urlMatch);\n } else {\n return false;\n }\n };\n /**\n * Regex to test for a full protocol, with the two trailing slashes. Ex: 'http://'\n *\n * @private\n * @property {RegExp} hasFullProtocolRegex\n */\n UrlMatchValidator.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\\/\\//;\n /**\n * Regex to find the URI scheme, such as 'mailto:'.\n *\n * This is used to filter out 'javascript:' and 'vbscript:' schemes.\n *\n * @private\n * @property {RegExp} uriSchemeRegex\n */\n UrlMatchValidator.uriSchemeRegex = /^[A-Za-z][-.+A-Za-z0-9]*:/;\n /**\n * Regex to determine if at least one word char exists after the protocol (i.e. after the ':')\n *\n * @private\n * @property {RegExp} hasWordCharAfterProtocolRegex\n */\n UrlMatchValidator.hasWordCharAfterProtocolRegex = new RegExp(':[^\\\\s]*?[' + alphaCharsStr + ']');\n /**\n * Regex to determine if the string is a valid IP address\n *\n * @private\n * @property {RegExp} ipRegex\n */\n UrlMatchValidator.ipRegex = /[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?(:[0-9]*)?\\/?$/;\n return UrlMatchValidator;\n}();\nexport { UrlMatchValidator };\n","import { __extends } from \"tslib\";\nimport { Matcher } from './matcher';\nimport { alphaNumericCharsStr, alphaNumericAndMarksCharsStr, getDomainNameStr } from '../regex-lib';\nimport { tldRegex } from './tld-regex';\nimport { UrlMatch } from '../match/url-match';\nimport { UrlMatchValidator } from './url-match-validator';\n// RegExp objects which are shared by all instances of UrlMatcher. These are\n// here to avoid re-instantiating the RegExp objects if `Autolinker.link()` is\n// called multiple times, thus instantiating UrlMatcher and its RegExp\n// objects each time (which is very expensive - see https://github.com/gregjacobs/Autolinker.js/issues/314).\n// See descriptions of the properties where they are used for details about them\n// prettier-ignore\nvar matcherRegex = function () {\n var schemeRegex = /(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\\/\\/)(?!\\d+\\/?)(?:\\/\\/)?)/,\n // match protocol, allow in format \"http://\" or \"mailto:\". However, do not match the first part of something like 'link:http://www.google.com' (i.e. don't match \"link:\"). Also, make sure we don't interpret 'google.com:8000' as if 'google.com' was a protocol here (i.e. ignore a trailing port number in this regex)\n wwwRegex = /(?:www\\.)/,\n // starting with 'www.'\n // Allow optional path, query string, and hash anchor, not ending in the following characters: \"?!:,.;\"\n // http://blog.codinghorror.com/the-problem-with-urls/\n urlSuffixRegex = new RegExp('[/?#](?:[' + alphaNumericAndMarksCharsStr + '\\\\-+&@#/%=~_()|\\'$*\\\\[\\\\]{}?!:,.;^\\u2713]*[' + alphaNumericAndMarksCharsStr + '\\\\-+&@#/%=~_()|\\'$*\\\\[\\\\]{}\\u2713])?');\n return new RegExp(['(?:', '(', schemeRegex.source, getDomainNameStr(2), ')', '|', '(', '(//)?', wwwRegex.source, getDomainNameStr(6), ')', '|', '(', '(//)?', getDomainNameStr(10) + '\\\\.', tldRegex.source, '(?![-' + alphaNumericCharsStr + '])', ')', ')', '(?::[0-9]+)?', '(?:' + urlSuffixRegex.source + ')?' // match for path, query string, and/or hash anchor - optional\n ].join(\"\"), 'gi');\n}();\nvar wordCharRegExp = new RegExp('[' + alphaNumericAndMarksCharsStr + ']');\n/**\n * @class Autolinker.matcher.Url\n * @extends Autolinker.matcher.Matcher\n *\n * Matcher to find URL matches in an input string.\n *\n * See this class's superclass ({@link Autolinker.matcher.Matcher}) for more details.\n */\nvar UrlMatcher = /** @class */function (_super) {\n __extends(UrlMatcher, _super);\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match instance,\n * specified in an Object (map).\n */\n function UrlMatcher(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @cfg {Object} stripPrefix (required)\n *\n * The Object form of {@link Autolinker#cfg-stripPrefix}.\n */\n _this.stripPrefix = {\n scheme: true,\n www: true\n }; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Boolean} stripTrailingSlash (required)\n * @inheritdoc Autolinker#stripTrailingSlash\n */\n _this.stripTrailingSlash = true; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @cfg {Boolean} decodePercentEncoding (required)\n * @inheritdoc Autolinker#decodePercentEncoding\n */\n _this.decodePercentEncoding = true; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * @protected\n * @property {RegExp} matcherRegex\n *\n * The regular expression to match URLs with an optional scheme, port\n * number, path, query string, and hash anchor.\n *\n * Example matches:\n *\n * http://google.com\n * www.google.com\n * google.com/path/to/file?q1=1&q2=2#myAnchor\n *\n *\n * This regular expression will have the following capturing groups:\n *\n * 1. Group that matches a scheme-prefixed URL (i.e. 'http://google.com').\n * This is used to match scheme URLs with just a single word, such as\n * 'http://localhost', where we won't double check that the domain name\n * has at least one dot ('.') in it.\n * 2. Group that matches a 'www.' prefixed URL. This is only matched if the\n * 'www.' text was not prefixed by a scheme (i.e.: not prefixed by\n * 'http://', 'ftp:', etc.)\n * 3. A protocol-relative ('//') match for the case of a 'www.' prefixed\n * URL. Will be an empty string if it is not a protocol-relative match.\n * We need to know the character before the '//' in order to determine\n * if it is a valid match or the // was in a string we don't want to\n * auto-link.\n * 4. Group that matches a known TLD (top level domain), when a scheme\n * or 'www.'-prefixed domain is not matched.\n * 5. A protocol-relative ('//') match for the case of a known TLD prefixed\n * URL. Will be an empty string if it is not a protocol-relative match.\n * See #3 for more info.\n */\n _this.matcherRegex = matcherRegex;\n /**\n * A regular expression to use to check the character before a protocol-relative\n * URL match. We don't want to match a protocol-relative URL if it is part\n * of another word.\n *\n * For example, we want to match something like \"Go to: //google.com\",\n * but we don't want to match something like \"abc//google.com\"\n *\n * This regular expression is used to test the character before the '//'.\n *\n * @protected\n * @type {RegExp} wordCharRegExp\n */\n _this.wordCharRegExp = wordCharRegExp;\n _this.stripPrefix = cfg.stripPrefix;\n _this.stripTrailingSlash = cfg.stripTrailingSlash;\n _this.decodePercentEncoding = cfg.decodePercentEncoding;\n return _this;\n }\n /**\n * @inheritdoc\n */\n UrlMatcher.prototype.parseMatches = function (text) {\n var matcherRegex = this.matcherRegex,\n stripPrefix = this.stripPrefix,\n stripTrailingSlash = this.stripTrailingSlash,\n decodePercentEncoding = this.decodePercentEncoding,\n tagBuilder = this.tagBuilder,\n matches = [],\n match;\n var _loop_1 = function () {\n var matchStr = match[0],\n schemeUrlMatch = match[1],\n wwwUrlMatch = match[4],\n wwwProtocolRelativeMatch = match[5],\n //tldUrlMatch = match[ 8 ], -- not needed at the moment\n tldProtocolRelativeMatch = match[9],\n offset = match.index,\n protocolRelativeMatch = wwwProtocolRelativeMatch || tldProtocolRelativeMatch,\n prevChar = text.charAt(offset - 1);\n if (!UrlMatchValidator.isValid(matchStr, schemeUrlMatch)) {\n return \"continue\";\n }\n // If the match is preceded by an '@' character, then it is either\n // an email address or a username. Skip these types of matches.\n if (offset > 0 && prevChar === '@') {\n return \"continue\";\n }\n // If it's a protocol-relative '//' match, but the character before the '//'\n // was a word character (i.e. a letter/number), then we found the '//' in the\n // middle of another word (such as \"asdf//asdf.com\"). In this case, skip the\n // match.\n if (offset > 0 && protocolRelativeMatch && this_1.wordCharRegExp.test(prevChar)) {\n return \"continue\";\n }\n // If the URL ends with a question mark, don't include the question\n // mark as part of the URL. We'll assume the question mark was the\n // end of a sentence, such as: \"Going to google.com?\"\n if (/\\?$/.test(matchStr)) {\n matchStr = matchStr.substr(0, matchStr.length - 1);\n }\n // Handle a closing parenthesis or square bracket at the end of the\n // match, and exclude it if there is not a matching open parenthesis\n // or square bracket in the match itself.\n if (this_1.matchHasUnbalancedClosingParen(matchStr)) {\n matchStr = matchStr.substr(0, matchStr.length - 1); // remove the trailing \")\"\n } else {\n // Handle an invalid character after the TLD\n var pos = this_1.matchHasInvalidCharAfterTld(matchStr, schemeUrlMatch);\n if (pos > -1) {\n matchStr = matchStr.substr(0, pos); // remove the trailing invalid chars\n }\n }\n // The autolinker accepts many characters in a url's scheme (like `fake://test.com`).\n // However, in cases where a URL is missing whitespace before an obvious link,\n // (for example: `nowhitespacehttp://www.test.com`), we only want the match to start\n // at the http:// part. We will check if the match contains a common scheme and then\n // shift the match to start from there.\n var foundCommonScheme = ['http://', 'https://'].find(function (commonScheme) {\n return !!schemeUrlMatch && schemeUrlMatch.indexOf(commonScheme) !== -1;\n });\n if (foundCommonScheme) {\n // If we found an overmatched URL, we want to find the index\n // of where the match should start and shift the match to\n // start from the beginning of the common scheme\n var indexOfSchemeStart = matchStr.indexOf(foundCommonScheme);\n matchStr = matchStr.substr(indexOfSchemeStart);\n schemeUrlMatch = schemeUrlMatch.substr(indexOfSchemeStart);\n offset = offset + indexOfSchemeStart;\n }\n var urlMatchType = schemeUrlMatch ? 'scheme' : wwwUrlMatch ? 'www' : 'tld',\n protocolUrlMatch = !!schemeUrlMatch;\n matches.push(new UrlMatch({\n tagBuilder: tagBuilder,\n matchedText: matchStr,\n offset: offset,\n urlMatchType: urlMatchType,\n url: matchStr,\n protocolUrlMatch: protocolUrlMatch,\n protocolRelativeMatch: !!protocolRelativeMatch,\n stripPrefix: stripPrefix,\n stripTrailingSlash: stripTrailingSlash,\n decodePercentEncoding: decodePercentEncoding\n }));\n };\n var this_1 = this;\n while ((match = matcherRegex.exec(text)) !== null) {\n _loop_1();\n }\n return matches;\n };\n /**\n * Determines if a match found has an unmatched closing parenthesis,\n * square bracket or curly bracket. If so, the symbol will be removed\n * from the match itself, and appended after the generated anchor tag.\n *\n * A match may have an extra closing parenthesis at the end of the match\n * because the regular expression must include parenthesis for URLs such as\n * \"wikipedia.com/something_(disambiguation)\", which should be auto-linked.\n *\n * However, an extra parenthesis *will* be included when the URL itself is\n * wrapped in parenthesis, such as in the case of:\n * \"(wikipedia.com/something_(disambiguation))\"\n * In this case, the last closing parenthesis should *not* be part of the\n * URL itself, and this method will return `true`.\n *\n * For square brackets in URLs such as in PHP arrays, the same behavior as\n * parenthesis discussed above should happen:\n * \"[http://www.example.com/foo.php?bar[]=1&bar[]=2&bar[]=3]\"\n * The closing square bracket should not be part of the URL itself, and this\n * method will return `true`.\n *\n * @protected\n * @param {String} matchStr The full match string from the {@link #matcherRegex}.\n * @return {Boolean} `true` if there is an unbalanced closing parenthesis or\n * square bracket at the end of the `matchStr`, `false` otherwise.\n */\n UrlMatcher.prototype.matchHasUnbalancedClosingParen = function (matchStr) {\n var endChar = matchStr.charAt(matchStr.length - 1);\n var startChar;\n if (endChar === ')') {\n startChar = '(';\n } else if (endChar === ']') {\n startChar = '[';\n } else if (endChar === '}') {\n startChar = '{';\n } else {\n return false; // not a close parenthesis or square bracket\n }\n // Find if there are the same number of open braces as close braces in\n // the URL string, minus the last character (which we have already\n // determined to be either ')', ']' or '}'\n var numOpenBraces = 0;\n for (var i = 0, len = matchStr.length - 1; i < len; i++) {\n var char = matchStr.charAt(i);\n if (char === startChar) {\n numOpenBraces++;\n } else if (char === endChar) {\n numOpenBraces = Math.max(numOpenBraces - 1, 0);\n }\n }\n // If the number of open braces matches the number of close braces in\n // the URL minus the last character, then the match has *unbalanced*\n // braces because of the last character. Example of unbalanced braces\n // from the regex match:\n // \"http://example.com?a[]=1]\"\n if (numOpenBraces === 0) {\n return true;\n }\n return false;\n };\n /**\n * Determine if there's an invalid character after the TLD in a URL. Valid\n * characters after TLD are ':/?#'. Exclude scheme matched URLs from this\n * check.\n *\n * @protected\n * @param {String} urlMatch The matched URL, if there was one. Will be an\n * empty string if the match is not a URL match.\n * @param {String} schemeUrlMatch The match URL string for a scheme\n * match. Ex: 'http://yahoo.com'. This is used to match something like\n * 'http://localhost', where we won't double check that the domain name\n * has at least one '.' in it.\n * @return {Number} the position where the invalid character was found. If\n * no such character was found, returns -1\n */\n UrlMatcher.prototype.matchHasInvalidCharAfterTld = function (urlMatch, schemeUrlMatch) {\n if (!urlMatch) {\n return -1;\n }\n var offset = 0;\n if (schemeUrlMatch) {\n offset = urlMatch.indexOf(':');\n urlMatch = urlMatch.slice(offset);\n }\n // prettier-ignore\n var re = new RegExp(\"^((.?\\/\\/)?[-.\" + alphaNumericAndMarksCharsStr + \"]*[-\" + alphaNumericAndMarksCharsStr + \"]\\\\.[-\" + alphaNumericAndMarksCharsStr + \"]+)\");\n var res = re.exec(urlMatch);\n if (res === null) {\n return -1;\n }\n offset += res[1].length;\n urlMatch = urlMatch.slice(res[1].length);\n if (/^[^-.A-Za-z0-9:\\/?#]/.test(urlMatch)) {\n return offset;\n }\n return -1;\n };\n return UrlMatcher;\n}(Matcher);\nexport { UrlMatcher };\n","import { __extends } from \"tslib\";\nimport { Matcher } from './matcher';\nimport { alphaNumericAndMarksCharRe, alphaNumericAndMarksCharsStr } from '../regex-lib';\nimport { HashtagMatch } from '../match/hashtag-match';\nimport { throwUnhandledCaseError } from '../utils';\n// For debugging: search for other \"For debugging\" lines\n// import CliTable from 'cli-table';\nvar hashtagTextCharRe = new RegExp(\"[_\".concat(alphaNumericAndMarksCharsStr, \"]\"));\n/**\n * @class Autolinker.matcher.Hashtag\n * @extends Autolinker.matcher.Matcher\n *\n * Matcher to find HashtagMatch matches in an input string.\n */\nvar HashtagMatcher = /** @class */function (_super) {\n __extends(HashtagMatcher, _super);\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match instance,\n * specified in an Object (map).\n */\n function HashtagMatcher(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @cfg {String} service\n *\n * A string for the service name to have hashtags (ex: \"#myHashtag\")\n * auto-linked to. The currently-supported values are:\n *\n * - 'twitter'\n * - 'facebook'\n * - 'instagram'\n * - 'tiktok'\n */\n _this.serviceName = 'twitter'; // default value just to get the above doc comment in the ES5 output and documentation generator\n _this.serviceName = cfg.serviceName;\n return _this;\n }\n /**\n * @inheritdoc\n */\n HashtagMatcher.prototype.parseMatches = function (text) {\n var tagBuilder = this.tagBuilder;\n var serviceName = this.serviceName;\n var matches = [];\n var len = text.length;\n var charIdx = 0,\n hashCharIdx = -1,\n state = 0 /* None */;\n // For debugging: search for other \"For debugging\" lines\n // const table = new CliTable( {\n // \thead: [ 'charIdx', 'char', 'state', 'charIdx', 'currentEmailAddress.idx', 'hasDomainDot' ]\n // } );\n while (charIdx < len) {\n var char = text.charAt(charIdx);\n // For debugging: search for other \"For debugging\" lines\n // table.push(\n // \t[ charIdx, char, State[ state ], charIdx, currentEmailAddress.idx, currentEmailAddress.hasDomainDot ]\n // );\n switch (state) {\n case 0 /* None */:\n stateNone(char);\n break;\n case 1 /* NonHashtagWordChar */:\n stateNonHashtagWordChar(char);\n break;\n case 2 /* HashtagHashChar */:\n stateHashtagHashChar(char);\n break;\n case 3 /* HashtagTextChar */:\n stateHashtagTextChar(char);\n break;\n default:\n throwUnhandledCaseError(state);\n }\n // For debugging: search for other \"For debugging\" lines\n // table.push(\n // \t[ charIdx, char, State[ state ], charIdx, currentEmailAddress.idx, currentEmailAddress.hasDomainDot ]\n // );\n charIdx++;\n }\n // Capture any valid match at the end of the string\n captureMatchIfValid();\n // For debugging: search for other \"For debugging\" lines\n //console.log( '\\n' + table.toString() );\n return matches;\n // Handles the state when we're not in a hashtag or any word\n function stateNone(char) {\n if (char === '#') {\n state = 2 /* HashtagHashChar */;\n hashCharIdx = charIdx;\n } else if (alphaNumericAndMarksCharRe.test(char)) {\n state = 1 /* NonHashtagWordChar */;\n } else {\n // not a hashtag character ('#') or word char, stay in State.None\n }\n }\n // Handles the state when we've encountered a word character but are not\n // in a hashtag. This is used to distinguish between a standalone\n // hashtag such as '#Stuff' vs a hash char that is part of a word like\n // 'asdf#stuff' (the latter of which would not be a match)\n function stateNonHashtagWordChar(char) {\n if (alphaNumericAndMarksCharRe.test(char)) {\n // continue in NonHashtagWordChar state\n } else {\n state = 0 /* None */;\n }\n }\n // Handles the state when we've just encountered a '#' character\n function stateHashtagHashChar(char) {\n if (hashtagTextCharRe.test(char)) {\n // '#' char with valid hash text char following\n state = 3 /* HashtagTextChar */;\n } else if (alphaNumericAndMarksCharRe.test(char)) {\n state = 1 /* NonHashtagWordChar */;\n } else {\n state = 0 /* None */;\n }\n }\n // Handles the state when we're currently in the hash tag's text chars\n function stateHashtagTextChar(char) {\n if (hashtagTextCharRe.test(char)) {\n // Continue reading characters in the HashtagText state\n } else {\n captureMatchIfValid();\n hashCharIdx = -1;\n if (alphaNumericAndMarksCharRe.test(char)) {\n state = 1 /* NonHashtagWordChar */;\n } else {\n state = 0 /* None */;\n }\n }\n }\n /*\n * Captures the current hashtag as a HashtagMatch if it's valid.\n */\n function captureMatchIfValid() {\n if (hashCharIdx > -1 && charIdx - hashCharIdx <= 140) {\n // Max length of 140 for a hashtag ('#' char + 139 word chars)\n var matchedText = text.slice(hashCharIdx, charIdx);\n var match = new HashtagMatch({\n tagBuilder: tagBuilder,\n matchedText: matchedText,\n offset: hashCharIdx,\n serviceName: serviceName,\n hashtag: matchedText.slice(1)\n });\n matches.push(match);\n }\n }\n };\n return HashtagMatcher;\n}(Matcher);\nexport { HashtagMatcher };\nexport var hashtagServices = ['twitter', 'facebook', 'instagram', 'tiktok'];\n","import { __extends } from \"tslib\";\nimport { Matcher } from './matcher';\nimport { PhoneMatch } from '../match/phone-match';\nimport { nonDigitRe } from '../regex-lib';\n// RegExp objects which are shared by all instances of PhoneMatcher. These are\n// here to avoid re-instantiating the RegExp objects if `Autolinker.link()` is\n// called multiple times, thus instantiating PhoneMatcher and its RegExp\n// objects each time (which is very expensive - see https://github.com/gregjacobs/Autolinker.js/issues/314).\n// See descriptions of the properties where they are used for details about them\n// Over the years, many people have added to this regex, but it should have been\n// split up by country. Maybe one day we can break this down.\nvar mostPhoneNumbers = /(?:(?:(?:(\\+)?\\d{1,3}[-\\040.]?)?\\(?\\d{3}\\)?[-\\040.]?\\d{3}[-\\040.]?\\d{4})|(?:(\\+)(?:9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\\040.]?(?:\\d[-\\040.]?){6,12}\\d+))([,;]+[0-9]+#?)*/;\n// Regex for Japanese phone numbers\nvar japanesePhoneRe = /(0([1-9]{1}-?[1-9]\\d{3}|[1-9]{2}-?\\d{3}|[1-9]{2}\\d{1}-?\\d{2}|[1-9]{2}\\d{2}-?\\d{1})-?\\d{4}|0[789]0-?\\d{4}-?\\d{4}|050-?\\d{4}-?\\d{4})/;\n// Combined regex\nvar phoneMatcherRegex = new RegExp(\"\".concat(mostPhoneNumbers.source, \"|\").concat(japanesePhoneRe.source), 'g');\n/**\n * @class Autolinker.matcher.Phone\n * @extends Autolinker.matcher.Matcher\n *\n * Matcher to find Phone number matches in an input string.\n *\n * See this class's superclass ({@link Autolinker.matcher.Matcher}) for more\n * details.\n */\nvar PhoneMatcher = /** @class */function (_super) {\n __extends(PhoneMatcher, _super);\n function PhoneMatcher() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * The regular expression to match Phone numbers. Example matches:\n *\n * (123) 456-7890\n * 123 456 7890\n * 123-456-7890\n * +18004441234,,;,10226420346#\n * +1 (800) 444 1234\n * 10226420346#\n * 1-800-444-1234,1022,64,20346#\n *\n * This regular expression has the following capturing groups:\n *\n * 1 or 2. The prefixed '+' sign, if there is one.\n *\n * @protected\n * @property {RegExp} matcherRegex\n */\n _this.matcherRegex = phoneMatcherRegex;\n return _this;\n }\n /**\n * @inheritdoc\n */\n PhoneMatcher.prototype.parseMatches = function (text) {\n var matcherRegex = this.matcherRegex,\n tagBuilder = this.tagBuilder,\n matches = [],\n match;\n while ((match = matcherRegex.exec(text)) !== null) {\n // Remove non-numeric values from phone number string\n var matchedText = match[0],\n cleanNumber = matchedText.replace(/[^0-9,;#]/g, ''),\n // strip out non-digit characters exclude comma semicolon and #\n plusSign = !!(match[1] || match[2]),\n // match[ 1 ] or match[ 2 ] is the prefixed plus sign, if there is one\n before = match.index == 0 ? '' : text.substr(match.index - 1, 1),\n after = text.substr(match.index + matchedText.length, 1),\n contextClear = !before.match(/\\d/) && !after.match(/\\d/);\n if (this.testMatch(match[3]) && this.testMatch(matchedText) && contextClear) {\n matches.push(new PhoneMatch({\n tagBuilder: tagBuilder,\n matchedText: matchedText,\n offset: match.index,\n number: cleanNumber,\n plusSign: plusSign\n }));\n }\n }\n return matches;\n };\n PhoneMatcher.prototype.testMatch = function (text) {\n return nonDigitRe.test(text);\n };\n return PhoneMatcher;\n}(Matcher);\nexport { PhoneMatcher };\n","import { __extends } from \"tslib\";\nimport { Matcher } from './matcher';\nimport { alphaNumericAndMarksCharsStr } from '../regex-lib';\nimport { MentionMatch } from '../match/mention-match';\n// RegExp objects which are shared by all instances of MentionMatcher. These are\n// here to avoid re-instantiating the RegExp objects if `Autolinker.link()` is\n// called multiple times, thus instantiating MentionMatcher and its RegExp\n// objects each time (which is very expensive - see https://github.com/gregjacobs/Autolinker.js/issues/314).\n// See descriptions of the properties where they are used for details about them\nvar twitterRegex = new RegExp(\"@[_\".concat(alphaNumericAndMarksCharsStr, \"]{1,50}(?![_\").concat(alphaNumericAndMarksCharsStr, \"])\"), 'g'); // lookahead used to make sure we don't match something above 50 characters\nvar instagramRegex = new RegExp(\"@[_.\".concat(alphaNumericAndMarksCharsStr, \"]{1,30}(?![_\").concat(alphaNumericAndMarksCharsStr, \"])\"), 'g'); // lookahead used to make sure we don't match something above 30 characters\nvar soundcloudRegex = new RegExp(\"@[-_.\".concat(alphaNumericAndMarksCharsStr, \"]{1,50}(?![-_\").concat(alphaNumericAndMarksCharsStr, \"])\"), 'g'); // lookahead used to make sure we don't match something above 50 characters\n// TikTok usernames are 1-24 characters containing letters, numbers, underscores\n// and periods, but cannot end in a period: https://support.tiktok.com/en/getting-started/setting-up-your-profile/changing-your-username\nvar tiktokRegex = new RegExp(\"@[_.\".concat(alphaNumericAndMarksCharsStr, \"]{1,23}[_\").concat(alphaNumericAndMarksCharsStr, \"](?![_\").concat(alphaNumericAndMarksCharsStr, \"])\"), 'g'); // lookahead used to make sure we don't match something above 24 characters\nvar nonWordCharRegex = new RegExp('[^' + alphaNumericAndMarksCharsStr + ']');\n/**\n * @class Autolinker.matcher.Mention\n * @extends Autolinker.matcher.Matcher\n *\n * Matcher to find/replace username matches in an input string.\n */\nvar MentionMatcher = /** @class */function (_super) {\n __extends(MentionMatcher, _super);\n /**\n * @method constructor\n * @param {Object} cfg The configuration properties for the Match instance,\n * specified in an Object (map).\n */\n function MentionMatcher(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @cfg {'twitter'/'instagram'/'soundcloud'} protected\n *\n * The name of service to link @mentions to.\n *\n * Valid values are: 'twitter', 'instagram', 'soundcloud', or 'tiktok'\n */\n _this.serviceName = 'twitter'; // default value just to get the above doc comment in the ES5 output and documentation generator\n /**\n * Hash of regular expression to match username handles. Example match:\n *\n * @asdf\n *\n * @private\n * @property {Object} matcherRegexes\n */\n _this.matcherRegexes = {\n twitter: twitterRegex,\n instagram: instagramRegex,\n soundcloud: soundcloudRegex,\n tiktok: tiktokRegex\n };\n /**\n * The regular expression to use to check the character before a username match to\n * make sure we didn't accidentally match an email address.\n *\n * For example, the string \"asdf@asdf.com\" should not match \"@asdf\" as a username.\n *\n * @private\n * @property {RegExp} nonWordCharRegex\n */\n _this.nonWordCharRegex = nonWordCharRegex;\n _this.serviceName = cfg.serviceName;\n return _this;\n }\n /**\n * @inheritdoc\n */\n MentionMatcher.prototype.parseMatches = function (text) {\n var serviceName = this.serviceName,\n matcherRegex = this.matcherRegexes[this.serviceName],\n nonWordCharRegex = this.nonWordCharRegex,\n tagBuilder = this.tagBuilder,\n matches = [],\n match;\n if (!matcherRegex) {\n return matches;\n }\n while ((match = matcherRegex.exec(text)) !== null) {\n var offset = match.index,\n prevChar = text.charAt(offset - 1);\n // If we found the match at the beginning of the string, or we found the match\n // and there is a whitespace char in front of it (meaning it is not an email\n // address), then it is a username match.\n if (offset === 0 || nonWordCharRegex.test(prevChar)) {\n var matchedText = match[0].replace(/\\.+$/g, ''),\n // strip off trailing .\n mention = matchedText.slice(1); // strip off the '@' character at the beginning\n matches.push(new MentionMatch({\n tagBuilder: tagBuilder,\n matchedText: matchedText,\n offset: offset,\n serviceName: serviceName,\n mention: mention\n }));\n }\n }\n return matches;\n };\n return MentionMatcher;\n}(Matcher);\nexport { MentionMatcher };\n","import { __assign } from \"tslib\";\nimport { letterRe, digitRe, whitespaceRe, quoteRe, controlCharsRe } from '../regex-lib';\nimport { throwUnhandledCaseError } from '../utils';\n// For debugging: search for other \"For debugging\" lines\n// import CliTable from 'cli-table';\n/**\n * Parses an HTML string, calling the callbacks to notify of tags and text.\n *\n * ## History\n *\n * This file previously used a regular expression to find html tags in the input\n * text. Unfortunately, we ran into a bunch of catastrophic backtracking issues\n * with certain input text, causing Autolinker to either hang or just take a\n * really long time to parse the string.\n *\n * The current code is intended to be a O(n) algorithm that walks through\n * the string in one pass, and tries to be as cheap as possible. We don't need\n * to implement the full HTML spec, but rather simply determine where the string\n * looks like an HTML tag, and where it looks like text (so that we can autolink\n * that).\n *\n * This state machine parser is intended just to be a simple but performant\n * parser of HTML for the subset of requirements we have. We simply need to:\n *\n * 1. Determine where HTML tags are\n * 2. Determine the tag name (Autolinker specifically only cares about ,\n *